# Instagram / Reels

Fetch recent reels for a profile.

```
GET /api/v1/instagram/reels
```

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

## Parameters

| Name | Required | Description | Example |
|------|----------|-------------|---------|
| `username` | no | Exactly one of username or user_id. Prefer username. | `natgeo` |
| `user_id` | no | Numeric user id (alternative to username). | `787132` |
| `cursor` | no | Pagination cursor from a previous response. |  |

## Example

```bash
curl -s 'https://trysocify.com/api/v1/instagram/reels?username=natgeo' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `reels` | array | Reels for this page. |
| `reels[].id` | string | Media id. |
| `reels[].code` | string | Shortcode. |
| `reels[].url` | string | Reel URL. |
| `reels[].caption` | string | Caption text. |
| `reels[].type` | string | Usually video. |
| `reels[].created_at` | number | Unix publish timestamp. |
| `reels[].likes` | number | Like count. |
| `reels[].comments` | number | Comment count. |
| `reels[].views` | number | Play count, when available. |
| `reels[].thumbnail` | string | Thumbnail URL. |
| `reels[].video_url` | string | Video URL, when available. |
| `reels[].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": "reels",
  "params": {
    "username": "natgeo"
  },
  "data": {
    "cursor": "QVFCSFFDSnV5dTVsYk1BSTJCNndoUXlCZ1kz...",
    "reels": [
      {
        "author": {
          "id": "787132",
          "username": "natgeo"
        },
        "caption": "Behind the scenes in the field.",
        "code": "ClB4ZlQJlDs",
        "comments": 631,
        "created_at": 1668621756,
        "id": "2972905277632172268",
        "likes": 120450,
        "thumbnail": "https://scontent.cdninstagram.com/v/t51.2885-15/example.jpg",
        "type": "video",
        "url": "https://www.instagram.com/reel/ClB4ZlQJlDs/",
        "video_url": "https://scontent.cdninstagram.com/v/t50.2886-16/example.mp4",
        "views": 2450000
      }
    ]
  },
  "meta": {
    "credits_charged": 1,
    "latency_ms": 420,
    "platform": "instagram",
    "resource": "reels",
    "path": "/api/v1/instagram/reels"
  }
}
```

## Links

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