Fetch All NFTs by Address

Guide on how to fetch all the NFTs that are owned by an address

Endpoint

GET https://rest-v1.ludo.ninja/wallets/{blockchain}/{walletAddress}

Path Parameters

blockchain ━ String, The blockchain in where the address exists on.

walletAddress ━ String, The address to fetch all NFTs from.

Query Parameters

type ━ String, The type of NFTs in the wallet and contains the following options below

all ━ Fetch all NFTs that are created and owned by the address.

created ━ Fetch all NFTs that are created by the address.

owned - Fetch all NFTs that are owned by the address.

pageSize ━ Integer (Int32), Number of the NFTs output.

pageToken ━ String, The token of the specific page that contains the NFT.

Returns a JSON object with the properties below

nfts ━ Array, An array of objects each containing the following fields

tokenId ━ String, The token ID of the NFT.

address ━ String, The contract address of the NFT.

blockchain ━ String, The blockchain of where the NFT exists on.

name ━ String, The name of the NFT.

description ━ String, The description of the NFT.

originalUrls ━ Array, Urls that host the NFT data.

ownerAddresses ━ Array, The address that currently holds the NFT.

attributes ━ Array, An array of the NFT attributes with the following properties below

name ━ String, Name of the attribute

value ━ String, Value of the attribute

How to fetch all NFTs by an address using Ludo API

In this guide we will be looking into how to fetch all NFTs within an address, the endpoint requires 2 parameters values in order for the request to succeed and they are blockchain and walletAddress, you can use additional parameters such as type, pageSize and pageToken to customize the request in order to get specific results that you need.

We will be sending a request with the address we will be using below on the ethereum blockchain

0xd8da6bf26964af9d7eed9e03e53415d37aa96045

Below is an example of how to send a request to fetch all NFTs by an address using Ludo API

curl --request GET \
     --url https://rest-v1.ludo.ninja/wallets/ethereum/0xd8da6bf26964af9d7eed9e03e53415d37aa96045 \
     --header 'accept: application/json'
const options = {method: 'GET', headers: {accept: 'application/json'}};

fetch('https://rest-v1.ludo.ninja/wallets/ethereum/0xd8da6bf26964af9d7eed9e03e53415d37aa96045', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import requests

url = "https://rest-v1.ludo.ninja/wallets/ethereum/0xd8da6bf26964af9d7eed9e03e53415d37aa96045"

headers = {"accept": "application/json"}

response = requests.get(url, headers=headers)

print(response.text)

Below is an example of how to send a request with additional parameters such as type and pageSize with the type value being 'all' and pageSize being 5

https://rest-v1.ludo.ninja/wallets/ethereum/0xd8da6bf26964af9d7eed9e03e53415d37aa96045?type=all&pageSize=5

After a successful result, you will get a response with the NFTs that are within that address.