LogoLogo
  • What is the Rareful API?
  • Quick Start
  • Reference
    • API Reference
      • Smart Contracts and Collections
      • Wallets and Users
      • Minting and File Upload
      • Getting NFT Metadata
      • Buying, Selling, and Transfers
    • About NFTs and Smart Contracts
      • NFTs
      • Smart Contracts
      • Our Smart Contracts
Powered by GitBook
On this page
  • Find NFT Metadata
  • Find an NFT from the contract address and token id
  • Find an NFT from the contract address and token id if it is for Sale
  • Find an NFT from the contract address and token id
  1. Reference
  2. API Reference

Getting NFT Metadata

These endpoints include finding NFTs and their metadata

Find NFT Metadata

Find an NFT from the contract address and token id

POST https://api.rareful.io/v1/getNFT

Finds an NFT and its metadata

Headers

Name
Type
Description

API_KEY*

String

Your API Key can found on the dashboard, and will be used to authenticate all requests (Required)

Content-Type*

String

application/json (Required)

Request Body

Name
Type
Description

contract_address*

string

The contract address that the NFT was published on. (Required)

token_id*

Int

The token id of the NFT that was minted (Required)

String

blockchain

String

The blockchain this NFT exists on

{
    "data": {
        "item": {
            "image": "https://nftgo.mypinata.cloud/ipfs/QmXq4BBd4QTjSX8DEDN4Nj7kwmGL8fDndSrVpxukoesiyw",
            "metadata": "https://ipfs.io/ipfs/QmYfeFRtg4tq3upwsPw6xvrP75MYSqyv8E7wpkxNxE4EWr",
            "name": "Awesome NFT 5",
            "owner_public_key": "0x899825b3c2339A2A3d738a933920E7C4F0d001Ff",
            "token_id": "45018383"
        }
    },
    "status": 200,
    "message": "NFT was found"
}
{
    "data": {},
    "status": 400,
    "message": "There was an error"
}
{
    "data": {},
    "status": 401,
    "message": "Not Authorized"
}
{
    "status": 500,
    "message": "Internal Server Error"
}

Find an NFT from the contract address and token id if it is for Sale

POST https://api.rareful.io/v1/getNFTForSale

Finds an NFT and its metadata, will not return if the NFT is not listed for sale

Headers

Name
Type
Description

API_KEY*

String

Your API Key can found on the dashboard, and will be used to authenticate all requests (Required)

Content-Type*

String

application/json (Required)

Request Body

Name
Type
Description

contract_address*

string

The contract address that the NFT was published on. (Required)

token_id*

Int

The token id of the NFT that was minted (Required)

blockchain

String

The blockchain this NFT exists on

{
    "data": {
        "item": {
            "image": "https://nftgo.mypinata.cloud/ipfs/QmXq4BBd4QTjSX8DEDN4Nj7kwmGL8fDndSrVpxukoesiyw",
            "metadata": "https://ipfs.io/ipfs/QmYfeFRtg4tq3upwsPw6xvrP75MYSqyv8E7wpkxNxE4EWr",
            "name": "Awesome NFT 5",
            "owner_public_key": "0x899825b3c2339A2A3d738a933920E7C4F0d001Ff",
            "token_id": "45018383"
        }
    },
    "status": 200,
    "message": "NFT was found"
}
{
    "data": {},
    "status": 400,
    "message": "There was an error"

Finds an NFT and its metadata
The contract address that the NFT was published on.  (Required)
{
    "data": {
        "item": {
            "image": "https://nftgo.mypinata.cloud/ipfs/QmXq4BBd4QTjSX8DEDN4Nj7kwmGL8fDndSrVpxukoesiyw",
            "metadata": "https://ipfs.io/ipfs/QmYfeFRtg4tq3upwsPw6xvrP75MYSqyv8E7wpkxNxE4EWr",
            "name": "Awesome NFT 5",
            "owner_public_key": "0x899825b3c2339A2A3d738a933920E7C4F0d001Ff",
            "token_id": "45018383"
        }
    },
    "status": 200,
    "message": "NFT was found"
}
Your API Key can found on the dashboard, and will be used to authenticate all requests (Required)
application/json (Required)
{
    "data": {},
    "status": 401,
    "message": "Not Authorized"
}
The token id of the NFT that was minted (Required)
{
    "status": 500,
    "message": "Internal Server Error"
}
{
    "data": {},
    "status": 400,
    "message": "There was an error"
}}
{
    "data": {},
    "status": 401,
    "message": "Not Authorized"
}
{
    "status": 500,
    "message": "Internal Server Error"
}

Find an NFT from the contract address and token id

POST https://api.rareful.io/v1/getNFTTransactionHistory

Finds an NFT and its transaction history

Headers

Name
Type
Description

API_KEY*

String

Your API Key can found on the dashboard, and will be used to authenticate all requests (Required)

Content-Type*

String

application/json (Required)

Request Body

Name
Type
Description

contract_address*

string

The contract address that the NFT was published on. (Required)

token_id*

Int

The token id of the NFT that was minted (Required)

blockchain

String

The blockchain this NFT exists on

{
    "data": {
        "item": {
            "image": "https://nftgo.mypinata.cloud/ipfs/QmXq4BBd4QTjSX8DEDN4Nj7kwmGL8fDndSrVpxukoesiyw",
            "metadata": "https://ipfs.io/ipfs/QmYfeFRtg4tq3upwsPw6xvrP75MYSqyv8E7wpkxNxE4EWr",
            "name": "Awesome NFT 5",
            "owner_public_key": "0x899825b3c2339A2A3d738a933920E7C4F0d001Ff",
            "token_id": "45018383"
        }
    },
    "status": 200,
    "message": "NFT was found"
}
{
    "data": {},
    "status": 400,
    "message": "There was an error"

Finds an NFT and its metadata
The contract address that the NFT was published on.  (Required)
{
    "data": {
        "item": {
            "image": "https://nftgo.mypinata.cloud/ipfs/QmXq4BBd4QTjSX8DEDN4Nj7kwmGL8fDndSrVpxukoesiyw",
            "metadata": "https://ipfs.io/ipfs/QmYfeFRtg4tq3upwsPw6xvrP75MYSqyv8E7wpkxNxE4EWr",
            "name": "Awesome NFT 5",
            "owner_public_key": "0x899825b3c2339A2A3d738a933920E7C4F0d001Ff",
            "token_id": "45018383"
        }
    },
    "status": 200,
    "message": "NFT was found"
}
Your API Key can found on the dashboard, and will be used to authenticate all requests (Required)
application/json (Required)
{
    "data": {},
    "status": 401,
    "message": "Not Authorized"
}
The token id of the NFT that was minted (Required)
{
    "status": 500,
    "message": "Internal Server Error"
}
{
    "data": {},
    "status": 400,
    "message": "There was an error"
}}
{
    "data": {},
    "status": 401,
    "message": "Not Authorized"
}
{
    "status": 500,
    "message": "Internal Server Error"
}

Minting from a url is recommended for speed purposes. A potential flow would be to use the IPFS file upload route ahead of time to convert regular files to decentralized ones, and then use the mintFromUrl route for the minting

PreviousMinting and File UploadNextBuying, Selling, and Transfers

Last updated 2 years ago