An Instagram scraping API lets you programmatically extract data from Instagram profiles — emails, phone numbers, bios, follower counts, and more. Instead of manual tools or browser extensions, you integrate directly into your app, CRM, or data pipeline.
This guide covers the main API options, how to get started with the IGLeads.ai API, and code examples in cURL, Python, and Node.js.
Why Use an API Instead of Manual Tools?
- •Automation: Trigger extractions from your own app, webhook, or cron job
- •Integration: Pipe leads directly into your CRM, email tool, or database
- •Scale: Process thousands of extractions without manual intervention
- •Consistency: Same output format every time — no manual CSV cleanup
API Options Compared
| API | Focus | Auth | Pricing | Rate Limit |
|---|---|---|---|---|
| IGLeads.ai | Lead gen (emails + phones) | Bearer token | $49-199/mo | 25-500 req/min |
| Apify | Raw profile data | API token | $49/mo+ | Varies by actor |
| Bright Data | Enterprise scraping | API key | $500+/mo | Unlimited (with proxy) |
| Instagram Graph API | Own account data only | OAuth | Free | Strict limits |
The official Instagram Graph API only lets you access data from accounts you manage — it's useless for lead generation. For extracting data from other profiles, you need a third-party API.
Getting Started with IGLeads.ai API
1. Get your API key
API access is available on all subscription plans (Starter $49/mo, Pro $99/mo, Business $199/mo). Generate your API key from the API dashboard.
2. Create an extraction job
Here's how to extract emails from a competitor's followers:
cURL example:
curl -X POST https://igleads-api.kylian-b16.workers.dev/v1/leads/competitors \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"usernames": ["competitor_username"],
"limit": 1000
}'Python example:
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://igleads-api.kylian-b16.workers.dev"
# Create extraction job
response = requests.post(
f"{BASE_URL}/v1/leads/competitors",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"usernames": ["competitor_username"],
"limit": 1000
}
)
job = response.json()
job_id = job["jobId"]
print(f"Job created: {job_id}")
# Check job status
status = requests.get(
f"{BASE_URL}/v1/leads/jobs/{job_id}",
headers={"Authorization": f"Bearer {API_KEY}"}
)
print(status.json())
# Get results when complete
results = requests.get(
f"{BASE_URL}/v1/leads/jobs/{job_id}/results",
headers={"Authorization": f"Bearer {API_KEY}"}
)
leads = results.json()
print(f"Got {len(leads['results'])} leads")Node.js example:
const API_KEY = "YOUR_API_KEY";
const BASE_URL = "https://igleads-api.kylian-b16.workers.dev";
// Create extraction job
const response = await fetch(`${BASE_URL}/v1/leads/competitors`, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
usernames: ["competitor_username"],
limit: 1000
})
});
const job = await response.json();
console.log("Job created:", job.jobId);
// Poll for results
const results = await fetch(
`${BASE_URL}/v1/leads/jobs/${job.jobId}/results`,
{ headers: { "Authorization": `Bearer ${API_KEY}` } }
);
const leads = await results.json();
console.log(`Got ${leads.results.length} leads`);Available Endpoints
| Endpoint | Method | Description |
|---|---|---|
| POST /v1/leads/competitors | POST | Extract emails from competitor followers |
| POST /v1/leads/hashtag | POST | Find leads by hashtag |
| POST /v1/leads/location | POST | Extract by location |
| POST /v1/leads/hot | POST | AI-detected hot leads |
| POST /v1/leads/network | POST | See who an account follows |
| POST /v1/leads/enrich | POST | Enrich existing Instagram IDs |
| GET /v1/leads/jobs | GET | List all your jobs |
| GET /v1/leads/jobs/:id | GET | Check job status |
| GET /v1/leads/jobs/:id/results | GET | Download results |
| PATCH /v1/leads/jobs/:id/stop | PATCH | Stop a running job |
Rate Limits
Rate limits depend on your subscription plan:
| Plan | Rate Limit | Monthly Quota |
|---|---|---|
| Starter ($49/mo) | 25 requests/min | 5,000 emails |
| Pro ($99/mo) | 100 requests/min | 15,000 emails |
| Business ($199/mo) | 500 requests/min | 50,000 emails |
Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.
Best Practices
- •Poll, don't wait. Extraction jobs run asynchronously. Create the job, then poll the status endpoint every 30-60 seconds until it completes.
- •Use partial results. For large jobs, use the
/partial-resultsendpoint to start processing leads before the job finishes. - •Handle rate limits gracefully. Implement exponential backoff when you receive 429 responses.
- •Store your API key securely. Never expose it in client-side code or public repositories.
Building a Complete Pipeline
A typical automated lead generation pipeline looks like this:
- •Step 1: Cron job triggers daily extraction from target competitors
- •Step 2: IGLeads.ai API extracts and verifies emails
- •Step 3: Webhook or poll delivers results to your app
- •Step 4: Deduplicate against existing contacts in your CRM
- •Step 5: New leads automatically added to your outreach sequence (Instantly, Lemlist, etc.)
For full API documentation, visit the developer docs. For a non-technical overview of what's possible, read our Instagram lead generation guide.
Get API Access
API access starts with any subscription plan. Sign up free, test with 100 leads via the dashboard, then upgrade to a plan for API access. The Starter plan ($49/mo) includes 5,000 emails and 25 requests/minute — enough for most teams.