Skip to content

api #8

@hethm999

Description

@hethm999

// alchemy-nft-api/fetch-script.js
import fetch from 'node-fetch';

// Setup request options:
var requestOptions = {
method: 'GET',
redirect: 'follow'
};

// Replace with your Alchemy API key:
const apiKey = "demo";
const baseURL = https://eth-mainnet.alchemyapi.io/v2/${apiKey}/getNFTs/;
// Replace with the wallet address you want to query:
const ownerAddr = "0xDCbfdF33A543b1990B8c0A8EF938EB2E40389036";
const fetchURL = ${baseURL}?owner=${ownerAddr};

// Make the request and print the formatted response:
fetch(fetchURL, requestOptions)
.then(response => response.json())
.then(response => JSON.stringify(response, null, 2))
.then(result => console.log(result))
.catch(error => console.log('error', error));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions