getNFTs
Gets all NFTs currently owned by a given address
NOTE: This endpoint offers multi-chain support. Check chains currently available for the NFT API.

Parameters

  • owner: address for NFT owner
  • pageKey: (optional) UUID for pagination. If more results are available, a UUID pageKey will be returned in the response. Pass that uuid into pageKey to fetch the next 100 NFTs. NOTE: pageKeys expire after 10 minutes.
  • contractAddresses[]: (optional) array of contract addresses to filter the responses with. Max limit 20 contracts.

Note on pagination

We paginate our responses with a default limit of 100 responses. We've chosen this number via thorough testing to determine the best balance of reliability and speed. In the future, you will be able to specify your own default size. If the owner has more than 100 nfts, we'll provide a pageKey you can include in the next request to return the remaining responses. This uses cursor based pagination with an idempotent result. This means if you provide one it serves as a static reference to the NFTs owned at time of the first call. This means if an owner acquires or transfers an NFT in between a paginated call, this will NOT be reflected.

Returns

  • ownedNfts: list of objects that represent NFTs owned by the address. Max results per response = 100.
    • Object schema:
      • contract:
        • address: address of NFT contract
      • id:
        • token_id: token ID of given NFT
  • pageKey : (optional) UUID for pagination - returned if there are more NFTs to fetch. Max NFTs per page = 100.
  • totalCount: total number of NFTs owned by the given address.
  • blockHash: the canonical head block hash of when your request was received

Examples

For an example request with pagination, see Request (with pagination).
For examples with contract filtering, see Request (with contract filtering).

Version

You must update your api_key from your dashboard from V2 --> V1, ie
https://eth-mainnet.g.alchemy.com/your-api-key/v2 should be https://eth-mainnet.g.alchemy.com/your-api-key/v1

Network

The examples below is for Ethereum Mainnet. If you are using Polygon you'll need to use your polygon endpoint instead: https://polygon-mainnet.g.alchemy.com/your-api-key/v1/getNFTs...

Request

Curl
JavaScript - Fetch
JavaScript - jQuery
Postman
1
curl 'https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0xfAE46f94Ee7B2Acb497CEcAFf6Cff17F621c693D'
Copied!
1
var requestOptions = {
2
method: 'GET',
3
redirect: 'follow'
4
};
5
6
fetch("https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0xfAE46f94Ee7B2Acb497CEcAFf6Cff17F621c693D", requestOptions)
7
.then(response => response.text())
8
.then(result => console.log(result))
9
.catch(error => console.log('error', error));
Copied!
1
var settings = {
2
"url": "https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0xfAE46f94Ee7B2Acb497CEcAFf6Cff17F621c693D",
3
"method": "GET",
4
"timeout": 0,
5
};
6
7
$.ajax(settings).done(function (response) {
8
console.log(response);
9
});
Copied!
1
URL: https://eth-mainnet.g.alchemy.com/demo/v1/getNFTs/?owner=0xfAE46f94Ee7B2Acb497CEcAFf6Cff17F621c693D
2
RequestType: GET
Copied!

Response

1
{
2
"ownedNfts": [{
3
"contract": {
4
"address": "0x7eef591a6cc0403b9652e98e88476fe1bf31ddeb"
5
},
6
"id": {
7
"tokenId": "0x2a"
8
}
9
}, {
10
"contract": {
11
"address": "0x9abb7bddc43fa67c76a62d8c016513827f59be1b"
12
},
13
"id": {
14
"tokenId": "0x0000000000000000000000000000000000000000000000000000000000000baa"
15
}
16
}, {
17
"contract": {
18
"address": "0x495f947276749ce646f68ac8c248420045cb7b5e"
19
},
20
"id": {
21
"tokenId": "0x7b1507011c173ea0b6365f54131e1fefa1562032000000000000850000000001"
22
}
23
}, {
24
"contract": {
25
"address": "0x97597002980134bea46250aa0510c9b90d87a587"
26
},
27
"id": {
28
"tokenId": "0x0000000000000000000000000000000000000000000000000000000000001597"
29
}
30
}, {
31
"contract": {
32
"address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85"
33
},
34
"id": {
35
"tokenId": "0x80d3ddec2574b25ee9237c0ca14095c163b335a4b48ffcc717ad882954eeff97"
36
}
37
}, {
38
"contract": {
39
"address": "0x3f4a885ed8d9cdf10f3349357e3b243f3695b24a"
40
},
41
"id": {
42
"tokenId": "0x0000000000000000000000000000000000000000000000000000000000001527"
43
}
44
}],
45
"totalCount": 11,
46
"blockHash": "0x94d5ab52b8a6571733f6b183ef89f31573b82a4e78f8129b0ce90ef0beaf208b"
47
}
Copied!

