# NFTPort Developer Documentation for NFT Data and Minting APIs Documentation > Welcome to NFTPort, the premier API for NFTs (non-fungible tokens) that allows you to mint and gather high-quality data for your projects. From simple queries to advanced collection stats, there's something for everyone at NFTport. ## Guides - [Welcome](https://docs.nftport.xyz/docs/welcome-to-nftport.md): One-Stop, Simple and Developer-Friendly NFT Infrastructure & APIs to help developers bring their NFT applications to market in hours instead of months. - [Quickstart](https://docs.nftport.xyz/docs/multi-chain-nft-data-quickstart.md) - [Implement Search](https://docs.nftport.xyz/docs/enhanced-apis-quickstart.md) - [Authentication](https://docs.nftport.xyz/docs/authentication.md) - [Error Codes](https://docs.nftport.xyz/docs/error-codes.md) - [Rate Limiting](https://docs.nftport.xyz/docs/rate-limits-and-quotas.md) - [By Chain Features](https://docs.nftport.xyz/docs/chain-support.md) - [Royalties](https://docs.nftport.xyz/docs/royalties.md) - [Contract Comparison](https://docs.nftport.xyz/docs/contract-comparison.md) - [Quickstart](https://docs.nftport.xyz/docs/minting-quickstart.md) - [Create a Collection](https://docs.nftport.xyz/docs/how-to-create-an-nft-collection-contract.md) - [Create a Dynamic NFT](https://docs.nftport.xyz/docs/how-to-create-dynamic-nfts.md) - [Integrate Roblox](https://docs.nftport.xyz/docs/how-to-use-nftport-inside-roblox.md) - [Sample Data](https://docs.nftport.xyz/docs/sampleaddresses.md) - [Connect Web3 Wallets](https://docs.nftport.xyz/docs/how-to-connect-metamask-with-your-app.md) - [Postman Collection](https://docs.nftport.xyz/docs/postman-collection-1.md): Effortlessly use the NFTPort API with our comprehensive Postman collection - [OpenAPI](https://docs.nftport.xyz/docs/openapi-1.md): Go straight to the source and get to know the NFTPort OpenAPI - [API Status](https://docs.nftport.xyz/docs/api-status-1.md): 99.5% of the time NFTPort's API is fully operational; 80% of the endpoints boast 99.9% uptime or better. ## API Reference - [Retrieve contract NFTs](https://docs.nftport.xyz/reference/retrieve-contract-nfts.md): Returns all NFTs for a given contract address. Can be set to ```include``` the NFT ```metadata```, ```file_information```, ```rarity```, ```last_sale_price``` or ```all``` which returns extra information. Ethereum, Polygon and Goerli are supported. #### Useful for: * Importing all NFTs from a given contract to your application. #### Related: * For a quick start, see the [List of sample addresses](../docs/About/SampleAddresses.md) to copy. * To get detailed information on the returned NFTs, see [Retrieve NFT details](../1.json/paths/~1v0~1nfts~1{contract_address}~1{token_id}/get). * To get NFTs that a given account owns, see [Retrieve NFTs owned by an account](../1.json/paths/~1v0~1accounts~1{account_address}/get). - [Retrieve NFT details](https://docs.nftport.xyz/reference/retrieve-nft-details.md): Returns details for a given NFT. These include ```metadata_url```, ```metadata``` such as name, description, attributes, etc., ```file_url```, ```cached_file_url``` and ```mint_date```. Ethereum, Polygon and Goerli are supported. #### Useful for: * For easily getting all the necessary information about a given NFT. #### Related: * For a quick start, see the [List of sample addresses and token IDs](../docs/About/SampleAddresses.md) to copy. * To get all NFTs per contract, see [Retrieve contract NFTs](../1.json/paths/~1v0~1nfts~1{contract_address}/get). * To get NFTs that a given account owns, see [Retrieve NFTs owned by an account](../1.json/paths/~1v0~1accounts~1{account_address}/get). - [Retrieve NFTs owned by an account](https://docs.nftport.xyz/reference/retrieve-nfts-owned-by-account.md): Returns NFTs owned by a given account (i.e. wallet) address. Can also return each NFT metadata with ```include``` parameter. #### Useful for: * For checking if a user owns a specific NFT and then unlocking specific activity. * Adding NFT portfolio section to your apps. #### Related: * For a quick start, see the [List of sample addresses](../docs/About/SampleAddresses.md) to copy. * To get all NFTs per contract, see [Retrieve contract NFTs](../1.json/paths/~1v0~1nfts~1{contract_address}/get). * To get extra detailed information on the returned NFTs, see [Retrieve NFT details](../1.json/paths/~1v0~1nfts~1{contract_address}~1{token_id}/get). - [Retrieve contracts owned by an account](https://docs.nftport.xyz/reference/retrieve-contracts-owned-by-account.md): Returns a list of contracts (i.e. collections) based on `type` of ownership: 1. `owns_contract_nfts`- the given account (wallet) address owns at least one NFT. 2. `owns_contracts`- the given account (wallet) address is the owner of the contract. #### Useful for: * Showing the user a list of contracts in which they own NFTs. * Showing the user a list of contracts owned by them. * Checking if a user owns an NFT in a specific collections and then unlocking some experience for them, i.e. token-gating. (You are still responsible for validating that the user owns the wallet.) #### Related: * For a quick start, see the [List of sample addresses](../docs/About/SampleAddresses.md) to copy. * To get a list of all NFTs owned by this account, see [Retrieve NFTs owned by account](../1.json/paths/~1v0~1accounts~1{account_address}/get). * To get extra detailed information on the returned NFTs, see [Retrieve NFT details](../1.json/paths/~1v0~1nfts~1{contract_address}~1{token_id}/get). - [Retrieve transactions by an account](https://docs.nftport.xyz/reference/retrieve-transactions-owned-by-account.md): Returns all on-chain transactions (Contract specific/OS Seaport/LooksRare/X2Y2/Rarible/CryptoPunks) as well as Seaport listings for the specified account (i.e. wallet) address. Can be set to `include` transactions such as `mint`, `burn`, `transfer_from`, `transfer_to`, `buy`, `sell`, `list` or `all` which includes all transactions. Ethereum and Polygon mainnet is supported. #### Useful for: * Tracking all transactions made by an account. * Building analytics and monitoring solutions. #### Related: * For a quick start, see the [List of sample addresses](../docs/About/SampleAddresses.md) to copy. * To query transactions from a contract, see [Retrieve transactions by contract](../1.json/paths/~1v0~1transactions~1nfts~1{contract_address}/get). * To query transactions for an NFT, see [Retrieve transactions by NFT](../1.json/paths/~1v0~1transactions~1nfts~1{contract_address}~1{token_id}/get). - [Retrieve transactions by NFT](https://docs.nftport.xyz/reference/retrieve-transactions-owned-by-nft.md): Returns all on-chain transactions (Contract specific/OS Seaport/LooksRare/X2Y2/Rarible/CryptoPunks) as well as Seaport listings for the specified NFT token. Can be set to `include` transactions such as `transfer`, `burn`, `mint`, `sale` and `list`, or `all` which includes all transactions. Ethereum and Polygon mainnet is supported. #### Useful for: * Tracking all transactions of an NFT token. * Building analytics and monitoring solutions. #### Related: * For a quick start, see the [List of sample addresses and token IDs](../docs/About/SampleAddresses.md) to copy. * To query transactions from a contract, see [Retrieve transactions by contract](../1.json/paths/~1v0~1transactions~1nfts~1{contract_address}/get). * To query transactions from an account, see [Retrieve transactions by account](../1.json/paths/~1v0~1transactions~1accounts~1{account_address}/get). - [Retrieve transactions by contract](https://docs.nftport.xyz/reference/retrieve-transactions-by-contract.md): Returns all on-chain transactions (Contract specific/OS Seaport/LooksRare/X2Y2/Rarible/CryptoPunks) as well as Seaport listings for the specified contract. Can be set to `include` transactions such as `transfer`, `burn`, `mint`, `sale` and `list`, or `all` which includes all transactions. Ethereum and Polygon mainnet is supported. #### Useful for: * Tracking all transactions of all NFT tokens in a contract. * Building analytics and monitoring solutions. #### Related: * For a quick start, see the [List of sample addresses](../docs/About/SampleAddresses.md) to copy. * To query sales statistics of an NFT collection, see [Retrieve contract sales statistics](../1.json/paths/~1v0~1transactions~1stats~1{contract_address}/get). * To query transactions for an NFT, see [Retrieve transactions by NFT](../1.json/paths/~1v0~1transactions~1nfts~1{contract_address}~1{token_id}/get). * To query transactions from an account, see [Retrieve transactions by account](../1.json/paths/~1v0~1transactions~1accounts~1{account_address}/get). - [Retrieve contract sales statistics](https://docs.nftport.xyz/reference/retrieve-contract-sales-statistics.md): Retrieve in-depth sales statistics about a contract from OpenSea. Includes statistics such as floor price, total volume, sales, etc. Updated with 1-hour interval. #### Useful for: * Analysis and ranking of NFT collections. * Tracking NFT collections by sales, etc. #### Related: * For a quick start, see the [List of sample addresses](../docs/About/SampleAddresses.md) to copy. * To query transactions from a contract, see [Retrieve transactions by contract](../1.json/paths/~1v0~1transactions~1nfts~1{contract_address}/get). * To get all NFTs of a contract, see [Retrieve contract NFTs](../1.json/paths/~1v0~1nfts~1{contract_address}/get). - [Update a deployed contract for NFT products](https://docs.nftport.xyz/reference/update-nft-product-contract.md): Updates a contract which has been previously deployed with [Deploy a contract for NFT products](../3.json/paths/~1v0~1contracts/post). You can freeze the metadata of the NFTs minted in the specified contract which means they can not be updated after minting (token URIs are frozen on the contract level). #### Useful for: * Creating dynamic NFTs (NFTs that change after minting based on events) and freezing them afterwards. * Revealing NFTs after a drop and freezing them afterwards. #### Related: * If you wish to list all your previously deployed contracts, see [List all your deployed contracts](../3.json/paths/~1v0~1me~1contracts/get). - [Deploy a contract for NFT products](https://docs.nftport.xyz/reference/deploy-nft-product-contract.md): Deploys an [```ERC-721```](https://github.com/nftport/solidity-contracts/blob/master/contracts/templates/ERC721NFTProduct.sol) or [```ERC-1155```](https://github.com/nftport/solidity-contracts/blob/master/contracts/templates/ERC1155NFTProduct.sol) smart contract where your can mint your NFTs on-demand. The supply of NFTs is not fixed; more can be minted into this contract at any point in the future. This is a required step if you wish to use [Customizable minting](../3.json/paths/~1v0~1mints~1customizable/post) as your NFTs will be minted into this contract. As blockchains can take a few seconds up to a few minutes to sync, then after contract deployment, you can use the returned ```transaction_hash``` in [Retrieve a deployed contract](../3.json/paths/~1v0~1contracts~1{transaction_hash}/get) to get the ```contract_address```. **You can deploy up to 5 contracts for free per chain. For higher limits, see [pricing](https://www.nftport.xyz/pricing).** #### Useful for: * Deploying your own contracts so you easily can build custom products. #### Related: * To get the deployed contract address, use [Retrieve a deployed contract](../3.json/paths/~1v0~1contracts~1{transaction_hash}/get). * If you want to know how to use the customizable minting, see [Customizable Minting Quickstart](docs/minting/Minting-Quickstart.md#customizable-minting). * To understand the difference between NFT product contracts and NFT collection contracts, see [Contract comparison](docs/Introduction/Contract-comparison.md). Read how **royalties** work [here](docs/About/Royalties.md). - [Retrieve a deployed contract](https://docs.nftport.xyz/reference/retrieve-nft-collection-contract.md): Returns the details of a contract that has previously been deployed with [Deploy a contract for NFT products](../3.json/paths/~1v0~1contracts/post) or [Deploy an NFT collection contract](../3.json/paths/~1v0~1contracts~1collections/post). Supply the ```transaction_hash``` to check if the contract is on chain and to get the ```contract_address```. For NFT product contracts, you can use the returned ```contract_address``` in [Customizable Minting](../3.json/paths/~1v0~1mints~1customizable/post). As blockchains can take a few seconds up to a few minutes to sync, this endpoint can be polled until the ```contract_address``` is returned. #### Useful for: * Deploying your own contracts so you can build custom products or collections easily. #### Related: * If you want to get data about NFT contracts which you haven't deployed using NFTPort, see [Retrieve contract NFTs](../1.json/paths/~1v0~1nfts~1{contract_address}/get). * If you want to learn how to use the [customizable minting](../3.json/paths/~1v0~1mints~1customizable/post), see [Customizable Minting Quickstart](docs/minting/Minting-Quickstart.md#customizable-minting). - [Retrieve a minted NFT](https://docs.nftport.xyz/reference/get_minted_nft_v0_mints__transaction_hash__get.md): Returns the details of a minted NFT. You need to provide ```transaction_hash``` which is returned from [Easy minting w/URL](../3.json/paths/~1v0~1mints~1easy~1urls/post), [Easy minting w/file upload](../3.json/paths/~1v0~1mints~1easy~1files/post) or [Customizable minting](../3.json/paths/~1v0~1mints~1customizable/post). Minting is not instantaneous because blockchains take time to verify transactions. Thus, you can poll this endpoint every 5 seconds until you get a response. #### Useful for: * Confirming that NFT minting was successful and the NFT is on chain. #### Related: * For easy minting, see [Easy minting w/URL](../3.json/paths/~1v0~1mints~1easy~1urls/post) or [Easy minting w/file upload](../3.json/paths/~1v0~1mints~1easy~1files/post). * For customizable minting, see [Customizable minting](../3.json/paths/~1v0~1mints~1customizable/post). * If you wish to list all your previously minted NFTs, see [List all your minted NFTs](../3.json/paths/~1v0~1me~1mints/get). * To see all your previous IPFS uploads, see [List all your IPFS uploads](../3.json/paths/~1v0~1me~1storage/get). - [Update a deployed collection contract](https://docs.nftport.xyz/reference/update-nft-collection-contract.md): Updates a collection contract which has been previously deployed with [Deploy an NFT collection contract](../3.json/paths/~1v0~1contracts~1collections/post). You can change the reveal dates, metadata location, presale time and whitelist, or royalty details. You can also freeze the metadata of the NFTs minted in the specified contract so metadata cannot be updated any more (token URIs are frozen on the contract level). **Ethereum contract updates are available only on the Growth or Scale tier and you will be charged immediately on request and if the transaction fails for any reason the amount will be refunded. For higher limits, see [pricing](https://www.nftport.xyz/pricing).** #### Useful for: * Revealing NFTs at a specified time and freezing them afterwards. * Allowing a limited group of people to mint NFTs during a presale period. * Changing royalty amount and recipient. #### Related: * If you wish to list all your previously deployed collection contracts, see [List all your deployed collection contracts](../3.json/paths/~1v0~1me~1contracts~1collections/get). - [Deploy an NFT collection contract](https://docs.nftport.xyz/reference/deploy-nft-collection-contract.md): Deploys a [fixed-supply ERC-721 smart contract](https://github.com/nftport/solidity-contracts/blob/master/contracts/templates/NFTCollection.sol), commonly used for launching NFT collections. As blockchains can take a few seconds up to a few minutes to sync, then after contract deployment, you can use the returned ```transaction_hash``` in [Retrieve a deployed contract](../3.json/paths/~1v0~1contracts~1{transaction_hash}/get) to get the ```contract_address```. **You can deploy up to 5 contracts for free on each of Polygon and Goerli, and ```max_supply``` is limited to less than or equal to 5,000 NFTs for collection contracts deployed on the Free plan. Ethereum contract deployments are available only on the Growth or Scale tier and you will be charged immediately on request and if the transaction fails for any reason the amount will be refunded. For details and limits, see [pricing](https://www.nftport.xyz/pricing).** #### Useful for: * Launching an NFT collection (e.g. a 10,000 profile pictures collection) with a minting website. **See our [tutorial](docs/minting/How-to-create-an-NFT-collection-contract.md) to learn how to create an NFT contract collection and make a website to allows users to mint.** #### Related: * To get the deployed contract address, use [Retrieve a deployed contract](../3.json/paths/~1v0~1contracts~1{transaction_hash}/get). * If you wish to list all your previously deployed collection contracts, see [List all your deployed collection contracts](../3.json/paths/~1v0~1me~1contracts~1collections/get). * The contract ABI can be fetched using the [Get contract ABI](../3.json/paths/~1v0~1me~1contracts~1abis~1{contract_address}/get) endpoing. Read how **royalties** work [here](docs/About/Royalties.md). - [Upload a file to IPFS](https://docs.nftport.xyz/reference/upload-file-to-ipfs.md): Uploads a file to [IPFS](https://docs.ipfs.io/concepts/what-is-ipfs/) which makes your NFT storage easy. You can use the returned ```ipfs_url``` with [Upload metadata to IPFS](../3.json/paths/~1v0~1metadata/post) to mint your NFT. If you prefer hosting files in your own servers, you can skip this step. Otherwise, we recommend using IPFS because it's an industry standard for decentralized storage and guarantees the immutability of your files. We use [nft.storage](https://nft.storage/) to [pin](https://docs.ipfs.io/how-to/pin-files/) the files with Filecoin, which ensures that your important data is retained in IPFS. **Supports all file types and maximum file size is 50MB. For higher limits, see [pricing](https://www.nftport.xyz/pricing).** #### Useful for: * Storing your NFT files easily and according to the industry standards. #### Related: * To see all your previous IPFS uploads, see [List all your IPFS uploads](../3.json/paths/~1v0~1me~1storage/get). * After uploading files, use [Upload metadata to IPFS](../3.json/paths/~1v0~1metadata/post) to continue with your NFT minting. * If you want to learn how to use the [customizable minting](../3.json/paths/~1v0~1mints~1customizable/post), see [Customizable Minting Quickstart](docs/minting/Minting-Quickstart.md#customizable-minting). #### Example Requests in cURL, Python & JS ```shell curl --request POST \ --url 'https://api.nftport.xyz/v0/files' \ --header 'Authorization: API Key Here' \ --header 'Content-Type: multipart/form-data' \ --form 'file=@/path/to/file_to_upload.png;type=image/png' ``` ```python import requests file = open("image.png", "rb") response = requests.post( "https://api.nftport.xyz/v0/files", headers={"Authorization": 'API-Key-Here'}, files={"file": file} ) ``` ```javascript const fs = require('fs'); const fetch = require('node-fetch'); const FormData = require('form-data'); const form = new FormData(); const fileStream = fs.createReadStream('image.jpg'); form.append('file', fileStream); const options = { method: 'POST', body: form, headers: { "Authorization": "API-Key-Here", }, }; fetch("https://api.nftport.xyz/v0/files", options) .then(response => { return response.json() }) .then(responseJson => { // Handle the response console.log(responseJson); }) ``` - [Upload metadata to IPFS](https://docs.nftport.xyz/reference/upload-metadata-to-ipfs.md): Uploads NFT metadata to [IPFS](https://docs.ipfs.io/concepts/what-is-ipfs/) as a JSON file which is the standard format for [NFT metadata](https://nftschool.dev/reference/metadata-schemas/#intro-to-json-schemas). You can use the returned ```metadata_ipfs_uri``` in [Customizable minting](../3.json/paths/~1v0~1mints~1customizable/post) to mint your NFT. If you prefer hosting metadata in your own servers, you can skip this step. Otherwise, we recommend using IPFS because it’s an industry standard for decentralized storage and guarantees the immutability of your metadata. For the ```file_url```, we also recommend using IPFS with [Upload a file to IPFS](../3.json/paths/~1v0~1files/post). We use [nft.storage](https://nft.storage/) to [pin](https://docs.ipfs.io/how-to/pin-files/) the files with Filecoin, which ensures that your important data is retained in IPFS. #### Useful for: * Storing your NFT metadata easily and according to the industry standards. #### Related: * To see all your previous IPFS uploads, see [List all your IPFS uploads](../3.json/paths/~1v0~1me~1storage/get). * After uploading your metadata, use [Customizable minting](../3.json/paths/~1v0~1mints~1customizable/post) to continue with your NFT minting. * If you are new to NFT metadata, see the [basics on it](https://nftschool.dev/reference/metadata-schemas/). - [Upload metadata directory to IPFS](https://docs.nftport.xyz/reference/upload-metadata-directory-to-ipfs.md): Uploads an array of JSON files containing NFT metadata to [IPFS](https://docs.ipfs.io/concepts/what-is-ipfs/). The output is an IPFS URI of a directory containing the uploaded JSON files. The IPFS URI of this directory will be used as the `base_uri` in [Collection contract](../3.json/paths/~1v0~1contracts~1collections/post). IPFS is an industry standard for decentralized storage and guarantees the immutability of your metadata. For the ```file_url```, we also recommend using IPFS with [Upload a file to IPFS](../3.json/paths/~1v0~1files/post). We use [nft.storage](https://nft.storage/) to [pin](https://docs.ipfs.io/how-to/pin-files/) the files with Filecoin, which ensures that your important data is retained in IPFS. **Supports only files with [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) as application/json.** **Maximum number of files that can be uploaded together is 25,000 and maximum total file size is 50MB** > ### Note: > * All metadata files must be uploaded at once since IPFS creates a unique immutable hash of all files in the directory. > * To work with [Collection contracts](../3.json/paths/~1v0~1contracts~1collections/post), the filenames should be token IDs starting from 0. > * The file extension will be removed and only the filename will be retained in the IPFS directory (eg: '4521.json' will become '4521' on IPFS). > * All files will be placed at the base of the directory. #### Useful for: * Uploading a directory of metadata files to IPFS. #### Related: * To see all your previous IPFS uploads, see [List all your IPFS uploads](../3.json/paths/~1v0~1me~1storage/get). * If you are new to NFT metadata, see the [basics on it](https://nftschool.dev/reference/metadata-schemas/). ```python title="This script uploads all JSON files in the 'Metadata' directory to IPFS" import requests import os from os import listdir from os.path import join metadata_directory_path = "Metadata" #Replace with your path files = [f for f in listdir(metadata_directory_path) if str(join(metadata_directory_path, f)).endswith('.json')] metadata_files = [] for metadata in files: metadata_files.append( ("metadata_files", open(os.path.join(metadata_directory_path, metadata), "rb"))) response = requests.post( "https://api.nftport.xyz/v0/metadata/directory", headers={"Authorization": "Your-API-Key"}, files=metadata_files ) print(response.json()) ``` ```javascript title="This script uploads all JSON files in the 'Metadata' directory to IPFS" const fs = require('fs'); const path = require('path') const request = require('request'); API_KEY = "YOUR_API_KEY" // Replace with your API key METADATA_DIRECTORY_PATH = "Metadata" // Replace with your path to directory folder containing metadata json files function isJson(filename) { return filename.split('.').pop() === "json" } function getFileStreamForJSONFiles(directory) { const jsonArray = [] fs.readdirSync(directory).forEach(file => { if(!isJson(file)) { return } const fileData = fs.createReadStream(path.join(directory, file)); jsonArray.push(fileData) }); return jsonArray } function sendRequest(metadataFileStreams, apiKey) { const options = { url: 'https://api.nftport.xyz/v0/metadata/directory', headers: { "Authorization": apiKey } } const req = request.post(options, function (err, resp, body) { if (err) { console.error('Error: ' + err); } else { console.log('Response: ' + body); } }); const form = req.form(); metadataFileStreams.forEach(file => { form.append('metadata_files', file); }) } metadataFileStreams = getFileStreamForJSONFiles(METADATA_DIRECTORY_PATH) sendRequest(metadataFileStreams, API_KEY) ``` - [Update a minted NFT](https://docs.nftport.xyz/reference/update-minted-nft.md): Updates an NFT which has been previously minted with [Customizable minting](../3.json/paths/~1v0~1mints~1customizable/post) or [Batch customizable minting](../3.json/paths/~1v0~1mints~1customizable~1batch/post). You can update the metadata URI with a new link or freeze the metadata URI to permanently lock it. The NFT must be minted in your deployed contract and update only works if contract and token are not frozen. 1. First, you need ```contract_address``` from [Deploy a contract for NFT products](../3.json/paths/~1v0~1contracts/post) and ```metadata_updatable``` must be set ```true```. 2. Secondly, you need ```token_id``` from [Customizable minting](../3.json/paths/~1v0~1mints~1customizable/post) or [Batch customizable minting](../3.json/paths/~1v0~1mints~1customizable~1batch/post). 3. If you only wish to update the metadata URI set a new ```metadata_uri```. If you wish to update metadata URI and freeze both at the same time then set a new ```metadata_uri``` and ```freeze_metadata``` as ```true```. If you only want to freeze existing metadata URI, then set ```freeze_metadata``` as ```true```. #### Useful for: * Creating dynamic NFTs (NFTs that change after minting based on events). * Revealing NFTs after the drop. #### Related: * If you want to learn how to use [customizable minting](../3.json/paths/~1v0~1mints~1customizable/post), see [Customizable Minting Quickstart](docs/minting/Minting-Quickstart.md#customizable-minting). * If you wish to list all your previously minted NFTs, see [List all your minted NFTs](../3.json/paths/~1v0~1me~1mints/get). - [Customizable minting](https://docs.nftport.xyz/reference/customizable-minting.md): Mints an NFT to your previously deployed contract for NFT products. This minting consists of multiple steps and enables you to customize the whole minting flow for your exact needs. 1. First, you need ```contract_address``` using [Deploy a contract for NFT products](../3.json/paths/~1v0~1contracts/post). 2. Secondly, you need ```metadata_uri``` using [Upload metadata to IPFS](../3.json/paths/~1v0~1metadata/post). After minting, the NFT will appear in the ```mint_to_address``` wallet. If you minted to your own wallet, you can also see the minted NFT on OpenSea in your profile after a few minutes. **You can mint up to 100 NFTs for free per chain. Maximum supported filesize is 50MB. For higher limits, see [pricing](https://www.nftport.xyz/pricing).** #### Useful for: * Minting to your own product contracts effortlessly. * Creating customizable minting flows which enable to build NFT-based products. #### Related: * If you want to learn how to use [customizable minting](../3.json/paths/~1v0~1mints~1customizable/post), see [Customizable Minting Quickstart](docs/minting/Minting-Quickstart.md#customizable-minting). * If you wish to list all your previously minted NFTs, see [List all your minted NFTs](../3.json/paths/~1v0~1me~1mints/get). * To see all your previous IPFS uploads, see [List all your IPFS uploads](../3.json/paths/~1v0~1me~1storage/get). - [Burn a minted NFT](https://docs.nftport.xyz/reference/burn-minted-nft.md): Burns an NFT which has been previously minted with [Customizable minting](../3.json/paths/~1v0~1mints~1customizable/post). Burning an NFT means destroying it by sending it to a null (un-spendable) address. Transactions leading up to the burn will remain on the blockchain. **Note**: Burning is possible only if the token is owned by the contract owner and the token has not been transferred/sold yet. #### Related: * If you want to update a minted NFT, see [Update a minted NFT](../3.json/paths/~1v0~1mints~1customizable/put). * If you want to burn a batch of NFTs, see [Batch burn minted NFTs](../3.json/paths/~1v0~1mints~1customizable~1batch/delete). - [Transfer a minted NFT](https://docs.nftport.xyz/reference/transfer-minted-nft.md): Transfers an NFT which has been previously minted with [Customizable minting](../3.json/paths/~1v0~1mints~1customizable/post) to another wallet address. **Note**: Transferring is possible only if the token is owned by the contract owner and the token has not been transferred/sold yet. #### Related: * If you want to update a minted NFT, see [Update a minted NFT](../3.json/paths/~1v0~1mints~1customizable/put). * If you want to transfer a batch of NFTs, see [Batch transfer minted NFTs](../3.json/paths/~1v0~1mints~1transfers~1batch/post). - [Batch customizable minting (ERC1155)](https://docs.nftport.xyz/reference/batch-customizable-minting.md): Batch mints NFTs to your previously deployed ERC1155 NFT product contract. This minting consists of multiple steps and enables you to customize the whole minting flow for your exact needs. Batch minting allows you to create multiple NFTs with one API call and create more than one of the same token. 1. First, you need ```contract_address``` using [Deploy a contract for NFT products](../3.json/paths/~1v0~1contracts/post). 2. Secondly, you need ```metadata_uri``` using [Upload metadata to IPFS](../3.json/paths/~1v0~1metadata/post). After minting, the NFTs will appear in the ```mint_to_address``` wallet. If you minted to your own wallet, you can also see the minted NFTs on OpenSea in your profile after a few minutes. **You can mint up to 100 NFTs for free per chain. Maximum supported filesize is 50MB. For higher limits, see [pricing](https://www.nftport.xyz/pricing).** #### Useful for: * Minting to your own NFT product contracts effortlessly. * Creating customizable minting flows which enable to build NFT-based products. #### Related: * If you want to learn how to use [customizable minting](../3.json/paths/~1v0~1mints~1customizable/post), see [Customizable Minting Quickstart](docs/minting/Minting-Quickstart.md#customizable-minting). * If you wish to list all your previously minted NFTs, see [List all your minted NFTs](../3.json/paths/~1v0~1me~1mints/get). * To see all your previous IPFS uploads, see [List all your IPFS uploads](../3.json/paths/~1v0~1me~1storage/get). - [Batch burn minted NFTs (ERC1155 only)](https://docs.nftport.xyz/reference/batch-burn-minted-nfts.md): Burns a batch of NFTs which have been previously minted with [Batch customizable minting](../3.json/paths/~1v0~1mints~1customizable~1batch/post). Burning an NFT means destroying it by sending it to a null (un-spendable) address. Transactions leading up to the burn will remain on the blockchain. **Note**: Burning is possible only if the token is owned by the contract owner and the token has not been transferred/sold yet. #### Related: * If you want to update a minted NFT, see [Update a minted NFT](../3.json/paths/~1v0~1mints~1customizable/put). * If you want to burn a single NFT, see [Burn a minted NFT](../3.json/paths/~1v0~1mints~1customizable/delete). - [Batch transfer minted NFTs (ERC1155 only)](https://docs.nftport.xyz/reference/batch-transfer-minted-nfts.md): Transfers a batch of NFTs which have been previously minted with [Batch customizable minting](../3.json/paths/~1v0~1mints~1customizable~1batch/post) to other wallet addresses. **Note**: Transferring is possible only if the token is owned by the contract owner and the token has not been transferred/sold yet. #### Related: * If you want to update a minted NFT, see [Update a minted NFT](../3.json/paths/~1v0~1mints~1customizable/put). * If you want to transfer a single NFTs, see [Transfer a minted NFT](../3.json/paths/~1v0~1mints~1transfers/post). - [Retrieve batch minted NFTs](https://docs.nftport.xyz/reference/get_batch_minted_nft_v0_mints_batch__transaction_hash__get.md): Returns the details of a batch minted NFTs for ERC1155 contracts. You need to provide ```transaction_hash``` which is returned from [Batch customizable minting](../3.json/paths/~1v0~1mints~1customizable~1batch/post). Minting is not instantaneous because blockchains take time to verify transactions. Thus, you can poll this endpoint every 5 seconds until you get a response. #### Useful for: * Confirming that NFT minting was successful and the NFTs are on chain. #### Related: * For batch customizable minting, see [Batch customizable minting](../3.json/paths/~1v0~1mints~1customizable~1batch/post). - [Easy minting w/URL](https://docs.nftport.xyz/reference/easy-minting-urls.md): With Easy mint, you can turn anything into an NFT in less than 5 minutes using one simple API call. If you are new to minting, see [Easy minting quickstart](docs/minting/Minting-Quickstart.md#easy-minting). After minting, the NFT will appear in the ```mint_to_address``` wallet. If you minted to your own wallet, you can also see the minted NFT on OpenSea in your profile after a few minutes. **You can mint up to 100 NFTs for free per chain. Maximum supported file size is 50MB. For higher limits, see [pricing](https://www.nftport.xyz/pricing).** #### Useful for: * For turning anything into an NFT effortlessly. For all the benefits, see [Your New Minting Superpowers](docs/minting/Minting-Quickstart.md#what-you-can-do-with-your-new-minting-superpowers). #### Related: * If you wish to customize the minting process e.g. use your own contract, see [Customizable minting](docs/minting/Minting-Quickstart.md#advanced-minting-apis). * If you wish to list all your previously minted NFTs, see [List all your minted NFTs](../3.json/paths/~1v0~1me~1mints/get). - [Easy minting w/file upload](https://docs.nftport.xyz/reference/easy-minting-file-upload.md): With Easy mint, you can turn anything into an NFT in less than 5 minutes using one simple API call. If you are new to minting, see [Easy minting quickstart](docs/minting/Minting-Quickstart.md#easy-minting). After minting, the NFT will appear in the ```mint_to_address``` wallet. If you minted to your own wallet, you can also see the minted NFT on OpenSea in your profile after a few minutes. **You can mint up to 100 NFTs for free per chain. Maximum supported file size is 50MB. For higher limits, see [pricing](https://www.nftport.xyz/pricing).** #### Useful for: * For turning anything into an NFT effortlessly. For all the benefits, see [Your New Minting Superpowers](docs/minting/Minting-Quickstart.md#what-you-can-do-with-your-new-minting-superpowers). #### Related: * If you wish to customize the minting process e.g. use your own contract, see [Customizable minting](docs/minting/Minting-Quickstart.md#advanced-minting-apis). * If you wish to list all your previously minted NFTs, see [List all your minted NFTs](../3.json/paths/~1v0~1me~1mints/get). #### Example Requests in cURL, Python & JS ```shell curl --request POST \ --url 'https://api.nftport.xyz/v0/mints/easy/files?chain=polygon&name=NFT_Name&description=NFT_Description&mint_to_address=0x...' \ --header 'Authorization: API Key Here' \ --header 'Content-Type: multipart/form-data' \ --form 'file=@/path/to/file_to_upload.png;type=image/png' ``` ```python import requests file = open("image.png", "rb") query_params = { "chain": "polygon", "name": "NFT_Name", "description": "NFT_Description", "mint_to_address": Wallet_Address } response = requests.post( "https://api.nftport.xyz/v0/mints/easy/files", headers={"Authorization": "API-Key-Here"}, params=query_params, files={"file": file} ) ``` ```javascript const fs = require('fs'); const fetch = require('node-fetch'); const FormData = require('form-data'); const form = new FormData(); const fileStream = fs.createReadStream('/path/to/file_to_upload.png'); form.append('file', fileStream); const options = { method: 'POST', body: form, headers: { "Authorization": "API-Key-Here", }, }; fetch("https://api.nftport.xyz/v0/mints/easy/files?" + new URLSearchParams({ chain: 'polygon', name: "NFT_Name", description: "NFT_Description", mint_to_address: "Wallet_Address", }), options) .then(function(response) { return response.json() }) .then(function(responseJson) { // Handle the response console.log(responseJson); }) ``` - [List all your deployed product contracts](https://docs.nftport.xyz/reference/get_user_contracts_v0_me_contracts_get.md): Returns a list of all the contracts you’ve previously deployed with [Deploy a contract for NFT products](../3.json/paths/~1v0~1contracts/post). #### Useful for: * Retrieving your contract creation history. #### Related: * To see all the NFTs you've previously minted, see [List all your minted NFTs](../3.json/paths/~1v0~1me~1mints/get). * To see all your previous IPFS uploads, see [List all your IPFS uploads](../3.json/paths/~1v0~1me~1storage/get). - [Get contract ABI](https://docs.nftport.xyz/reference/get_user_contracts_abis_v0_me_contracts_abis__contract_address__get.md): Returns the ABI for a contract you’ve previously deployed with [Deploy a contract for NFT products](../3.json/paths/~1v0~1contracts/post) or [Deploy a contract for NFT collections](../3.json/paths/~1v0~1contracts~1collections/post). #### Useful for: * Retrieving your contract ABI, for direct on-chain contract calls. #### Related: * To see all the contracts you've previously deployed, see [List all your deployed contracts](../3.json/paths/~1v0~1me~1contracts/get). * If you want to learn how to use the [customizable minting](../3.json/paths/~1v0~1mints~1customizable/post), see [Customizable Minting Quickstart](docs/minting/Minting-Quickstart.md#customizable-minting). - [List all your deployed collection contracts](https://docs.nftport.xyz/reference/get_user_contracts_collection_v0_me_contracts_collections_get.md): Returns a list of all the collection contracts you’ve previously deployed. It can also return merkle proofs of all the whitelisted addresses with `include` set to `merkle_proofs`. These proofs can be used during presale/whitelisted minting. A Merkle proof is a series of hashes which can be combined with the Merkle tree root and and the node (address) it was generated for, to verify that the node is contained in the Merkle tree without having access to the entire tree. #### Useful for: * Retrieving collection-specific contract details. * Retrieving your collection contract creation history. * Getting merkle proofs of whitelisted addresses. - [List all your minted NFTs](https://docs.nftport.xyz/reference/get_user_minted_nfts_v0_me_mints_get.md): Returns a list of all the NFTs you’ve previously minted with [Easy minting w/URL](../3.json/paths/~1v0~1mints~1easy~1urls/post), [Easy minting w/file upload](../3.json/paths/~1v0~1mints~1easy~1files/post) or [Customizable minting](../3.json/paths/~1v0~1mints~1customizable/post). For recently minted NFTs, it may take a few minutes until they appear in this response. #### Useful for: * Retrieving your NFT minting history. #### Related: * To see all the contracts you've previously deployed, see [List all your deployed contracts](../3.json/paths/~1v0~1me~1contracts/get). * To see all your previous IPFS uploads, see [List all your IPFS uploads](../3.json/paths/~1v0~1me~1storage/get). - [List all your IPFS uploads](https://docs.nftport.xyz/reference/get_user_storage_v0_me_storage_get.md): Returns a list of all data uploaded to IPFS by you. This includes files, metadata and directories uploaded to IPFS. **Note: Only lists IPFS uploads created after 2022-03-21T12:10:00 UTC.** #### Useful for: * Retrieving your uploaded data to IPFS. #### Related: * To see all the NFTs you've previously minted, see [List all your minted NFTs](../3.json/paths/~1v0~1me~1mints/get). - [User settings](https://docs.nftport.xyz/reference/get_user_settings_v0_me_settings_get.md): Retrieve your NFTPort settings to check your usage and limits. #### Useful for: * Checking your minting and contract deployment usage and limits. * Checking your NFT Data rate limits #### Related: * You can access the same information on your [NFTPort dashboard](https://dashboard.nftport.xyz). * To see your minted NFTs, see [List all your minted NFTs](../3.json/paths/~1v0~1me~1mints/get). * To see your deployed contracts, see [List all your deployed contracts](../3.json/paths/~1v0~1me~1contracts/get). - [Multi-chain contract search](https://docs.nftport.xyz/reference/multi-chain-contract-search.md): Search collections across multiple chains using a text query, within the ```name```, ```description```, and ```symbol``` fields of the collection. You can think of it like performing a search on Google. Supported chains are Ethereum, Polygon. Please note this endpoint uses the Ethereum naming convention. We support advanced search, similar to Google: - ```unquoted text``` searches all the keywords in no particular order. - ```"quoted text"``` searches the exact phrase. - ```or``` searches one or another keyword. - ```-``` searches and returns results without the keyword with the dash. - You can also combine the options. For example, the search query ```-stoner "ape club"``` returns all collections with the name "ape club" (not "ape yacht club") and excludes results that contain the word "stoner" (excludes "stoner ape club"). #### Useful for: * Integrating contract search to your application. * Finding contracts by their name, description, or symbol. #### Related: * To get all NFTs per contract, see [Retrieve contract NFTs](../1.json/paths/~1v0~1nfts~1{contract_address}/get). * To search all NFTs with keywords, see [Multi-chain NFT search](../4.json/paths/~1v0~1search/get). - [Multi-chain NFT search](https://docs.nftport.xyz/reference/multi-chain-nft-search.md): Searches NFTs across multiple chains using a text query, specifically the ```name``` and ```description``` fields from the metadata. You can think of it like performing a search on Google. It's designed to help you find the one or the most closest NFT results you're looking for. Ethereum and Polygon are supported, including multi-chain search. #### Useful for: * Finding NFTs by their name and/or description. * Quickly integrating NFT search to your application. ## Changelog - [Solana API Endpoints Deprecation (27/02/2023)](https://docs.nftport.xyz/changelog/solana-deprecation-27022023.md) - [Solana Collections Statistics (volumes, floor prices etc)](https://docs.nftport.xyz/changelog/solana-collections-statistics.md) - [TOP NFT Collections in Ethereum&Solana](https://docs.nftport.xyz/changelog/top-nft-collections-in-ethereum-and-solana.md) - [Multi-chain Collection Search](https://docs.nftport.xyz/changelog/multi-chain-collection-search.md) - [OpenRarity to Rank NFTs](https://docs.nftport.xyz/changelog/openrarity-to-rank-nfts.md) - [New, personalized docs](https://docs.nftport.xyz/changelog/new-personalized-docs.md) - [2022 November: more transaction data, Solana trending collections, contract search](https://docs.nftport.xyz/changelog/2022-november-more-transcaction-data-solana-trending-collections-contract-search.md) - [Rinkeby removed](https://docs.nftport.xyz/changelog/rinkeby-removed.md) - [Seaport off-chain + LooksRare & X2Y2 off-chain transaction support](https://docs.nftport.xyz/changelog/seaport-off-chain-looksrare-x2y2-off-chain-transaction-support.md) - [Polygon NFT transaction data](https://docs.nftport.xyz/changelog/polygon-nft-transactions-now-supported.md)