# HandleHaul API documentation

> The HandleHaul API turns a handle into public Instagram and TikTok data as JSON - profiles, followers and following newest first, posts, reels, stories, comments, TikTok transcripts and more. One API key, cursor pagination, 1 credit per successful call.

Give us a handle, we haul back everything. The HandleHaul API returns **public social data as clean JSON**: profiles, followers and following in real **newest-first** order, posts, reels, stories, highlights, comments, likers, hashtags, places, audio and search on Instagram, plus TikTok profiles, videos, followers, comments, transcripts, sounds, hashtags and search. One API key, cursor pagination, and you pay only for successful calls.

- Base URL: `https://api.handlehaul.com/v1`
- Auth: `X-Api-Key: kd_live_…` header ([Authentication](/docs/authentication))
- Sandbox: `kd_test_…` keys return realistic sample data, unlimited and free ([Sandbox](/docs/sandbox)). Every endpoint page has a **Try it** panel.
- Price: **1 credit = 1 successful call**, +1 when we have to look up a username first (send numeric ids to skip it). Credit packs from $29, never expire, from $0.83 per 1,000 calls ([Pricing](/pricing))
- **Public data only.** Private accounts answer `private_account`, free.
- AI agents: a hosted **MCP server** at `https://api.handlehaul.com/mcp` for Claude, Cursor, VS Code, Codex and more ([MCP server](/docs/mcp)), plus [llms.txt](/llms.txt) and a drop-in [AGENTS.md](/AGENTS.md)
- Building with Lovable, Bolt, Replit, v0, Cursor or Claude Code? Use the ready prompt ([Build with AI tools](/docs/build-with-ai))

## Quickstart

