isSpamContract
Returns whether a contract is marked as spam or not by Alchemy
This endpoint is currently in BETA.
For more information on how we classify spam, go to our NFT API FAQ.
This endpoint is supported on the following chains and networks:
  • Ethereum: Mainnet
To see chain support across all features, check out the feature matrix.

Parameters

  • contractAddress: string - The NFT contract address in question

Returns

  • boolean -
    • true - if the queried contract is marked as spam
    • false - if the queried contract is considered valid

Example

Request

Fetch (JS)
Axios (JS)
Postman
Curl
1
import fetch from 'node-fetch';
2
3
var requestOptions = {
4
method: 'GET',
5
redirect: 'follow'
6
};
7
8
const apiKey = "demo"
9
const baseURL = `https://eth-mainnet.alchemyapi.io/nft/v2/${apiKey}/isSpamContract`;
10
const contractAddr = "0x000440f08436a7b866d1ae42db5e0be801da722a";
11
const fetchURL = `${baseURL}?contractAddress=${contractAddr}`;
12
13
fetch(fetchURL, requestOptions)
14
.then(response => response.json())
15
.then(response => JSON.stringify(response, null, 2))
16
.then(result => console.log(result))
17
.catch(error => console.log('error', error));
Copied!
1
import axios from 'axios';
2
3
// replace with your Alchemy api key
4
const apiKey = "demo";
5
const baseURL = `https://eth-mainnet.alchemyapi.io/nft/v2/${apiKey}/isSpamContract`;
6
const contractAddr = "0x000440f08436a7b866d1ae42db5e0be801da722a";
7
8
var config = {
9
method: 'get',
10
url: `${baseURL}?contractAddress=${contractAddr}`,
11
headers: { }
12
};
13
14
axios(config)
15
.then(response => console.log(JSON.stringify(response.data, null, 2)))
16
.catch(error => console.log(error));
Copied!
1
URL: https://eth-mainnet.g.alchemy.com/nft/v2/demo/isSpamContract?contractAddress=0x000440f08436a7b866d1ae42db5e0be801da722a
2
RequestType: GET
Copied!
1
curl --location --request GET 'https://eth-mainnet.g.alchemy.com/nft/v2/demo/isSpamContract?contractAddress=0x000440f08436a7b866d1ae42db5e0be801da722a' \
2
--data-raw ''
Copied!
If you're having trouble running requests via Alchemy Web3.js, Fetch, or Axios, please refer to: NFT API Quickstart Guide

Response

1
true
Copied!