Loading...
Loading...
Scrape Instagram profiles, posts, reels and comments as JSON through the Bright Data Scraper API. Use when the user asks for any Instagram data - an account's followers or bio, a post's likes and comments, the recent posts or reels of an account, the comments on a post - or says "instagram scraper", "instagram api", "instagram data". Routes between the CLI (`bdata pipelines run` with the Instagram dataset ids), the Python SDK (`client.search.instagram.*` and `client.scrape.instagram.*`), and the MCP scraper tools. Carries the credit costs, the reels timeout, the `post_type` values that work, and the error-row cases the API returns as success.
npx skill4agent add brightdata/skills instagrambrightdata-sdk@brightdata/cli@brightdata/mcp| Dataset | dataset_id | Methods |
|---|---|---|
| Profiles | | |
| Posts | | |
| Reels | | |
| Comments | | |
| You have | You want | Route |
|---|---|---|
| a profile URL | the account's recent posts | CLI |
| a profile URL | the account's recent reels | CLI |
| a profile URL | the profile | CLI |
| a username, no URL | the profile | CLI |
| a post URL | that post | CLI |
| a reel URL | that reel | CLI |
| a post or reel URL | its comments | CLI |
| no terminal (hosted assistant) | any of the above | MCP |
num_of_postsnode <agent-onboarding skill folder>/scripts/check-auth.mjs --for instagram0agent-onboardingpip install brightdata-sdkBRIGHTDATA_API_TOKENBRIGHTDATA_API_KEY.envbdata loginbdata pipelines run gd_l1vikfch901nx3by4 collect_by_url "https://www.instagram.com/nasa/" --pretty
bdata pipelines run gd_lk5ns7kz21pck8jpis collect_by_url "https://www.instagram.com/p/Dc1W1uFj-CW/" --format csv -o posts.csv
bdata pipelines run gd_lyclm20il4r5helnj collect_by_url "https://www.instagram.com/reel/DcMXl1IPNtB/" --pretty
bdata pipelines run gd_ltppn085pokosxh13 collect_by_url "https://www.instagram.com/p/Dc1W1uFj-CW/" --pretty
bdata pipelines run gd_lk5ns7kz21pck8jpis discover_by_url "https://www.instagram.com/nasa/" --num_of_posts 5 --prettybdata pipelines info <dataset_id> <method>--<field> <value>--format json|csv|ndjson|jsonl-o FILE--timeout SECONDSfrom brightdata import SyncBrightDataClient
with SyncBrightDataClient(auto_create_zones=False) as client:
result = client.search.instagram.posts("https://www.instagram.com/nasa/", num_of_posts=5)
for post in result.data:
print(post["likes"], post["num_comments"], post["url"])auto_create_zones=Falsesearch.*result.datascrape.*start_date="08-01-2026", end_date="09-07-2026"MM-DD-YYYYpost_type="Post"post_type="Reels""Reel"timeout=420errorThere are no public posts in the profile for the specified perioderror_codeerrorSorry, this page isn't available.Crawler error: Cannot read properties of nullresult.success == Falseresult.status == "timeout"user_postednasanasajohnsoncoauthor_producersreels_all(url)posts_countnum_commentsclient.datasets.instagram_posts.get_metadata().fieldsposts_triggerposts_statusposts_fetchreferences/sdk.mdrun_scraper[{"url": "https://www.instagram.com/nasa/"}]discover_by_urlnum_of_postslimit_per_inputsearch_scrapersget_scraper_detailsbrightdata-mcpscrapesearchscrape