1. [Create an account](/signup) and confirm your email. Sandbox keys work at once.
2. Accounts that pass our automatic checks (business email, website) get 100 live test calls and can buy the two smaller packs right away. A person reviews the rest within a business day; approval opens the larger packs and more speed. See [account access](/docs/authentication#account-access).
3. Create a key under **API keys** in the dashboard (it is shown once) and call the API:

```bash
# Who did @natgeo follow most recently? Newest first.
curl "https://api.handlehaul.com/v1/users/natgeo/following" \
  -H "X-Api-Key: $HANDLEHAUL_API_KEY"
```

```python
import os, requests

r = requests.get(
    "https://api.handlehaul.com/v1/users/natgeo/followers",
    headers={"X-Api-Key": os.environ["HANDLEHAUL_API_KEY"]},
    timeout=30,
)
r.raise_for_status()
body = r.json()
newest = body["data"][0]          # position 1 = most recent follower
print(newest["username"], body["meta"]["order"])
```

```javascript
const res = await fetch("https://api.handlehaul.com/v1/users/natgeo/posts", {
  headers: { "X-Api-Key": process.env.HANDLEHAUL_API_KEY },
});
const { data, pagination, meta } = await res.json();
```

```php
$ch = curl_init("https://api.handlehaul.com/v1/users/natgeo/following");
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => ["X-Api-Key: " . getenv("HANDLEHAUL_API_KEY")],
    CURLOPT_RETURNTRANSFER => true,
]);
$body = json_decode(curl_exec($ch), true);
print_r($body["data"]);
```

```go
req, _ := http.NewRequest("GET", "https://api.handlehaul.com/v1/users/natgeo/following", nil)
req.Header.Set("X-Api-Key", os.Getenv("HANDLEHAUL_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer res.Body.Close()
var body map[string]any
json.NewDecoder(res.Body).Decode(&body)
fmt.Println(body["data"])
```

## Endpoints

| Endpoint | What it returns | Docs |
|---|---|---|
| `GET /v1/users/by-username/{username}` | Profile by handle (includes the user id) | [User ID lookup](/docs/instagram-user-id-api) |
| `GET /v1/users/{user}` | Profile by handle or id | [Profile API](/docs/instagram-profile-api) |
| `GET /v1/users/{user}/followers` | Followers, newest first, 25 a page | [Followers API](/docs/instagram-followers-api) |
| `GET /v1/users/{user}/following` | Following, newest first, ~200 a page | [Following API](/docs/instagram-following-api) |
| `GET /v1/users/{user}/posts` | Recent posts | [Posts API](/docs/instagram-posts-api) |
| `GET /v1/users/{user}/reels` | Reels with views | [Reels API](/docs/instagram-reels-api) |
| `GET /v1/users/{user}/stories` · `/highlights` | Live stories and highlights | [Stories API](/docs/instagram-stories-api) |
| `GET /v1/posts/{post}` · `/comments` · `/likers` | A post, its comments and likers | [Post API](/docs/instagram-post-api) |
| `GET /v1/search/users?q=` | Accounts matching a name | [User search API](/docs/instagram-user-search-api) |
| `GET /v1/hashtags/{tag}` · `/v1/places/{place}` · `/v1/audio/{audio}` | Hashtags, places and audio | [Hashtag API](/docs/instagram-hashtag-api) |
| `GET /v1/resolve?url=` | Any Instagram link to ids (free) | [URL resolver](/docs/instagram-url-resolver) |
| `GET /v1/tiktok/users/{user}` | TikTok profile by handle, id or secUid | [TikTok Profile API](/docs/tiktok-profile-api) |
| `GET /v1/tiktok/users/{user}/posts` | TikTok videos and photo posts, newest first | [TikTok Posts API](/docs/tiktok-posts-api) |
| `GET /v1/tiktok/users/{user}/followers` · `/following` | TikTok followers and following | [TikTok Followers API](/docs/tiktok-followers-api) |
| `GET /v1/tiktok/posts/{post}` · `/comments` · `/transcript` | A TikTok post, its comments and its transcript | [TikTok Post API](/docs/tiktok-post-api) |
| `GET /v1/tiktok/music/{music}` · `/v1/tiktok/hashtags/{tag}` | TikTok sounds and hashtags, with their posts | [TikTok Music API](/docs/tiktok-music-api) |
| `GET /v1/tiktok/search?q=` | TikTok search: videos, users, sounds | [TikTok Search API](/docs/tiktok-search-api) |
| `GET /v1/account` | Your balance, limits and key (free) | [Authentication](/docs/authentication#account-endpoint) |

The sidebar lists every endpoint. `{user}` is a numeric id (cheapest) or a handle; all digits = an id, and `@12345` means an all-digit handle. Every success looks like `{ data, pagination?, meta }`, and `meta` always carries `request_id`, `cached`, `credits_charged` and `credits_remaining`.

## Machine-readable files

- OpenAPI 3.1: [https://api.handlehaul.com/openapi.json](https://api.handlehaul.com/openapi.json)
- For LLMs and agents: [/llms.txt](/llms.txt) and [/llms-full.txt](/llms-full.txt)
- MCP server: `https://api.handlehaul.com/mcp`, server card at [/mcp/server-card](/mcp/server-card) ([setup guide](/docs/mcp))
- SDKs: `npm install handlehaul` (JavaScript and TypeScript) and `pip install handlehaul` (Python); see the [Python and JavaScript guide](/docs/instagram-api-python-javascript)
- Source on GitHub: [handlehaul-mcp](https://github.com/handlehaul/handlehaul-mcp) (MCP setup), [handlehaul-js](https://github.com/handlehaul/handlehaul-js) (JavaScript and TypeScript SDK) and [handlehaul-python](https://github.com/handlehaul/handlehaul-python) (Python SDK)
- Every docs page as Markdown: add `.md` to its URL, for example [/docs/instagram-followers-api.md](/docs/instagram-followers-api.md)

## FAQ

### What does "give us a handle" mean?
Send a username (handle) or a numeric id. We return the public profile and everything public around it: followers, following, posts, reels, stories, comments and more.

### Does the HandleHaul API work on private accounts?
No. Public data only. Private accounts answer `403 private_account`, and that call is free.

### Can AI agents use it?
Yes. The hosted MCP server at https://api.handlehaul.com/mcp works with Claude Code, Claude Desktop, Cursor, VS Code Copilot, Codex, Windsurf and Gemini CLI. Tool calls cost the same as REST calls. See [MCP server](/docs/mcp).

### Do I need a social media login?
No. You authenticate with a HandleHaul API key. The accounts you look up are never notified.
