One GET request to /v1/instagram/web_profile_info returns a public Instagram profile as JSON for $0.0005, so 1,000 profiles cost $0.50. This guide builds an Instagram profile scraper on that call in Python: one profile, a list of handles written to a CSV file, a batch job for up to 10,000 handles, and a stored lookup that reads 200 handles in one call.
Why an API instead of your own scraper
Instagram's official API reads another account by username only through Business Discovery, which needs your own professional account and an access token, returns only professional accounts and skips age-gated ones. A scraper of your own means running proxies and keeping a parser for Instagram's web JSON up to date.
The API runs the proxies and the parser for you. Every answer has the same Profile shape, a failed call costs nothing, and meta.cost tells you what each call cost. The Instagram profile API page lists every field with its type.
Scrape one profile
Create a key in the dashboard, put it in VIREV_API_KEY, and send a handle. A leading @ is accepted.
import os
import requests
r = requests.get(
"https://api.virev.ai/v1/instagram/web_profile_info",
params={"handle": "natgeo"},
headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
)
r.raise_for_status()
profile = r.json()["data"]
print(profile["username"], profile["followers"], profile["is_verified"])The answer for natgeo, captured on 2026-11-08, had 268,179,647 followers, 195 following, two bio links and is_business: true. The fields you will use most are these.
| Field | What it holds |
|---|---|
username, full_name, biography | The handle, display name and bio text |
followers, following, posts | The counts at the time of the read, where posts can be null |
is_verified, is_private, is_business | The account flags |
external_url, links | The website and every bio link with its label |
avatar_url | The profile picture on Instagram's CDN |
id | The numeric account id, which you can send as ig_id next time |
Send ig_id with the handle to also get the category and the full-size profile picture. get_raw=true returns the JSON Instagram answered, if you want fields the Profile shape does not carry.
Scrape a list of handles into a CSV file
Put one handle per line in handles.txt. The loop below writes one row per profile. Your organization can send 100 requests a minute by default, so 1,000 handles take at least 10 minutes. A 429 answer usually carries Retry-After, the seconds to wait. A 403 means Instagram does not show the account to logged-out visitors, as with a private account, and a 404 means it does not exist. None of the three costs anything.
import csv
import os
import time
import requests
URL = "https://api.virev.ai/v1/instagram/web_profile_info"
HEADERS = {"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"}
COLUMNS = ["username", "full_name", "followers", "following", "posts",
"is_verified", "is_private", "is_business", "external_url", "biography"]
def fetch(handle):
while True:
r = requests.get(URL, params={"handle": handle}, headers=HEADERS)
if r.status_code == 429:
time.sleep(int(r.headers.get("Retry-After") or 5))
continue
if r.status_code in (403, 404):
return None
r.raise_for_status()
return r.json()["data"]
handles = [line.strip().lstrip("@") for line in open("handles.txt") if line.strip()]
with open("profiles.csv", "w", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=COLUMNS, extrasaction="ignore")
writer.writeheader()
for handle in handles:
profile = fetch(handle)
if profile:
writer.writerow(profile)Scrape 10,000 profiles with one batch job
Past a few thousand handles, a batch job saves you the loop and the rate-limit waits. POST /v1/batch/trigger takes up to 10,000 rows in one request and runs them for you. The batch calls are free, and each row bills $0.0005 as it runs, so 10,000 handles cost $5.00 and failed rows cost nothing.
- 1
Start the job
Send the handles as a JSON list of{"handle": ...}objects to/v1/batch/trigger?operation=instagram.web_profile_info&format=csv, and keep thesnapshot_idfrom the answer. - 2
Wait for it
PollGET /v1/batch/progress/{snapshot_id}untilstatusisready,failedorcanceled. - 3
Download the CSV
ReadGET /v1/batch/snapshot/{snapshot_id}. Its columns are dot-flattened keys, such asinput.handleanddata.followers.
The Instagram profile API page has the full Python for these three steps, and the batch docs list webhooks and paged downloads.
Read 200 stored profiles in one call
If the profile we last crawled is fresh enough, skip the live read. Two stored endpoints take up to 200 handles per call for $0.0010, so 1,000 handles cost $0.0050. They never start a crawl: a handle we never crawled is left out, and a call that finds none of its handles costs $0.
- The stored profiles API at
GET /v1/creators/profilestakes comma-separatedusernamesand returns bio, counts, niche, country, language andlastScrapedAt. - The bulk lookup API at
POST /v1/creators/mgettakes a JSON list ofusernamesand returns each creator search row with engagement ratio, last post date and brand collabs.
import os
import requests
r = requests.post(
"https://api.virev.ai/v1/creators/mget",
json={"usernames": ["natgeo", "nike"], "platform": "instagram"},
headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
)
r.raise_for_status()
for row in r.json()["data"]["creators"]:
print(row["username"], row["followers"], row["country"], row["primaryNiche"])Which read to use
| Read | Path | Cost for 1,000 handles | Data as of |
|---|---|---|---|
| Live loop | /v1/instagram/web_profile_info | $0.50 | The call, or a read saved in the last 24 hours |
| Batch job | /v1/batch/trigger | $0.50 | When each row runs |
| Stored profiles | /v1/creators/profiles | $0.0050 | Our last crawl of the account |
| Bulk lookup | /v1/creators/mget | $0.0050 | Our last crawl of the account |
For posts, use the Instagram posts API next, and the profile data guide covers the stored profile with its AI niche block.
Scrape your first Instagram profile
Create an account, add a key, and run the loop above on your own list. A live read costs $0.0005 a profile.
Get your API key →