1. Platforms
  2. Instagram Scraper API
  3. Instagram profile embed HTML API

Instagram profile embed HTML API

The profile's embed document (what Instagram serves at /<handle>/embed/).

GET api.socialscrape.dev/v1/instagram/profile/embed

Cost
1 credit
Cached repeats
0 creditssend max_age_days, results kept 30 days
Failed requests
0 credits

HTML in html, with the follower and post counts it carries in extra.

You send handle.

Part of the Instagram Scraper API: 16 Instagram endpoints on one key.

Request

Send your key in the x-api-key header.

1curl -G "https://api.socialscrape.dev/v1/instagram/profile/embed" \2  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3  --data-urlencode 'handle=nasa'

Parameters

NameTypeRequiredDescription
handlestringyesUsername, with or without the leading @. Also accepted as username.

Every request also accepts trim, raw and max_age_days.

Response

Sample from a recorded response, shortened. Values are examples, not your data.

200 OKSample response
1{2  "ok": true,3  "credits_charged": 1,4  "credits_remaining": 4999,5  "cached": false,6  "cached_at": null,7  "request_id": "req_9319d3b216eab5563feebe05",8  "data": {9    "object": "embed",10    "platform": "instagram",11    "url": "https://www.instagram.com/nasa/",12    "html": "<!DOCTYPE html>\n<html lang=\"en\" id=\"facebook\" class=\"no_js\">\n<head><meta charset=\"utf-8\" /><meta name=\"referrer\" content=\"origin-when-crossorigin\" id=\"meta_r...",13    "extra": {14      "embed_url": "https://www.instagram.com/nasa/embed/",15      "followers": 104361175,16      "full_name": "NASA",17      "kind": "profile",18      "posts": 4984,19      "verified": true20    }21  },22  "cursor": null,23  "has_more": null24}

Fields

One Embed in data.

A field the platform does not give is null, never made up. Extra platform details are in extra.

FieldTypeAlwaysNotes
object"embed"
platformPlatformyes
urlstring or null
htmlstringyes
extraobject or null

Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.

Questions

Which errors can it return?

invalid_params (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.

Is there an SDK call for it?

The Python client has client.instagram.profile_embed(...) and the TypeScript client client.instagram.profileEmbed(). Both return the same envelope as the HTTP API. Install them from PyPI (socialscrape-sdk) or npm (socialscrape); plain HTTP works in any language.

Can an AI agent call it?

Yes. The MCP server, which you run on your own machine, reaches every built endpoint, with the same prices.