> **For coding agents and LLMs:** This is one page from the Social Fetch docs (markdown export). The sections below mirror the orientation block in [`/llms.txt`](https://www.socialfetch.dev/llms.txt); use [`/llms.json`](https://www.socialfetch.dev/llms.json) when you need a structured operation inventory. The catalog covers documented operations with on-site reference pages.

## This page

- **On-site (HTML):** [https://www.socialfetch.dev/docs](https://www.socialfetch.dev/docs)
- **Markdown (.mdx) URL:** [https://www.socialfetch.dev/docs.mdx](https://www.socialfetch.dev/docs.mdx)

## API base URL and authentication

- **API origin (from OpenAPI `servers`):** `https://api.socialfetch.dev`
- **Authentication:** send `x-api-key: sfk_...` on `/v1/**` routes unless the operation is explicitly anonymous (check OpenAPI `security`, the [API reference hub](https://www.socialfetch.dev/docs/api.mdx), [`/llms.txt`](https://www.socialfetch.dev/llms.txt), or [`/llms.json`](https://www.socialfetch.dev/llms.json) for each route).
- **OpenAPI JSON:** [https://www.socialfetch.dev/openapi.json](https://www.socialfetch.dev/openapi.json)

## Recommended docs entrypoints (this site)

- [Documentation overview](https://www.socialfetch.dev/docs.mdx) — top-level orientation (markdown).
- [Quickstart](https://www.socialfetch.dev/docs/quickstart.mdx) — authenticate with `x-api-key`, validate auth with `whoami`, and understand the JSON envelope.
- [SDK](https://www.socialfetch.dev/docs/sdk.mdx) — official TypeScript SDK guide, including `SocialFetchClient`, `Result`, and `unwrap()`.
- [SDK reference](https://www.socialfetch.dev/docs/sdk-reference.mdx) — exhaustive SDK method inventory and route mapping for agents, tooling, and power users.
- [Choose the right endpoint](https://www.socialfetch.dev/docs/choose-endpoint.mdx) — task-oriented route selection for smoke tests, profiles, list endpoints, and single-item lookups.
- [Capability matrix](https://www.socialfetch.dev/docs/capability-matrix.mdx) — fast comparison of identifiers, pagination, outcomes, media download, and SDK coverage.
- [`/llms.json`](https://www.socialfetch.dev/llms.json) — structured machine-readable operation inventory with parameter names, pagination, outcomes, credits, and SDK mapping.
- [API reference hub](https://www.socialfetch.dev/docs/api.mdx) — human-friendly index of operations with links into generated pages.
- [Errors](https://www.socialfetch.dev/docs/errors.mdx) — shared error envelope and HTTP status guidance.
- [Credits](https://www.socialfetch.dev/docs/credits.mdx) — metering, `402`, and planning batch jobs.
- Outcome semantics such as `found`, `not_found`, and `private` are documented in [Errors](https://www.socialfetch.dev/docs/errors.mdx) and on operation pages when present in the OpenAPI contract.

## Markdown docs convention

- Every docs page has a markdown twin: append **`.mdx`** to the docs pathname (for example `/docs/quickstart` → `/docs/quickstart.mdx`).
- Agents that send `Accept: text/markdown` on `/docs/**` HTML URLs may receive markdown directly (same URL, `Vary: Accept`).

---
# Documentation (https://www.socialfetch.dev/docs)

Welcome to the Social Fetch API docs. Social Fetch provides normalized Instagram, TikTok, and X/Twitter data through a versioned REST API and a published OpenAPI spec.

<AgentPrompt />

<Callout type="info" title="Start here">
  Production API base URL: &#x2A;*`https://api.socialfetch.dev`*&#x2A;. Authenticate with &#x2A;*`x-api-key: sfk_...`*&#x2A;. For tooling and codegen, use &#x2A;*[`/openapi.json`](/openapi.json)** or go straight to the [API reference](/docs/api).
</Callout>

Choose your path [#choose-your-path]

* **Integrating manually?** Start with [Quickstart](/docs/quickstart), then read [Errors](/docs/errors), [Credits](/docs/credits), and the [API reference](/docs/api).
* **Integrating from TypeScript?** Start with [Quickstart](/docs/quickstart), then move to the [SDK guide](/docs/sdk).
* **Using a coding agent?** Start with [`/llms.txt`](/llms.txt) for the curated index and [`/llms.json`](/llms.json) for the structured operation inventory, then give the agent [Quickstart](/docs/quickstart), [API reference](/docs/api), and [`/openapi.json`](/openapi.json).

<Cards className="grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3">
  <Card title="Quickstart" description="Make a smoke-test request, confirm auth, and understand the response envelope." href="/docs/quickstart" icon="<Zap className=&#x22;size-5 text-fd-primary&#x22; />" />

  <Card title="SDK" description="Use the official TypeScript SDK when you want typed client methods instead of raw HTTP." href="/docs/sdk" icon="<Package className=&#x22;size-5 text-fd-primary&#x22; />" />

  <Card title="API reference" description="Interactive operation pages — params, examples, and response shapes." href="/docs/api" icon="<Code2 className=&#x22;size-5 text-fd-primary&#x22; />" />

  <Card title="Credits & billing" description="Metered routes, `402` handling, and `creditsCharged` metadata." href="/docs/credits" icon="<WalletCards className=&#x22;size-5 text-fd-primary&#x22; />" />
</Cards>

Platform coverage [#platform-coverage]

Browse the API by platform and task:

* **Instagram**: profile, profile posts, single post or reel
* **TikTok**: profile, profile videos, single video or post
* **Twitter**: profile, profile tweets, single tweet
* **Utilities**: `whoami`, `balance`, and `health`

The fastest way to see the full surface area is the [API reference](/docs/api), which groups every documented operation and links to generated schema pages.

What you get [#what-you-get]

<Cards className="grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3">
  <Card title="Versioned API" description="Stable JSON under `/v1` with explicit error codes and request IDs for support." icon="<LayoutList className=&#x22;size-5 text-fd-muted-foreground&#x22; />" />

  <Card title="Predictable errors" description="One envelope for successes and failures — see Errors for codes and semantics." href="/docs/errors" icon="<BookOpen className=&#x22;size-5 text-fd-muted-foreground&#x22; />" />
</Cards>

Machine-readable docs [#machine-readable-docs]

* Append &#x2A;*`.mdx`** to any docs URL for the markdown version, for example `/docs/quickstart.mdx`.
* Use [`/llms.txt`](/llms.txt) as the curated LLM index for the most important docs pages.
* Use [`/llms.json`](/llms.json) when you want the same route inventory as structured JSON, including parameter names, pagination, outcomes, credits, and SDK mapping.
* Use [`/openapi.json`](/openapi.json) when you need the full schema for codegen, validation, or agent tooling.

<Callout type="idea" title="Tip">
  First-time developer onboarding should usually touch only four pages: [Quickstart](/docs/quickstart), [SDK](/docs/sdk) or [API reference](/docs/api), [Errors](/docs/errors), and [Credits](/docs/credits). Give coding agents [`/llms.txt`](/llms.txt), [`/llms.json`](/llms.json), plus [`/openapi.json`](/openapi.json).
</Callout>