I tried https://docs.opensea.io/reference opensea.io docs to fetch data. However, I think there are 2 APIs.
curl --request GET \
--url https://api.opensea.io/api/v1/asset/0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb/1/
This is for a single asset and it requires a token id as well. But I want data of all the NFTs of a particular smart contract address just by giving the smart contract address.
And this is for a single contract.
curl --request GET \
--url https://api.opensea.io/api/v1/asset_contract/0x06012c8cf97bead5deae237070f9587f8e7a266d
The assets endpoint (docs) has the asset_contract_address filter that allows you to filter by a contract address. Which will effectively allow you to paginate through all NFTs of the contract (that Opensea knows of).
Example:
curl 'https://api.opensea.io/api/v1/assets?offset=0&limit=20&asset_contract_address=0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With