Request (with pagination)

This example request will not return anything in the response since the pageKey expires after 10 minutes.
Curl
JavaScript - Fetch
JavaScript - jQuery
Postman
1
curl 'https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0x8e7644918b3e280fb3b599ca381a4efcb7ade201&pageKey=12e032c5-ce4a-4389-8764-b980e1a17da8'
Copied!
1
var requestOptions = {
2
method: 'GET',
3
redirect: 'follow'
4
};
5
6
fetch("https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0x8e7644918b3e280fb3b599ca381a4efcb7ade201&pageKey=12e032c5-ce4a-4389-8764-b980e1a17da8", requestOptions)
7
.then(response => response.text())
8
.then(result => console.log(result))
9
.catch(error => console.log('error', error));
Copied!
1
var settings = {
2
"url": "https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0x8e7644918b3e280fb3b599ca381a4efcb7ade201&pageKey=12e032c5-ce4a-4389-8764-b980e1a17da8",
3
"method": "GET",
4
"timeout": 0,
5
};
6
7
$.ajax(settings).done(function (response) {
8
console.log(response);
9
});
Copied!
1
URL: https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0x8e7644918b3e280fb3b599ca381a4efcb7ade201&pageKey=12e032c5-ce4a-4389-8764-b980e1a17da8
Copied!

Response (with pagination)

1
{
2
"ownedNfts": [{
3
"contract": {
4
"address": "0x97597002980134bea46250aa0510c9b90d87a587"
5
},
6
"id": {
7
"tokenId": "0x00000000000000000000000000000000000000000000000000000000000009cb"
8
}
9
}, {
10
"contract": {
11
"address": "0x97597002980134bea46250aa0510c9b90d87a587"
12
},
13
"id": {
14
"tokenId": "0x00000000000000000000000000000000000000000000000000000000000009cc"
15
}
16
}, {
17
"contract": {
18
"address": "0x5ab21ec0bfa0b29545230395e3adaca7d552c948"
19
},
20
"id": {
21
"tokenId": "0x00000000000000000000000000000000000000000000000000000000000006dc"
22
}
23
}, {
24
"contract": {
25
"address": "0x3b3ee1931dc30c1957379fac9aba94d1c48a5405"
26
},
27
"id": {
28
"tokenId": "0x000000000000000000000000000000000000000000000000000000000000001a"
29
}
30
}, {
31
"contract": {
32
"address": "0x69c40e500b84660cb2ab09cb9614fa2387f95f64"
33
},
34
"id": {
35
"tokenId": "0x0000000000000000000000000000000000000000000000000000000000000391"
36
}
37
}, {
38
"contract": {
39
"address": "0x97597002980134bea46250aa0510c9b90d87a587"
40
},
41
"id": {
42
"tokenId": "0x00000000000000000000000000000000000000000000000000000000000008d5"
43
}
44
}, {
45
"contract": {
46
"address": "0x97597002980134bea46250aa0510c9b90d87a587"
47
},
48
"id": {
49
"tokenId": "0x0000000000000000000000000000000000000000000000000000000000000a1d"
50
}
51
}, {
52
"contract": {
53
"address": "0x97597002980134bea46250aa0510c9b90d87a587"
54
},
55
"id": {
56
"tokenId": "0x000000000000000000000000000000000000000000000000000000000000002a"
57
}
58
}, {
59
"contract": {
60
"address": "0x97597002980134bea46250aa0510c9b90d87a587"
61
},
62
"id": {
63
"tokenId": "0x000000000000000000000000000000000000000000000000000000000000038e"
64
}
65
}, {
66
"contract": {
67
"address": "0x97597002980134bea46250aa0510c9b90d87a587"
68
},
69
"id": {
70
"tokenId": "0x000000000000000000000000000000000000000000000000000000000000244b"
71
}
72
}],
73
"pageKey": "88434286-7eaa-472d-8739-32a0497c2a18",
74
"totalCount": 277,
75
"blockHash": "0x94d5ab52b8a6571733f6b183ef89f31573b82a4e78f8129b0ce90ef0beaf208b"
76
}
Copied!

