> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scraper.creatorlookup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Complete reference for the Creator Scraper API

## Base URL

```
https://api.scraper.creatorlookup.com
```

## Authentication

All `/v1/*` endpoints require an API key in the `x-api-key` header:

```bash theme={null}
curl -H "x-api-key: sk-your-api-key" \
  https://api.scraper.creatorlookup.com/v1/credit-balance
```

## Response format

### Success

All successful scrape responses follow the same envelope:

```json theme={null}
{
  "data": { ... },
  "credits_used": 1,
  "credits_remaining": 9999
}
```

### Error

```json theme={null}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable description"
  }
}
```

See [Errors](/errors) for the full list of error codes.

## Endpoints

### System

| Method | Path      | Auth | Description  |
| ------ | --------- | ---- | ------------ |
| GET    | `/health` | No   | Health check |

### Account

| Method | Path                 | Credits | Description             |
| ------ | -------------------- | ------- | ----------------------- |
| GET    | `/v1/credit-balance` | 0       | Check remaining credits |

### Instagram

| Method | Path                          | Credits | Description                  |
| ------ | ----------------------------- | ------- | ---------------------------- |
| GET    | `/v1/instagram/profile`       | 1       | Get user profile             |
| GET    | `/v1/instagram/user/posts`    | 2       | Get user's recent posts      |
| GET    | `/v1/instagram/post`          | 1       | Get single post by shortcode |
| GET    | `/v1/instagram/post/comments` | 2       | Get comments on a post       |
| GET    | `/v1/instagram/hashtag/posts` | 1       | Search posts by hashtag      |

## Caching

Responses are cached server-side to improve performance:

| Data type     | Cache TTL  |
| ------------- | ---------- |
| Profiles      | 1 hour     |
| Posts         | 15 minutes |
| Comments      | 5 minutes  |
| Hashtag posts | 5 minutes  |

Cached responses still cost credits. The `X-Request-ID` header is included on every response for debugging.

## OpenAPI spec

The full OpenAPI 3.1 spec is available at:

* JSON: `GET /openapi.json`
* YAML: `GET /openapi.yaml`
