# Instagram Post

Retrieve detailed information about a specific Instagram post by URL. For best results, use URLs that include the username (e.g., instagram.com/username/p/ABC123/). URLs without username (e.g., instagram.com/p/ABC123/) will attempt automatic username discovery, but this may not always succeed. Returns media URLs, captions, engagement metrics, author info, and tagged users. 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_post](https://scrappa.co/docs/instagram-api/instagram_post)
- **API group:** Instagram API
- **Endpoint:** `GET https://scrappa.co/api/instagram/post`

## 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 |
| --- | --- | --- | --- |
| `url` | string | No | Instagram post URL. Recommended format: https://www.instagram.com/username/p/ABC123/ (URLs without username may have limited success) |
| `shortcode` | string | No | Instagram post shortcode (e.g., DUBtwxGEqz2). Use when you do not have a full URL. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/instagram/post?url=https%3A%2F%2Fwww.instagram.com%2Finstagram%2Fp%2FDUBtwxGEqz2%2F"
```

## Example response

```json
{
    "success": true,
    "found": true,
    "data": {
        "id": "3819535222330010870",
        "shortcode": "DUBtwxGEqz2",
        "media_type": "video",
        "caption": "Amazing content! #instagram #viral",
        "hashtags": [
            "instagram",
            "viral"
        ],
        "taken_at": "2024-01-15T10:30:00+00:00",
        "like_count": 125000,
        "comment_count": 3500,
        "play_count": 5000000,
        "media": [
            {
                "type": "video",
                "thumbnail_url": "https://...",
                "video_url": "https://...",
                "video_versions": []
            }
        ],
        "location": {
            "id": "123456",
            "name": "Los Angeles"
        },
        "author": {
            "id": "25025320",
            "username": "instagram",
            "full_name": "Instagram",
            "profile_pic_url": "https://...",
            "is_verified": true
        },
        "collaborators": [],
        "tagged_users": [],
        "permalink": "https://www.instagram.com/p/DUBtwxGEqz2/"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | Provide either a valid Instagram post URL or shortcode. |
| 503 | Instagram Post Temporarily Unavailable | Every bounded Instagram post strategy was unavailable. 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)
