Quickstart
Make your first Instagram API request in minutes. Create a free key, send a request in cURL, Python or Node.js, and read the response.
This page takes you from nothing to a working request.
1. Create an API key
- Sign up and confirm your email address.
- Open API keys in the dashboard and create a key. It looks like
igk_followed by 40 characters. - Copy it right away. For your security the full key is shown once and cannot be displayed again. If you lose it, create a new one.
The Free plan gives you 100 credits a month and needs no card.
2. Send your first request
Every request goes to https://api.igramapi.com and carries your key as a Bearer token.
curl "https://api.igramapi.com/v1/profiles/example_creator" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
response = requests.get(
"https://api.igramapi.com/v1/profiles/example_creator",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
response.raise_for_status()
print(response.json()["profile"]["followers"])
const response = await fetch("https://api.igramapi.com/v1/profiles/example_creator", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { profile } = await response.json();
console.log(profile.followers);
3. Read the response
A successful call returns HTTP 200 and JSON. Failed calls return an error object with a stable code. Look at the headers too:
| Header | Meaning |
|---|---|
X-Credits-Charged |
Credits this call used. |
X-Credits-Remaining |
Credits left in the current period. |
X-RateLimit-Remaining |
Requests left in the current minute. |
4. Keep your key safe
- Call the API from your server, never from a browser or mobile app, because anyone could read the key.
- Store the key in an environment variable or a secrets manager.
- If a key leaks, revoke it in the dashboard. It stops working immediately.
Next steps
- Authentication for the other ways to send the key.
- Credits and rate limits to plan your usage.
- Pagination for posts, reels, comments and hashtags.
- All endpoints and the interactive API reference.
Something unclear or missing? Tell us and we will fix the page.