GET /v1/instagram/related_accounts
Instagram related accounts API: similar profiles by username
Returns the accounts Instagram suggests next to one profile as Account[]: id, username, full name, verified and private flags and the profile picture URL. Send the handle. get_raw=true returns the JSON Instagram answered.
- Price
- $0.0005 per call
- Batch
- Yes, through /v1/batch
- Failed calls
- Not charged
Example request
curl
curl 'https://api.virev.ai/v1/instagram/related_accounts?handle=glossier' \
-H "Authorization: Bearer $VIREV_API_KEY"python
import os
import requests
response = requests.request(
"GET",
"https://api.virev.ai/v1/instagram/related_accounts",
params={
"handle": "glossier",
},
headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.json())Parameters
| Name | In | Type | Description |
|---|---|---|---|
handle required | query | string | Instagram account handle (a leading @ is accepted). On the operations whose upstream call takes the numeric account id, the crawler resolves it; a handle it has never seen costs one extra anonymous profile read. |
cached | query | auto | cache_only | live | auto (default) serves a read saved within the last 24 hours for these exact arguments, otherwise fetches. cache_only never contacts Instagram (404 not_cached when nothing is saved, whatever its age). live always fetches. Anything else is a 400. A saved read is an earlier answer of this operation for the same arguments; an account in the profile library (/v1/instagram/profile) is not one until this operation has read it. |
get_raw | query | boolean | true returns the upstream JSON exactly as Instagram answered it instead of the normalized Account[]. |
Example response
The example response of the API reference, with lists cut to their first 3 items and long text shortened.
json
{
"data": [
{
"id": "2999682241",
"username": "fentybeauty",
"full_name": "FENTY BEAUTY BY RIHANNA",
"is_verified": true,
"is_private": false,
"avatar_url": "https://scontent.cdninstagram.com/v/t51.82787-19/773928977_18495301921098242_3404632262144027066_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy44MDAuQzMifQ%3D%3D&_nc_ohc=L8tGav…",
"latest_story_at": null,
"extra": {}
},
{
"id": "23818608",
"username": "sephora",
"full_name": "Sephora",
"is_verified": true,
"is_private": false,
"avatar_url": "https://scontent.cdninstagram.com/v/t51.82787-19/657778446_18595485655010609_4265993581475085958_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy44MDAuQzMifQ%3D%3D&_nc_ohc=EnzEZ-…",
"latest_story_at": null,
"extra": {}
},
{
"id": "189334003",
"username": "tartecosmetics",
"full_name": "Tarte Cosmetics",
"is_verified": true,
"is_private": false,
"avatar_url": "https://scontent.cdninstagram.com/v/t51.82787-19/824815051_18644010280022004_6547181542539835766_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy42ODUuQzMifQ%3D%3D&_nc_ohc=SGPU-9…",
"latest_story_at": null,
"extra": {}
}
],
"meta": {
"source": "db",
"fetched_at": "2026-10-20T14:56:53Z",
"cost": "$0.0005",
"balance": "$0.3777",
"request_id": "req_f1abb41157ca15c565d48a90bacef554"
}
}How it works
Wraps doc_id PolarisAYMLFollowChainingListLoggedOutQuery (owner_id). Returns Account[] under data; with get_raw=true returns the upstream JSON.
Unknown, unsupported, and repeated query parameters return 400 before acquisition or billing.
The example response is the crawler's own projection of a synthetic upstream document into Account[], not a live capture.
Errors
| Status | When |
|---|---|
400 | The request parameters are invalid. |
401 | Missing, malformed, or revoked API key. |
402 | Balance is too low for this request. |
403 | Instagram does not show this account to logged-out readers: it is private, hidden or restricted, or it no longer exists. Retrying will not change the answer until the account changes. You are not charged. |
404 | cached=cache_only found nothing saved for these arguments (not_cached; call again with cached=auto to fetch it), or the account, post, highlight, or location does not exist (not_found). |
429 | Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged. |
502 | The upstream fetch failed. You are not charged. |
503 | Billing could not be confirmed, so no upstream data was returned. |
504 | The upstream request timed out. You are not charged. |