Instagram location posts API
GET /ig/location/media/{pk} · base https://api.getsocialapi.com/v1
Public media tagged at a location, paginated.
Request
| Parameter | In | Required | Description |
|---|---|---|---|
pk | path | yes | Numeric location id (from location info) |
max_id | query | no | Cursor from the next_max_id field of the previous page |
The native page size is defined by the service; a page-size parameter is
not supported here — use max_id to paginate.
Example
curl "https://api.getsocialapi.com/v1/ig/location/media/213145014" \
-H "X-API-Key: gsa_live_..."
Response
{
"sections": [
{
"layout_type": "media_grid",
"feed_type": "media",
"layout_content": {
"medias": [
{ "media": { "pk": "...", "code": "...", "taken_at": 1760112000, "media_type": 1, "user": {} } }
]
},
"explore_item_info": { "num_columns": 3, "total_num_columns": 3 }
}
],
"next_max_id": "...",
"more_available": true,
"auto_load_more_enabled": true,
"status": "ok"
}
| Field | Type | Description |
|---|---|---|
sections[] | array | Grid sections; each wraps a batch of medias |
sections[].layout_type | string | media_grid (photos), two_by_two_item (tiles) |
sections[].layout_content.medias[].media | object | Full media object — same shape as in user medias |
next_max_id | string | Cursor for the next page — pass it back as max_id; absent/null on the last page |
next_page | number | Page counter returned by Instagram (not a cursor; 0 when there is no next page) |
more_available | bool | Whether more pages exist |
Pagination
Pass next_max_id as max_id until more_available is false. Flatten
sections[].layout_content.medias[].media to get a plain media list;
deduplicate by pk when aggregating pages.
Errors
| HTTP | Meaning |
|---|---|
401 / 403 / 429 | see Rate limits |
404 | location does not exist |