Request (with contract filtering)

Only one contract in filter array:
Curl
JavaScript - Fetch
JavaScript - jQuery
Postman
1
curl 'https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&contractAddresses%5B%5D=0x39ed051a1a3a1703b5e0557b122ec18365dbc184'
Copied!
1
var requestOptions = {
2
method: 'GET',
3
redirect: 'follow'
4
};
5
6
fetch("https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&contractAddresses%5B%5D=0x39ed051a1a3a1703b5e0557b122ec18365dbc184", requestOptions)
7
.then(response => response.text())
8
.then(result => console.log(result))
9
.catch(error => console.log('error', error));
Copied!
1
var settings = {
2
"url": "https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&contractAddresses%5B%5D=0x39ed051a1a3a1703b5e0557b122ec18365dbc184",
3
"method": "GET",
4
"timeout": 0,
5
};
6
7
$.ajax(settings).done(function (response) {
8
console.log(response);
9
});
Copied!
1
URL: https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0xfAE46f94Ee7B2Acb497CEcAFf6Cff17F621c693D
2
RequestType: GET
Copied!
Multiple contracts in filter array:
Curl
JavaScript - Fetch
JavaScript - jQuery
Postman
1
curl 'https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0x8e7644918b3e280fb3b599ca381a4efcb7ade201&contractAddresses%5B%5D=0x5ab21ec0bfa0b29545230395e3adaca7d552c948&contractAddresses%5B%5D=0x8f4ca9a9df620ac58152f5369650dbccd006de37'
Copied!
1
var requestOptions = {
2
method: 'GET',
3
redirect: 'follow'
4
};
5
6
fetch("https://eth-mainnet.g.alchemy.com/demo/v1/getNFTs/?owner=0x8e7644918b3e280fb3b599ca381a4efcb7ade201&contractAddresses%5B%5D=0x5ab21ec0bfa0b29545230395e3adaca7d552c948&contractAddresses%5B%5D=0x8f4ca9a9df620ac58152f5369650dbccd006de37", requestOptions)
7
.then(response => response.text())
8
.then(result => console.log(result))
9
.catch(error => console.log('error', error));
Copied!
1
var settings = {
2
"url": "https://eth-mainnet.g.alchemy.com/demo/v1/getNFTs/?owner=0x8e7644918b3e280fb3b599ca381a4efcb7ade201&contractAddresses%5B%5D=0x5ab21ec0bfa0b29545230395e3adaca7d552c948&contractAddresses%5B%5D=0x8f4ca9a9df620ac58152f5369650dbccd006de37",
3
"method": "GET",
4
"timeout": 0,
5
};
6
7
$.ajax(settings).done(function (response) {
8
console.log(response);
9
});
Copied!
1
URL: https://eth-mainnet.g.alchemy.com/your-api-key/v1/getNFTs/?owner=0x8e7644918b3e280fb3b599ca381a4efcb7ade201&contractAddresses%5B%5D=0x5ab21ec0bfa0b29545230395e3adaca7d552c948&contractAddresses%5B%5D=0x8f4ca9a9df620ac58152f5369650dbccd006de37
2
REQUEST: GET
Copied!

Response (with contract filtering)

1
{
2
"ownedNfts": [
3
{
4
"contract": {
5
"address": "0x39ed051a1a3a1703b5e0557b122ec18365dbc184"
6
},
7
"id": {
8
"tokenId": "0x0000000000000000000000000000000000000000000000000000000000000742"
9
},
10
"balance": "1"
11
}
12
],
13
"totalCount": 1,
14
"blockHash": "0x94d5ab52b8a6571733f6b183ef89f31573b82a4e78f8129b0ce90ef0beaf208b"
15
}
Copied!
Last modified 22h ago