GET

The Craft API is built to provide data about all of the NFT collections that are supported by Craft. This API is chain agnostic and you can query any data from any chain as following:

Base Endpoint

https://api.craft.network

Get all collection

/collection

This endpoint return all collections data, including profile picture, owner, royalties, chain, data structure, etc.

Query parameters (optional):

limit: Amount of items to query (default:20)

Example:

https://api.craft.network/collection?limit=2

Get a single collection

/collection/{id}

This endpoint return a specific collection data. ${id} is the address of the collection and you need to add the collectionId if this is an internal collection (minted from Craft GUI). You can derivate the collectionId with any tokenId as following: tokenId >> 16

Example:

https://api.craft.network/collection/cx384018e03aa8b739472c7a0645b70df97550e2c2

Get NFTs from a collection

/collection/nfts

This endpoint returns the NFT from a specific collection. You need to specify the address of the collection with the collectionId parameter.

Query parameters (optional):

limit: Amount of items to query (default:20)

collectionId: Address of the collection, need to specify the collectionId if applicables

Example:

https://api.craft.network/collection/nfts?collectionId=cx384018e03aa8b739472c7a0645b70df97550e2c2

Get NFTs from a collection

/collection/nfts

This endpoint returns the NFT from a specific collection. You need to specify the address of the collection with the collectionId parameter.

Query parameters (optional):

limit: Amount of items to query (default:20)

collectionId: Address of the collection, need to specify the collectionId if applicables

Example:

https://api.craft.network/collection/nfts?collectionId=cx384018e03aa8b739472c7a0645b70df97550e2c2

Get NFTs from a collection

/collection/nfts

This endpoint returns the NFT from a specific collection. You need to specify the address of the collection with the collectionId parameter.

Query parameters (optional):

limit: Amount of items to query (default:20)

collectionId: Address of the collection, need to specify the collectionId if applicables

Example:

https://api.craft.network/collection/nfts?collectionId=cx384018e03aa8b739472c7a0645b70df97550e2c2

Get a single NFT

/nft/{id}

This endpoint returns a specific NFT. It will returns data such as owners, listings and price data, attributes, creator etc. You need to specify the id of the asset formated as following: {collectionAddress}:{tokenId}

Example:

https://api.craft.network/nft/cx384018e03aa8b739472c7a0645b70df97550e2c2:1

Get a single NFT history

/nft/history/{id}

This endpoint returns the NFT history from a specific asset. It will returns data such as listings, sales, offers, etc.

Example:

https://api.craft.network/nft/history/cx384018e03aa8b739472c7a0645b70df97550e2c2:1

Get user data

/user/{address}

This endpoint returns the data of an address, including balances, name, likes, profile pictures, etc. The {address} parameter is the blockchain address of the user.

Example:

https://api.craft.network/user/hx73b6995e5ee75f1c9a6e201dc7a9fc4814eb5a53

Last updated