How to get an Apify API key
Checked by hand 2026-11-30
Start here, signed in to your Apify account: console.apify.com
- Open API & Integrations in Apify Console settings, signed in to Apify, and click Create a new token under API tokens. Leave Rotate token and Delete alone on the tokens already listed: other apps may use them.
- Type a description. Expiration starts at 90 days, when the token stops working: pick 365 days or No expiration for an app that runs on its own. For full access leave Limit token permissions off, or turn it on and pick what your app uses.
- Click Create. Apify shows the token only once, in the next box.
What you end up with
- APIFY_TOKEN
Where the key goes
Put it in a file called .env at the top of your project, one line per value:
APIFY_TOKEN=your-api-token-here
Then make sure .env is listed in your .gitignore, so the key never ends up on GitHub. Never paste a secret key into a chat, a screenshot or your app’s front-end code.
If you lose it
Many services show a secret key only once. If yours can’t be shown again, don’t worry: create a new one with the steps above, put it in your .env, then delete the old key on the same page.
Skip the copy and paste
Footgun highlights each of these clicks on the real Apify page, catches the key the moment it appears, keeps it safe on your computer and puts it in your project. No lost keys, no hunting for where it goes.