curl --request GET \
--url 'https://api.etherscan.io/v2/api?apikey='import requests
url = "https://api.etherscan.io/v2/api?apikey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.etherscan.io/v2/api?apikey=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.etherscan.io/v2/api?apikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.etherscan.io/v2/api?apikey="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.etherscan.io/v2/api?apikey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.etherscan.io/v2/api?apikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "4708120",
"timeStamp": "1512907118",
"hash": "0x031e6968a8de362e4328d60dcc7f72f0d6fc84284c452f63176632177146de66",
"nonce": "0",
"blockHash": "0x4be19c278bfaead5cb0bc9476fa632e2447f6e6259e0303af210302d22779a24",
"from": "0xb1690c08e213a35ed9bab7b318de14420fb57d8c",
"contractAddress": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
"to": "0x6975be450864c02b4613023c2152ee0743572325",
"tokenID": "202106",
"tokenName": "CryptoKitties",
"tokenSymbol": "CK",
"tokenDecimal": "0",
"transactionIndex": "81",
"gas": "158820",
"gasPrice": "40000000000",
"gasUsed": "60508",
"cumulativeGasUsed": "4880352",
"input": "deprecated",
"methodId": "0x454a2ab3",
"functionName": "bid(uint256 _tokenId)",
"confirmations": "18759540"
}
]
}
ERC721 Token Transfers Advanced Filter
Retrieves ERC721 token transfers with advanced from and to address filtering.
curl --request GET \
--url 'https://api.etherscan.io/v2/api?apikey='import requests
url = "https://api.etherscan.io/v2/api?apikey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.etherscan.io/v2/api?apikey=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.etherscan.io/v2/api?apikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.etherscan.io/v2/api?apikey="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.etherscan.io/v2/api?apikey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.etherscan.io/v2/api?apikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "4708120",
"timeStamp": "1512907118",
"hash": "0x031e6968a8de362e4328d60dcc7f72f0d6fc84284c452f63176632177146de66",
"nonce": "0",
"blockHash": "0x4be19c278bfaead5cb0bc9476fa632e2447f6e6259e0303af210302d22779a24",
"from": "0xb1690c08e213a35ed9bab7b318de14420fb57d8c",
"contractAddress": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
"to": "0x6975be450864c02b4613023c2152ee0743572325",
"tokenID": "202106",
"tokenName": "CryptoKitties",
"tokenSymbol": "CK",
"tokenDecimal": "0",
"transactionIndex": "81",
"gas": "158820",
"gasPrice": "40000000000",
"gasUsed": "60508",
"cumulativeGasUsed": "4880352",
"input": "deprecated",
"methodId": "0x454a2ab3",
"functionName": "bid(uint256 _tokenId)",
"confirmations": "18759540"
}
]
}
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "4708120",
"timeStamp": "1512907118",
"hash": "0x031e6968a8de362e4328d60dcc7f72f0d6fc84284c452f63176632177146de66",
"nonce": "0",
"blockHash": "0x4be19c278bfaead5cb0bc9476fa632e2447f6e6259e0303af210302d22779a24",
"from": "0xb1690c08e213a35ed9bab7b318de14420fb57d8c",
"contractAddress": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
"to": "0x6975be450864c02b4613023c2152ee0743572325",
"tokenID": "202106",
"tokenName": "CryptoKitties",
"tokenSymbol": "CK",
"tokenDecimal": "0",
"transactionIndex": "81",
"gas": "158820",
"gasPrice": "40000000000",
"gasUsed": "60508",
"cumulativeGasUsed": "4880352",
"input": "deprecated",
"methodId": "0x454a2ab3",
"functionName": "bid(uint256 _tokenId)",
"confirmations": "18759540"
}
]
}
Authorizations
Enter your Etherscan API key, or set one up if you don't have one.
Query Parameters
Chain ID to query, such as 1 for Ethereum or 42161 for Arbitrum from our supported chains.
Set to account for this endpoint.
Set to tokennfttx for this endpoint.
The ERC721 token contract address to filter transfers by. Provide contractaddress, from, or to.
The sender address to filter transfers by. Provide from, to, or contractaddress.
The recipient address to filter transfers by. Provide to, from, or contractaddress.
Required when from or to is provided. Use and when both addresses must match, or or when either address can match.
Starting block number to search from.
Ending block number to search to, or latest for the latest block.
Sort order, either desc for the latest transactions first or asc for the oldest transactions first.
Page number for pagination.
Number of records per page. Use the page parameter for subsequent records.
Response
Successful response
1 if the request returned data, 0 otherwise. A status of 0 can indicate an error or a valid request that returned no records.
OK on success, otherwise an error description such as NOTOK. See common error messages.
Show child attributes
Show child attributes