Query subjects
const url = 'https://v2.tokens.cardano.org/api/v2/subjects/query?show_cips_details=false&validation=ALL';const options = { method: 'POST', headers: {'Content-Type': 'application/json;charset=utf-8'}, body: '{ "subjects": [ "example" ], "properties": [ "example" ] }'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://v2.tokens.cardano.org/api/v2/subjects/query?show_cips_details=false&validation=ALL' \ --header 'Content-Type: application/json;charset=utf-8' \ --data '{ "subjects": [ "example" ], "properties": [ "example" ] }'Query either all or a subset of properties of the given subjects
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”The CIP priority: if the same property is present in multiple standards, the one with highest priority is returned
Whether all the CIP specific properties should be returned in the response. False by default
Which tokens to return, by how well their metadata follows its CIP: ALL (default) returns every indexed token with its validation_errors; MANDATORY_ONLY only tokens with no MANDATORY error; STRICT only tokens with no error at all (metadata.valid true). No error means none from the checks this API runs, not full CIP compliance: a CIP-68 text given as a list of byte strings is accepted, a URI is checked for its scheme only, and a CIP-26 logo for base64 and size, not for being a PNG (ADR-019). A token that is not accepted is left out of the response
Request Body required
Section titled “Request Body required ”object
Example generated
{ "subjects": [ "example" ], "properties": [ "example" ]}Responses
Section titled “ Responses ”OK
The subjects found, in the order asked, and the query priority used
object
A token subject with its metadata, standards details, and optional extensions from additional CIPs
object
The subject identifier — concatenation of policy ID and asset name (hex)
Token type: NATIVE for standard tokens, PROGRAMMABLE for tokens with on-chain transfer logic (e.g. CIP-113)
Merged display metadata from CIP-26/CIP-68 based on query priority
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
How the entry departs from CIP-26 (V2 only); empty when it follows it.
object
CIP-68 fungible (label 333) or rich fungible (label 444) token metadata from a reference NFT inline datum. The token is served as indexed, whatever is wrong with it: validation_errors lists how it departs from CIP-68.
object
The logo as written, a URI with scheme https, ipfs, ar or data when it follows CIP-68. For a rich fungible token (444), which has no logo, this is its image.
How the datum departs from CIP-68 for this token’s label; empty when it follows it, absent when the row was indexed before validation existed.
object
Additional on-chain properties from CIP extensions. Each key is a CIP identifier (e.g. ‘cip113’). Omitted when the token has no extensions.
object
CIP-113 programmable token metadata. Present when the token’s policy ID is registered in an on-chain CIP-113 programmable token registry. CIP-113 tokens are standard CIP-26/CIP-68 tokens with additional on-chain transfer validation logic — effectively tokens in a ‘smart contract jail’ for regulatory compliance, freeze/seize, or custom rules.
object
Blake2b-224 hash of the minting logic credential (script or verification key) that authorises minting and burning of this token. Bound on-chain to the token’s policy ID at registration. Null when the registry node does not specify one.
Blake2b-224 hash of the Plutus script that validates every transfer of this token. This script runs on-chain via the withdraw-zero pattern whenever tokens move between addresses. Null when the registry node does not specify a transfer logic script.
Blake2b-224 hash of the Plutus script that validates issuer/admin operations such as freeze, seize, or burn. Allows a token issuer to perform privileged actions on tokens held by other addresses. Null when the substandard has no third-party operations.
Blake2b-224 hash of the credential (script or verification key) that must approve any unfracking action touching this token. Null means unfracking is forbidden for this token.
Policy ID of an optional global state NFT used by the transfer logic. For example, a freeze-and-seize substandard uses this to reference a denylist of blocked addresses. Null when the token’s substandard has no global state.
How the metadata of the token departs from its CIP, from every standard that has it, in query priority order (each entry names its cip and, for CIP-68, its sub_standard, the label). The token is returned as indexed; a MANDATORY error means it lacks something its CIP requires, so a wallet that wants to be strict may reject it, or ask with validation=MANDATORY_ONLY. Absent when the token was indexed before validation existed; metadata.valid then falls back to name and description being present.
| code | meaning |
|---|---|
missing_value | a field the CIP requires is missing or empty: for CIP-68 the version and, as the label requires it, name, description (333) and image (222, 444); for CIP-26 name and description; for CIP-113 the CIP-26 or CIP-68 metadata of a programmable token (companion_metadata) |
wrong_type | the value has a type the CIP does not allow (for example a number where text is expected); a value that cannot be kept is left out |
invalid_uri_scheme | an image or logo is not a URI with one of the schemes CIP-68 allows (https, ipfs, ar, data); the value is kept as written |
invalid_length | a CIP-26 text is shorter or longer than CIP-26 allows (for example a name over 50 characters) |
invalid_value | a CIP-26 value breaks a rule of the registry’s validator that is not a type, a length or a range |
out_of_range | a number is outside the range allowed: decimals |
invalid_version | the CIP-68 version is there but cannot be used: it is not an integer, it does not fit a 64-bit integer (stored without a version), or it is not one CIP-68 defines (1 to 4; the datum is read by its structure and kept). The message says which. A missing version is missing_value |
plutus_constructor | a property holds a Plutus constructor, which CIP-68 metadata does not allow; it is kept as {constructor, fields} |
not_utf8 | a text is not valid UTF-8; it is kept as hex (mandatory for a name, and for the description of a 333) |
invalid_files_entry | an entry of files breaks the CIP-68 definition (for example no mediaType or src); the entry is kept |
no_nested_entry | a nested datum ("721") has no usable entry for the token (field 721); the token is indexed without metadata |
too_deep | a property is nested more than 100 levels and is dropped, the rest of the datum is kept |
unsupported_key | a key of a map has no text form (a list or a map) and is left out |
key_collision | two keys read the same (for example the text 1 and the integer 1); one of them is kept |
invalid_base64 | a CIP-26 logo is not valid base64 |
too_large | a CIP-26 logo is over 64 KiB once decoded (kept up to about 1 MiB; anything larger is dropped) |
invalid_constructor | the CIP-68 datum is not constructor 0 (#6.121), as CIP-68 defines it (field constructor); it is read as written |
object
Example
{ "subjects": [ { "type": "NATIVE", "standards": { "cip26": { "subject": "b377d03a568dde663534e040fc32a57323ec00970df0e863eba3f098717569640a", "policy": "82008200581ce62601e8eeec975f3f124a288cd0ecb2973f5fc225629f1401a79b16", "url": { "value": "https://www.iohk.io" }, "ticker": { "value": "QUID" }, "decimals": { "value": 1 }, "validation_errors": [ { "field_category": "MANDATORY" } ] }, "cip68": { "validation_errors": [ { "field_category": "MANDATORY" } ] } }, "extensions": { "additionalProperty": { "minting_logic_script": "f462a4e22e5b138c17d893d4e0811790f51f1231b8be4198313e08d0", "transfer_logic_script": "aaa513b0fcc01d635f8535d49f38acc33d4d6b62ee8732ca6e126102", "third_party_transfer_logic_script": "def513b0fcc01d635f8535d49f38acc33d4d6b62ee8732ca6e126103", "unfracking_logic_script": "f91c65ec585a20176feeb2c4e5281e856d3b61e95d1980717da724fc", "global_state_policy_id": "1234567890abcdef1234567890abcdef1234567890abcdef12345678" } }, "validation_errors": [ { "field_category": "MANDATORY" } ] } ]}Built on Yaci Store and cardano-client-lib by BloxBean.