# Instagram / Tagged

Fetch public posts where a profile was tagged.

```
GET /api/v1/instagram/tagged
```

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/tagged?username=natgeo' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `posts` | array | Tagged 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[].views` | number | View/play count, when available. |
| `posts[].thumbnail` | string | Thumbnail URL. |
| `posts[].author` | object | Post owner 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": "tagged",
  "params": {
    "username": "natgeo"
  },
  "data": {
    "cursor": "QVFDY2ZDeG1pY01YenVvazR0bVBkQnZhVmhE...",
    "posts": [
      {
        "author": {
          "id": "9129067435",
          "username": "wildlife_photographer"
        },
        "caption": "Collab shoot.",
        "code": "CofSzxwIgdq",
        "comments": 13,
        "created_at": 1676047570,
        "id": "3035227396822402922",
        "likes": 49,
        "thumbnail": "https://scontent.cdninstagram.com/v/t51.2885-15/example.jpg",
        "type": "video",
        "url": "https://www.instagram.com/p/CofSzxwIgdq/",
        "views": 25910
      }
    ]
  },
  "meta": {
    "credits_charged": 1,
    "latency_ms": 420,
    "platform": "instagram",
    "resource": "tagged",
    "path": "/api/v1/instagram/tagged"
  }
}
```

## Links

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