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
| Parameter | Type | Required | Description |
|---|---|---|---|
objectId | string | Yes | NFT object ID |
Example: 0xa534b9c5a824c31c9c4d143580f7ccb3f3a6e544e1afc30ac235c7277d73b7fe
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
api-key | string | Yes | API 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
| Field | Type | Description |
|---|---|---|
object_id | string | Unique NFT object ID |
object_type | string | Full type path of the NFT |
owner_dynamic_field_object_id | string | Dynamic field object ID for Kiosk ownership |
kiosk_object_id | string | null | Kiosk ID if NFT is stored in a Kiosk |
owner | string | null | Owner wallet address (null if in Kiosk) |
checkpoint_id | string | Checkpoint when NFT was last updated |
decoded_fields | object | Decoded on-chain fields including name, description, image, attributes |
decoded_display | object | Display metadata formatted for UI rendering |
created_at | string | NFT creation timestamp (ISO 8601) |
updated_at | string | Last update timestamp (ISO 8601) |
kiosk | object | null | Kiosk details if NFT is stored in a Kiosk |
Kiosk Object Fields
| Field | Type | Description |
|---|---|---|
object_id | string | Kiosk object ID |
owner_cap_object_id | string | Owner capability object ID |
owner | string | Kiosk owner address |
personal_cap_object_id | string | null | Personal capability object ID |
checkpoint_id | string | Checkpoint when Kiosk was last updated |
created_at | string | Kiosk creation timestamp |
updated_at | string | Last 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}`);
});
}
Related Endpoints
- Address NFTs — Get all NFTs owned by an address
- Collection Snapshot — Query NFTs from a specific collection
- Kiosks NFTs — Access NFTs stored in a Kiosk