How to sell 10,000 NFTs on OpenSea for FREE (Puppeteer/NodeJS)
The ultimate guide to publishing and selling massive NFT collections on OpenSea.
So you’ve finally gotten your NFT collection ready and are now ready to sell them. Except there’s one little problem, you can’t figure out how to mint them! You don’t know how to use smart contracts or want to avoid the high gas fees. You’ve tried an app like Mini mouse macro without much success and aren’t familiar with Selenium/Python. Well, worry no more, NodeJS and Puppeteer are here to save the day!
In this tutorial, you’ll learn the step-by-step process of the exact method I used to automatically upload and sell all 1000 of my AI-generated word NFTs (Nakahana) on OpenSea completely for FREE!
NB: You can only sell for free if your NFTs are on the Polygon blockchain, you must pay a one-time initialization fee for Ethereum. Your NFTs can still be purchased with (wrapped) ETH though.
If you’d like to just jump straight into the code, here’s a link to the GitHub repo: https://github.com/Yusu-f/nftuploader
First, let’s talk about the knowledge and tools you’ll need to do this.
What you’ll need to know
You’ll need to have basic coding knowledge and be able to write and run simple NodeJS scripts. You’ll also need to know how to set up and use a Metamask wallet.
Tools you’ll require
- NodeJS and NPM — You’ll need to have NodeJs on your machine to run the script and NPM to install the necessary dependencies.
- Puppeteer — You’ll need Puppeteer to automate your browser so you can sleep while your computer does all the work for you.
- Metamask — You’ll need Metamask to create a crypto wallet and sign transactions (Don’t worry, they’re free). Learn how to use Metamask here
- Chrome — Puppeteer works with Google chrome.
With all that out of the way, let’s dive in!
Getting Started
Clone the Github Repo to your local machine. Make sure all the required tools (NodeJS, Chrome, and Metamask) are installed and working correctly. Navigate to the project folder in your desired terminal and run npm install.
This will install all the required dependencies.
You also need to replace the “extension_path” variable with the path to your Metamask chrome extension. Read this tutorial to learn how to find the path.
Finally, you need to replace the “arr” variable with an array containing the names and metadata of your NFTs and the “collection_name” variable with your collection’s name.
Run the script
After installing all the dependencies, run node nftuploader.js.
A new chrome instance (not chromium) should open and Metamask should open in this instance. Import the wallet connected to your Opensea using your Secret Recovery Phrase or just create a new one and link it to Opensea. The script will be unable to continue after this but don’t worry, it’s all part of the plan.
Next steps
Once you’ve signed in to your Metamask wallet, reopen your terminal and copy the path logged in it that begins with “ws” e.g “ws://localhost:53634/devtools/browser/c07cb303-c84d-430d-af06-dd599cf2a94f”. Go to the nftuploader.js script and replace the browserWSEndpoint parameter in the connect function with the copied path.
const browser = await puppeteer.connect({ browserWSEndpoint: "ws://localhost:58533/devtools/browser/d09307b4-7a75-40f6-8dff-07a71bfff9b3", defaultViewport: null });
Now run node nftuploader.js
again. A new tab in THE SAME chrome instance should open and navigate successfully to your Opensea collection. Your NFTs should now start getting uploaded one after the other at lightning speed! If any errors are encountered, information about the concerned NFTs and errors is logged in an errors.log file.
Handling Errors
In the errors.log file, you should see the name of the NFTs concerned as well as the nature of their error. I’ve updated the script so that you can now easily check if an NFT has already been uploaded before uploading. To perform this check, just change the “searchBeforeUpload” variable to true.
And we’re done!
If you found this useful in any way, please click that clap button as many times as you can and buy an NFT too! Please let me know in the comments or an email if you encounter any issues or want a feature added.
And massive thanks to everyone who’s read this, clapped, and followed. I never thought it would become this popular.