<p>When minting a token in Cardano, we sign (witness) the transaction with the input credentials for consuming the input, and ALSO it is required to provide the minting native script (token policy) as a witness to the transaction.</p>
<p>We read the witnesses from the transactions on the chain and parse the script for the tokens. Unfortunately, currently, there is no easy way that you can follow to get this information.</p>

CC BY-SA 4.0
2021-10-28T08:43:41.750Z
Thank you very much for that explanation
AndroDevs
CC BY-SA 4.0
2021-10-28T08:19:52.037Z
2021-10-28T08:19:52.037Z
Ashish Prajapati
<p>As stated in other answers the minting policy script is used as a witness in the minting transaction and thus available on chain. Community members made tools for extracting such data. Here is a great forum post about the same question and links to different sources where you can find such scripts!</p>
<p><a href="https://forum.cardano.org/t/how-to-derive-the-token-policy-script-from-the-mint-transaction/78479/2" rel="nofollow noreferrer">The post</a></p>
<p><a href="https://gateway.pinata.cloud/ipns/k2k4r8nihho5xsscbipfwm2keexys84xailkw3q665vfc71cfoyqzftf" rel="nofollow noreferrer">All scripts onchain</a> (credits to Brain W Bush)</p>
<p>You can parse the scripts in the above link by transaction hash.</p>

CC BY-SA 4.0
2021-10-29T10:38:40.740Z
Thank you very much for directing me to already discussed thread in other forum. Very much appreciated!
AndroDevs
CC BY-SA 4.0
2021-10-28T09:45:56.633Z
2021-10-28T09:45:56.633Z
Fermat
<p>You can't get that information, unless the creator publish it because the policy id is the hash of the policy script.</p>
<p>For example, here: <a href="https://pool.pm/policy/d5e6bf0500378d4f0da4e8dde6becec7621cd8cbf5cbb9b87013d4cc" rel="nofollow noreferrer">Spacebudz policy</a> and here <a href="https://v2.spacebudz.io/FAQ" rel="nofollow noreferrer">Spacebudz FAQ - Is this actually an NFT</a></p>
<p>Creator already published it on pool pm, so you can find all details there.</p>

CC BY-SA 4.0
2021-10-25T15:57:34.397Z
Thank you, i got it. Remains the question how does cardanoscan gets the script information e.g here: 
https://cardanoscan.io/tokenPolicy/c6c7aa8eb132557fa0307217cd207f60b90f16032441ce74b7acebc7

also i minted a token to test-net, never published my policy script but cardanoscan is able to show it:
https://testnet.cardanoscan.io/token/c958da9d1ba00cbd58019a45cb1481e2ef3be4406c1d80cb3fdacf3d486f646c657230327833?address=addr_test1qzgv3rszerajmlcp9ga60khrwf4wsrf969mrzkn5jhvprasp7k0q7cdp9ffzdxxdk3ergfwepxvw26635h20kk9w0wns2jfdgf
AndroDevs
CC BY-SA 4.0
2021-10-25T16:18:03.233Z
You're right. Can you please update your question to add these details regarding to cardanoscan. Thanks.
georgeos
CC BY-SA 4.0
2021-10-25T15:43:16.580Z
2021-10-25T15:43:16.580Z
georgeos
<p>how can i get the script information for a given policyID. I am mostly interested in the &quot;invalidAfter&quot; Slot number.
So far i could not find any option for example by using Blockfrost API.</p>
<p>Background: i minted a token and appropriate policy on testnet. Never published the policy-Script. The cardanoscan is able to show it to me, question how does it work?</p>
<p><a href="https://testnet.cardanoscan.io/tokenPolicy/c958da9d1ba00cbd58019a45cb1481e2ef3be4406c1d80cb3fdacf3d" rel="nofollow noreferrer">https://testnet.cardanoscan.io/tokenPolicy/c958da9d1ba00cbd58019a45cb1481e2ef3be4406c1d80cb3fdacf3d</a></p>
<p>Thank you and Greetings
Andro</p>

<script><blockfrost>
How to get Policy Script for a specific policy-ID
# How to get Policy Script for a specific policy-ID

(Asked by: username_0 on 2021-10-25)

how can i get the script information for a given policyID. I am mostly interested in the "invalidAfter" Slot number.
So far i could not find any option for example by using Blockfrost API.

Background: i minted a token and appropriate policy on testnet. Never published the policy-Script. The cardanoscan is able to show it to me, question how does it work?

<https://testnet.cardanoscan.io/tokenPolicy/c958da9d1ba00cbd58019a45cb1481e2ef3be4406c1d80cb3fdacf3d>

Thank you and Greetings
Andro

**Tags:** script, blockfrost

---

## 3 answers

### Answer by username_1 on 2021-10-28. Score: 1 | Accepted answer

When minting a token in Cardano, we sign (witness) the transaction with the input credentials for consuming the input, and ALSO it is required to provide the minting native script (token policy) as a witness to the transaction.

We read the witnesses from the transactions on the chain and parse the script for the tokens. Unfortunately, currently, there is no easy way that you can follow to get this information.

> **Comments:**
> **username_0**: Thank you very much for that explanation  

---

### Answer by username_2 on 2021-10-28. Score: 3

As stated in other answers the minting policy script is used as a witness in the minting transaction and thus available on chain. Community members made tools for extracting such data. Here is a great forum post about the same question and links to different sources where you can find such scripts!

[The post](https://forum.cardano.org/t/how-to-derive-the-token-policy-script-from-the-mint-transaction/78479/2)

[All scripts onchain](https://gateway.pinata.cloud/ipns/k2k4r8nihho5xsscbipfwm2keexys84xailkw3q665vfc71cfoyqzftf) (credits to Brain W Bush)

You can parse the scripts in the above link by transaction hash.

> **Comments:**
> **username_0**: Thank you very much for directing me to already discussed thread in other forum. Very much appreciated!  

---

### Answer by username_3 on 2021-10-25. Score: 1

You can't get that information, unless the creator publish it because the policy id is the hash of the policy script.

For example, here: [Spacebudz policy](https://pool.pm/policy/d5e6bf0500378d4f0da4e8dde6becec7621cd8cbf5cbb9b87013d4cc) and here [Spacebudz FAQ - Is this actually an NFT](https://v2.spacebudz.io/FAQ)

Creator already published it on pool pm, so you can find all details there.

> **Comments:**
> **username_0**: Thank you, i got it. Remains the question how does cardanoscan gets the script information e.g here:  https://cardanoscan.io/tokenPolicy/c6c7aa8eb132557fa0307217cd207f60b90f16032441ce74b7acebc7  also i minted a token to test-net, never published my policy script but cardanoscan is able to show it: https://testnet.cardanoscan.io/token/c958da9d1ba00cbd58019a45cb1481e2ef3be4406c1d80cb3fdacf3d486f646c657230327833?address=addr_test1qzgv3rszerajmlcp9ga60khrwf4wsrf969mrzkn5jhvprasp7k0q7cdp9ffzdxxdk3ergfwepxvw26635h20kk9w0wns2jfdgf  
> **username_3**: You're right. Can you please update your question to add these details regarding to cardanoscan. Thanks.  

---

