# Instagram Profile Embed

Retrieve the official embeddable HTML page Instagram serves for a public profile, ready to drop into an iframe. A completed lookup costs one credit, including a definitive not-found result, because every lookup uses costly dedicated Instagram proxies.

- **Documentation:** [https://staging.scrappa.co/docs/instagram-api/instagram_user_embed](https://staging.scrappa.co/docs/instagram-api/instagram_user_embed)
- **API group:** Instagram API
- **Endpoint:** `GET https://scrappa.co/api/instagram/user/embed`

## 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 | Yes | Instagram username (without @) |

## Example request

```bash
#!/bin/bash

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

## Example response

```json
{
    "success": true,
    "found": true,
    "username": "natgeo",
    "embed_url": "https://www.instagram.com/natgeo/embed/",
    "embed_html": "<!DOCTYPE html><html>..."
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 403 | Login Required | Instagram explicitly requires login. Scrappa does not retry the login-gated resource. Profile lookups may recover from public profile data; unresolved login requirements are nonbillable and not retryable. |
| 422 | Validation Error | The username parameter is missing or not a valid Instagram username. |
| 503 | Instagram Upstream Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## More Scrappa resources

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