getNFTsForCollection

Gets all NFTs for a given NFT contract.

🚧

Method rename

This method has been renamed to getNftsForContract in V3 version of the NFT API


Path Params
string
required
Defaults to docs-demo

For higher throughput, create your own API key

Query Params
string
Defaults to 0xe785E82358879F061BC3dcAC6f0444462D4b5330

String - Contract address for the NFT contract (ERC721 and ERC1155 supported).

string
Defaults to boredapeyachtclub

String - OpenSea slug for the NFT collection.

boolean
Defaults to true

Boolean - if set to true, returns NFT metadata. Setting this to false will reduce payload size and may result in a faster API call. Defaults to true.

string

String - A tokenID offset used for pagination. Can be a hex string, or a decimal. Users can specify the offset themselves to start from a custom offset, or to fetch multiple token ranges in parallel.

integer

Integer - Sets the total number of NFTs returned in the response. Defaults to 100.

integer

No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want to only access the cache and not live fetch any metadata for cache misses then set this value to 0.

Response

Response body
object
nfts
array of objects

List of objects that represent NFTs stored under the queried contract address or collection slug.

nfts
object
id
object
tokenUri
object
metadata
object

Relevant metadata for NFT contract. This is useful for viewing image url, traits, etc. without having to follow the metadata url in tokenUri to parse manually.

string

String - ISO timestamp of the last cache refresh for the information returned in the metadata field.

contractMetadata
object
string

String - An offset used for pagination. Can be passed back as the "startToken" of a subsequent request to get the next page of results. Absent if there are no more results.

Language
URL
Request
Click Try It! to start a request and see the response here! Or choose an example:
application/json
ReadMe
Support Hub