Instagram Scraper REST API
Developer guide for extracting enriched leads, followers, following, hashtags, emails, and phone numbers.
Production Base URL
https://harvest-bot-production.up.railway.app
⚠️ Routing Rule: Proxy OR ScrapingBee (Mutually Exclusive)
You can specify either
proxy OR scrapingbee_key in your request payload, but not both. Providing both simultaneously will return an HTTP 400 Bad Request error. If neither is passed, the server automatically routes through the default credentials configured in your server's admin panel.
POST
/api/scrape
The all-in-one endpoint. Pass target, choose type (followers, following, hashtag, profile), amount, and export format.
| Field | Type | Status | Details |
|---|---|---|---|
| target | string | Required | Target username or hashtag without symbols (e.g. travel_daily) |
| type | string | Optional | followers (default), following, hashtag, or profile |
| amount | int | Optional | Number of records to scrape (e.g. 25, 50, 100). Default: 50 |
| format | string | Optional | xlsx (default), csv, or json |
| cookies | string | Optional | Instagram session cookie: sessionid=YOUR_SESSION_ID |
| scrapingbee_key | string | Exclusive | Your ScrapingBee API key (do NOT supply with proxy) |
| proxy | string | Exclusive | Custom proxy URL (do NOT supply with scrapingbee_key) |
Python • ScrapingBee Mode
import requests
url = "https://harvest-bot-production.up.railway.app/api/scrape"
payload = {
"target": "travel_daily",
"type": "followers",
"amount": 50,
"format": "xlsx",
"cookies": "sessionid=123456789%3AEXAMPLE_COOKIE%3A2%3AAYsample",
"scrapingbee_key": "YOUR_SCRAPINGBEE_API_KEY"
}
response = requests.post(url, json=payload, timeout=120)
data = response.json()
print("Status:", data.get("status"))
print("Download URL:", data.get("download_url"))
# Download the returned Excel spreadsheet
if data.get("download_url"):
file_bytes = requests.get(data["download_url"]).content
with open("followers_leads.xlsx", "wb") as f:
f.write(file_bytes)
print("Saved to followers_leads.xlsx!")
Python • Proxy Mode
import requests
url = "https://harvest-bot-production.up.railway.app/api/scrape"
payload = {
"target": "travel_daily",
"type": "followers",
"amount": 50,
"format": "xlsx",
"cookies": "sessionid=123456789%3AEXAMPLE_COOKIE%3A2%3AAYsample",
"proxy": "socks5://user:pass@niceproxy.io:17521"
}
response = requests.post(url, json=payload, timeout=120)
data = response.json()
print("Status:", data.get("status"))
print("Download URL:", data.get("download_url"))
JavaScript • Node.js Fetch
const response = await fetch("https://harvest-bot-production.up.railway.app/api/scrape", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
target: "travel_daily",
type: "followers",
amount: 30,
format: "xlsx",
cookies: "sessionid=123456789%3AEXAMPLE_COOKIE%3A2%3AAYsample",
scrapingbee_key: "YOUR_SCRAPINGBEE_API_KEY"
})
});
const data = await response.json();
console.log("Download URL:", data.download_url);
cURL • Terminal
curl -X POST "https://harvest-bot-production.up.railway.app/api/scrape" \
-H "Content-Type: application/json" \
-d '{
"target": "travel_daily",
"type": "followers",
"amount": 50,
"format": "xlsx",
"cookies": "sessionid=123456789%3AEXAMPLE_COOKIE%3A2%3AAYsample",
"scrapingbee_key": "YOUR_SCRAPINGBEE_API_KEY"
}'
POST
/api/scrape/profile
Deep single-profile extraction. Scrapes public email, WhatsApp phone, category, biography, followers count, and physical address.
Python • ScrapingBee Mode
import requests
url = "https://harvest-bot-production.up.railway.app/api/scrape/profile"
payload = {
"username": "businessicgrowup",
"cookies": "sessionid=123456789%3AEXAMPLE_COOKIE%3A2%3AAYsample",
"scrapingbee_key": "YOUR_SCRAPINGBEE_API_KEY",
"format": "xlsx"
}
response = requests.post(url, json=payload, timeout=60)
data = response.json()
print("Extracted Profile:", data.get("data"))
print("Spreadsheet Download URL:", data.get("download_url"))
Python • Proxy Mode
import requests
url = "https://harvest-bot-production.up.railway.app/api/scrape/profile"
payload = {
"username": "businessicgrowup",
"cookies": "sessionid=123456789%3AEXAMPLE_COOKIE%3A2%3AAYsample",
"proxy": "socks5://user:pass@niceproxy.io:17521",
"format": "xlsx"
}
response = requests.post(url, json=payload, timeout=60)
data = response.json()
print("Extracted Profile:", data.get("data"))
cURL • Profile Scrape
curl -X POST "https://harvest-bot-production.up.railway.app/api/scrape/profile" \
-H "Content-Type: application/json" \
-d '{
"username": "businessicgrowup",
"scrapingbee_key": "YOUR_SCRAPINGBEE_API_KEY",
"format": "xlsx"
}'
POST
/api/scrape/following
Extract accounts followed by any target account with full contact and lead enrichment.
Python • Following Accounts
import requests
url = "https://harvest-bot-production.up.railway.app/api/scrape/following"
payload = {
"target": "businessicgrowup",
"amount": 30,
"format": "csv",
"cookies": "sessionid=123456789%3AEXAMPLE_COOKIE%3A2%3AAYsample",
"scrapingbee_key": "YOUR_SCRAPINGBEE_API_KEY"
}
response = requests.post(url, json=payload, timeout=90)
print(response.json())
POST
/api/scrape/hashtag
Extract recent post authors and enriched business contacts publishing under a target hashtag.
cURL • Hashtag Search
curl -X POST "https://harvest-bot-production.up.railway.app/api/scrape/hashtag" \
-H "Content-Type: application/json" \
-d '{
"target": "realestate",
"amount": 25,
"format": "xlsx",
"cookies": "sessionid=123456789%3AEXAMPLE_COOKIE%3A2%3AAYsample",
"scrapingbee_key": "YOUR_SCRAPINGBEE_API_KEY"
}'
GET
/api/download/{filename}
Download generated spreadsheets. Automatically serves MIME types for Microsoft Excel (.xlsx) and CSV (.csv).
cURL • Download File
curl -O "https://harvest-bot-production.up.railway.app/api/download/businessicgrowup_profile_45b0fb04.xlsx"
Enriched Lead Fields Schema
The following 17 structured fields are extracted and written into your downloaded spreadsheet:
| Field Name | Type | Description |
|---|---|---|
| username | string | Instagram handle |
| full_name | string | Account display name |
| public_email | string | Verified public business email |
| phone | string | Contact phone number |
| whatsapp_number | string | Direct WhatsApp phone number |
| category_name | string | Industry / niche category |
| biography | string | Account biography description |
| external_url | string | Website / link in bio |
| follower_count | int | Followers count |
| following_count | int | Following count |
| city | string | Registered business city |
| address | string | Registered street address |
| zip_code | string | Postal or ZIP code |