# Instagram / Hashtag Posts

Fetch top public posts for a hashtag.

```
GET /api/v1/instagram/hashtag-posts
```

Auth: `Authorization: Bearer <SOCIFY_KEY>`  
Credits: 1 credit per request

## Parameters

| Name | Required | Description | Example |
|------|----------|-------------|---------|
| `name` | yes | Hashtag name without #. | `nature` |
| `cursor` | no | Pagination cursor from a previous response. |  |

## Example

```bash
curl -s 'https://trysocify.com/api/v1/instagram/hashtag-posts?name=nature' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `posts` | array | Posts for this page. |
| `posts[].id` | string | Media id. |
| `posts[].code` | string | Shortcode. |
| `posts[].url` | string | Post URL. |
| `posts[].caption` | string | Caption text. |
| `posts[].type` | string | image, video, or carousel. |
| `posts[].created_at` | number | Unix publish timestamp. |
| `posts[].likes` | number | Like count. |
| `posts[].comments` | number | Comment count. |
| `posts[].thumbnail` | string | Thumbnail URL. |
| `posts[].author` | object | Author username and id. |
| `cursor` | string | Pass as cursor for the next page. |
## Sample response

Successful lookups wrap the payload in `{ ok, platform, resource, params, data, meta }`. `data` is shown below.

```json
{
  "ok": true,
  "platform": "instagram",
  "resource": "hashtag-posts",
  "params": {
    "name": "nature"
  },
  "data": {
    "cursor": "QVFEM0xYb2...",
    "posts": [
      {
        "author": {
          "id": "9129067435",
          "username": "wildlife_daily"
        },
        "caption": "Golden hour in the wild.",
        "code": "CxNatureHour1",
        "comments": 812,
        "created_at": 1712000000,
        "id": "3120456789012345678",
        "likes": 98400,
        "thumbnail": "https://scontent.cdninstagram.com/v/t51.29350-15/example.jpg",
        "type": "image",
        "url": "https://www.instagram.com/p/CxNatureHour1/"
      }
    ]
  },
  "meta": {
    "credits_charged": 1,
    "latency_ms": 420,
    "platform": "instagram",
    "resource": "hashtag-posts",
    "path": "/api/v1/instagram/hashtag-posts"
  }
}
```

## Links

- HTML docs: https://trysocify.com/docs/api/instagram/hashtag-posts
- SEO page: https://trysocify.com/instagram/hashtag-posts
- OpenAPI: https://trysocify.com/openapi.json
- Catalog: https://trysocify.com/catalog.json
