GET /v1/instagram/location_nearby

Instagram nearby locations API: places near a location by id

Returns the Instagram locations near one location as Location[]: id, name, slug, latitude and longitude. Send the numeric location id as location_id_str. 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/location_nearby?location_id_str=1031760084' \
  -H "Authorization: Bearer $VIREV_API_KEY"
python
import os
import requests

response = requests.request(
    "GET",
    "https://api.virev.ai/v1/instagram/location_nearby",
    params={
        "location_id_str": "1031760084",
    },
    headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
    timeout=60,
)
response.raise_for_status()
print(response.json())

Parameters

NameInTypeDescription
location_id_str requiredquerystringNumeric Instagram location id, sent as a string. Example 1031760084.
cached queryauto | cache_only | liveauto (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. Default auto.
get_raw querybooleantrue returns the upstream JSON exactly as Instagram answered it instead of the normalized Location[]. Default false.

Example response

The example response of the API reference.

json
{
  "data": [
    {
      "id": "141313492660125",
      "name": "안산 25시광장",
      "slug": "25",
      "lat": 37.31207902,
      "lng": 126.8300441,
      "address": null,
      "city": null,
      "phone": null,
      "website": null,
      "posts": null
    }
  ],
  "meta": {
    "source": "live",
    "fetched_at": "2026-09-09T03:10:22Z",
    "cost": "$0.0005",
    "balance": "$0.7867",
    "request_id": "req_0914a9a0caf03d1273925ab7b10322e2"
  }
}

How it works

Wraps doc_id PolarisExploreLocationsNearbyTabRootQuery (location_id_str). Returns Location[] 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 Location[], not a live capture.

Errors

StatusWhen
400The request parameters are invalid.
401Missing, malformed, or revoked API key.
402Balance is too low for this request.
403Instagram 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.
404cached=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).
429Over 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.
502The upstream fetch failed. You are not charged.
503Billing could not be confirmed, so no upstream data was returned.
504The upstream request timed out. You are not charged.

Instagram API guide