User Embed
GET/v1/instagram/user/embed1 credit
Returns the HTML of an account's embeddable profile widget.
01Query parameters
| Name | Type | Description |
|---|---|---|
| handlerequired | string | Instagram username. A leading `@` or a full profile URL is also accepted. |
02Request
curl "https://api.scrapesocial.ai/v1/instagram/user/embed?handle=natgeo" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
03Responses
Real answers from the API. Lists are shortened to 2 items.
GET /v1/instagram/user/embed?handle=natgeo
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 1,
"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_referrer\" /><script nonce=\"I0FiOmUz\">function envFlush(e){function t(t){for(var n in e)t[n]=e[n]}window.requireLazy?window.requireLazy([\"Env\"],t):(window.Env=window.Env||{},t(window.Env))}envFlush({\"ajaxpipe_token\":\"AXpv-IqXBqsxI2tcZrQ\",\"stack_…"
}Common to every endpoint
Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.
GET /v1/cosmos/profile?handle=design
{
"success": false,
"message": "Invalid API key"
}04Notes
The markup is in `html`. Instagram serves the same empty embed for an unknown, a private and an age-restricted account, so those are not charged: an unknown handle is a free 404, a private account a free 403 (`private_account`), an age-restricted one a free 403.
05Errors & credits
Every error has success: false, a real HTTP status and costs no credits.
400missing_parameter
A required parameter is missing or invalid.
403private_account
The account is private or age-restricted.
404not_found
No such account.
503upstream_error
The platform did not answer; retry shortly.