Search
GET/v1/instagram/search1 credit
Searches for Instagram accounts matching a keyword and returns their usernames, names and profile links.
01Query parameters
| Name | Type | Description |
|---|---|---|
| queryrequired | string | Search term, e.g. a name or brand. |
02Request
curl "https://api.scrapesocial.ai/v1/instagram/search?query=natgeo" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
03Responses
Real answers from the API. Lists are shortened to 2 items.
GET /v1/instagram/search?query=natgeo
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 1,
"query": "natgeo",
"users": [
{
"position": 0,
"id": null,
"username": "natgeo",
"full_name": "National Geographic",
"is_verified": null,
"profile_pic_url": null,
"url": "https://www.instagram.com/natgeo/"
},
{
"position": 1,
"id": null,
"username": "natgeotravel",
"full_name": "National Geographic Travel",
"is_verified": null,
"profile_pic_url": null,
"url": "https://www.instagram.com/natgeotravel/"
}
],
"hashtags": [],
"places": [],
"keywords": [],
"rank_token": null,
"source": "google"
}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
Accounts are in `users` in ranked order; only `position`, `username`, `full_name` and `url` are filled, the other user fields are null and `hashtags`, `places` and `keywords` are always empty. One page, typically up to 20 or so accounts. No match is an empty list for 0 credits. Web search engines also answer loosely related pages when nothing matches, so only results that name the query's words (in their title, snippet or URL) are kept: a query nothing matches answers the empty list for 0 credits.
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.