Skip to main content

NFT by Object ID

Retrieve a single NFT by its object ID with complete metadata, display properties, and Kiosk information.

Overview

The NFT by Object ID endpoint returns detailed information for a specific NFT using its unique object ID. This is useful when you have an NFT's object ID and need to fetch its complete metadata, ownership status, and Kiosk information.

Perfect for:

  • Displaying NFT details pages
  • Verifying NFT metadata
  • Checking ownership and Kiosk status
  • Building NFT viewers and explorers

Endpoint

GET /nfts/{objectId}

Base URL: https://api.surflux.dev

Parameters

Path Parameters

ParameterTypeRequiredDescription
objectIdstringYesNFT object ID

Example: 0xa534b9c5a824c31c9c4d143580f7ccb3f3a6e544e1afc30ac235c7277d73b7fe

Query Parameters

ParameterTypeRequiredDescription
api-keystringYesAPI key for authentication

Request Example

curl "https://api.surflux.dev/nfts/0xa534b9c5a824c31c9c4d143580f7ccb3f3a6e544e1afc30ac235c7277d73b7fe?api-key=your_api_key_here"

Response

Response Structure

{
"object_id": "0xa534b9c5a824c31c9c4d143580f7ccb3f3a6e544e1afc30ac235c7277d73b7fe",
"object_type": "0xb908f3c6fea6865d32e2048c520cdfe3b5c5bbcebb658117c41bad70f52b7ccc::popkins_nft::Popkins",
"owner_dynamic_field_object_id": "0xca96b6c9e52fa706604e2580c9a0cb1fe46e3cb9cdd58616e32f3030459478d4",
"kiosk_object_id": "0x1d46393125831bdf06b069e9ecbca4a5f7987ee63e45382cc0b0aaf034433e4e",
"owner": null,
"checkpoint_id": "187489349",
"decoded_fields": {
"id": {
"id": "0xa534b9c5a824c31c9c4d143580f7ccb3f3a6e544e1afc30ac235c7277d73b7fe"
},
"name": "Popkins #11271",
"image_url": "https://walrus.tusky.io/jbpsuBO5Ug6XMvP4CYhP2PWjwDKxFFI-KHRt0UXCjPE",
"description": "Who knew so much chaos could come in such a small package?",
"attributes": {
"contents": [
{
"key": "Species",
"value": "Cat Slug"
},
{
"key": "Mutation",
"value": "Alpha"
}
]
}
},
"decoded_display": {
"name": "Popkins #11271",
"image_url": "https://walrus.tusky.io/jbpsuBO5Ug6XMvP4CYhP2PWjwDKxFFI-KHRt0UXCjPE",
"description": "Who knew so much chaos could come in such a small package?"
},
"updated_at": "2025-09-07T21:03:01.585Z",
"created_at": "2025-06-05T19:57:09.698Z",
"kiosk": {
"object_id": "0x1d46393125831bdf06b069e9ecbca4a5f7987ee63e45382cc0b0aaf034433e4e",
"owner_cap_object_id": "0x5932f535f36009c9c04de9a68904c259cfe708e3cfa607c274a86d9ddf33019b",
"owner": "0xa0490f6fe09183700e2af6484b7fb2a09a12f0f691f5b8e5582c4782d6de887e",
"personal_cap_object_id": null,
"checkpoint_id": "187489349",
"updated_at": "2025-09-07T21:03:01.585Z",
"created_at": "2025-09-07T21:03:01.585Z"
}
}

Response Fields

FieldTypeDescription
object_idstringUnique NFT object ID
object_typestringFull type path of the NFT
owner_dynamic_field_object_idstringDynamic field object ID for Kiosk ownership
kiosk_object_idstring | nullKiosk ID if NFT is stored in a Kiosk
ownerstring | nullOwner wallet address (null if in Kiosk)
checkpoint_idstringCheckpoint when NFT was last updated
decoded_fieldsobjectDecoded on-chain fields including name, description, image, attributes
decoded_displayobjectDisplay metadata formatted for UI rendering
created_atstringNFT creation timestamp (ISO 8601)
updated_atstringLast update timestamp (ISO 8601)
kioskobject | nullKiosk details if NFT is stored in a Kiosk

Kiosk Object Fields

FieldTypeDescription
object_idstringKiosk object ID
owner_cap_object_idstringOwner capability object ID
ownerstringKiosk owner address
personal_cap_object_idstring | nullPersonal capability object ID
checkpoint_idstringCheckpoint when Kiosk was last updated
created_atstringKiosk creation timestamp
updated_atstringLast update timestamp

Use Cases

  • NFT Detail Pages — Display complete information for a specific NFT
  • Ownership Verification — Check current owner and custody status
  • Metadata Retrieval — Fetch NFT attributes and display properties
  • Kiosk Detection — Determine if NFT is stored in a Kiosk
  • NFT Explorers — Build detailed NFT viewers with full metadata

Code Examples

JavaScript / TypeScript

const objectId = "0xa534b9c5a824c31c9c4d143580f7ccb3f3a6e544e1afc30ac235c7277d73b7fe";
const apiKey = "your_api_key_here";

const response = await fetch(
`https://api.surflux.dev/nfts/${objectId}?api-key=${apiKey}`
);

const nft = await response.json();

console.log(`NFT: ${nft.decoded_display.name}`);
console.log(`Collection: ${nft.object_type}`);
console.log(`Owner: ${nft.kiosk ? nft.kiosk.owner : nft.owner}`);
console.log(`In Kiosk: ${nft.kiosk_object_id ? 'Yes' : 'No'}`);

Display NFT Attributes

const objectId = "0xa534b9c5a824c31c9c4d143580f7ccb3f3a6e544e1afc30ac235c7277d73b7fe";
const apiKey = "your_api_key_here";

const response = await fetch(
`https://api.surflux.dev/nfts/${objectId}?api-key=${apiKey}`
);

const nft = await response.json();

console.log(`${nft.decoded_display.name}`);
console.log(`Description: ${nft.decoded_display.description}`);

if (nft.decoded_fields.attributes?.contents) {
console.log('\nAttributes:');
nft.decoded_fields.attributes.contents.forEach(attr => {
console.log(`- ${attr.key}: ${attr.value}`);
});
}