getSpamContracts
Returns a list of all spam contracts marked 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

None

Returns

  • array - A list of contract addresses earmarked as spam by Alchemy

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}/getSpamContracts`;
10
const fetchURL = `${baseURL}`;
11
12
fetch(fetchURL, requestOptions)
13
.then(response => response.json())
14
.then(response => JSON.stringify(response, null, 2))
15
.then(result => console.log(result))
16
.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}/getSpamContracts`;
6
7
var config = {
8
method: 'get',
9
url: `${baseURL}`,
10
headers: { }
11
};
12
13
axios(config)
14
.then(response => console.log(JSON.stringify(response.data, null, 2)))
15
.catch(error => console.log(error));
Copied!
1
URL: https://eth-mainnet.g.alchemy.com/nft/v2/demo/getSpamContracts
2
RequestType: GET
Copied!
1
curl --location --request GET 'https://eth-mainnet.g.alchemy.com/nft/v2/demo/getSpamContracts' \
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
[
2
"0xfeb1eb12d2d0ce87fbde2d500f4de990c51b811e",
3
"0xfec64651c8b441f2526b1a54febb2122124bf041",
4
"0xfec8b3fe93308ea2bd07aa8835ed75d566a901ab",
5
"0xfed54f882b0e013e3a12eb4b97884bc0b19f806c",
6
"0xfee27fb71ae3feeef2c11f8e02037c42945e87c4",
7
"0xfee5f54e1070e7ed31be341e0a5b1e847f6a84ab",
8
"0xfefbf538c853e92f1c448f6fda8ac5c354844f69",
9
......................
10
"0xffb0b6b3845c79c4d1fb54552ac6f5fef96c18fd",
11
"0xffbf7dd41696c07c1ae0e7d94bb36d9e66de087e",
12
"0xffc580a1664e22dce34819621ff292463fa2093f",
13
"0xffce5f9b3ef3ea9ab68591ea268d36c8f216bd02",
14
"0xffda3686e658863820f3972517ea21bc14267af5",
15
"0xffe572aee5cded696f617125aa66b9746960f4ec",
16
"0xfff46beea0dca55cc6bf39ec48e559160191093e",
17
"0xfff54e6fe44fd47c8814c4b1d62c924c54364ad3"
18
]
Copied!