# How do I get Instagram posts by location?

Instagram. Checked September 2026.

Two calls. Search places with `GET /v1/instagram/search/places?q=…` to find the location and its ID. Then call `GET /v1/instagram/locations/{id}/posts` with `sort=recent` or `sort=top`. Each request returns one page of public posts tagged at that place.

The Graph API has no location feed for places you do not own. This is public data as the location page shows it, read on request.

## GET /v1/instagram/locations/{id}/posts?sort=recent

```bash
curl "https://api.openhandle.dev/v1/instagram/locations/950000000002/posts?sort=recent" \
  -H "Authorization: Bearer $OPENHANDLE_API_KEY"
```

```ts
import { OpenHandle } from '@openhandle/sdk';

const openhandle = new OpenHandle({ apiKey: process.env.OPENHANDLE_API_KEY! });
const places = await openhandle.instagram.search.places.list({ q: 'synthetic' });
const location = places.data[0];

let page = await openhandle.instagram.location(location.id).posts.list({ sort: 'recent' });
for (const post of page.data) console.log(post.author.handle, post.createdAt);
```

200 OK:

```json
{
  "platform": "instagram",
  "resource": "post",
  "capturedAt": "2026-09-18T11:40:27Z",
  "source": "live",
  "data": [
    {
      "id": "910100000001",
      "createdAt": "2026-08-09T15:30:00Z",
      "author": { "id": "910000000001", "handle": "northstar_forge_test" },
      "location": { "id": "950000000002", "name": "Synthetic Harbor" },
      "metrics": { "likes": 840, "comments": 5 }
    }
  ],
  "meta": { "cursors": { "next": "b3BhcXVlLWN1cnNvcg" } }
}
```

Trimmed to one post. The example is a Test place with paginated posts, so you can run both calls on a free Test key.

## Find the location first

- **Search by name.** `GET /v1/instagram/search/places?q=blue bottle` returns matching places with ID, name, address, and coordinates.
- **Read the place.** `GET /v1/instagram/locations/{id}` returns the place itself: name, address, coordinates, category, and website where Instagram shows them.
- **From a post.** A post tagged at a place carries `location.id`. Use it directly.

## Recent or top

- **recent.** Newest public posts tagged there. Use it for venue monitoring and local UGC on a schedule.
- **top.** The posts Instagram ranks highest for the place.

## What a location feed is not

It is posts the author tagged at that place. It is not GPS data and not every photo taken there. Posts from private accounts never appear. A post can be tagged at a place the author never visited. Treat it as what people chose to say, not where they were.

## When this does not work

Empty is an answer. A cursor from another request is a mistake.

| Situation | Status | Code |
|---|---|---|
| The place has no public posts | 200 | `empty data` |
| The location ID does not exist | 404 | `PROFILE_NOT_FOUND` |
| The cursor came from another place, sort, or freshness | 400 | `CURSOR_MISMATCH` |

```json
{
  "error": {
    "code": "CURSOR_MISMATCH",
    "message": "The cursor does not belong to this request.",
    "requestId": "req_01j8…",
    "retryable": false
  }
}
```

An empty page bills as an answered request. Both the search and the feed are billed per request.

## Related

- [Instagram API](https://openhandle.dev/apis/instagram): Every Instagram endpoint, including locations, hashtags, and search.
- [How do I get Instagram hashtag posts past the 30 hashtag limit?](https://openhandle.dev/questions/how-do-i-get-instagram-hashtag-posts-past-the-30-hashtag-limit): The same pattern for hashtags.
- [Pagination](https://openhandle.dev/docs/concepts/pagination): Opaque cursors, one page per request.
