# Instagram User Tagged Posts

Retrieve the public Instagram posts a user is tagged in, with pagination support. Accepts either the username (resolved to the numeric user id internally) or the numeric user id directly. Returns post details including media URLs, captions, and engagement metrics. Note: Instagram returns only the post author's numeric id on this endpoint — resolve author details with the /user/basic endpoint. A completed lookup costs one credit, including a definitive not-found result, because every lookup uses costly dedicated Instagram proxies.

- **Documentation:** [https://scrappa.co/docs/instagram-api/instagram_user_tagged_posts](https://scrappa.co/docs/instagram-api/instagram_user_tagged_posts)
- **API group:** Instagram API
- **Endpoint:** `GET https://scrappa.co/api/instagram/user/tagged-posts`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `username` | string | No | Instagram username (without @). Required when user_id is not provided. |
| `user_id` | string | No | Numeric Instagram user ID. Required when username is not provided. |
| `max_id` | string | No | Pagination cursor from previous response (next_max_id) |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/instagram/user/tagged-posts?username=natgeo"
```

## Example response

```json
{
    "success": true,
    "found": true,
    "user_id": "787132",
    "username": "natgeo",
    "posts": [
        {
            "id": "1929261108986102451",
            "shortcode": "BrGHMHIF8Kz",
            "media_type": "image",
            "caption": "Vardzia is a cave monastery site located in southern Georgia...",
            "hashtags": [
                "georgia",
                "exploregeorgia"
            ],
            "taken_at": null,
            "like_count": 14030,
            "comment_count": 581,
            "play_count": null,
            "media": [
                {
                    "type": "image",
                    "thumbnail_url": "https://..."
                }
            ],
            "location": null,
            "author": {
                "id": "429173",
                "username": null
            },
            "permalink": "https://www.instagram.com/p/BrGHMHIF8Kz/"
        }
    ],
    "posts_count": 12,
    "more_available": true,
    "next_max_id": "1928051354388873282"
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | Neither username nor user_id was provided, or a value has an invalid format. |
| 503 | Instagram Upstream Unavailable | Instagram rejected or failed all bounded attempts through approved proxies. Retry the request later. The request is retryable and does not consume credits. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
