> ## Documentation Index
> Fetch the complete documentation index at: https://juicer.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Connect Instagram, TikTok, YouTube, X, and 15+ social platforms with Juicer's API. Create a feed, add a source, and ship an embeddable snippet in five API calls.

This walkthrough takes you from zero to an embeddable feed.

## 0. Get an API key

If you don't have one yet, request a temporary key:

```bash theme={null}
curl -X POST https://api.juicer.io/v1/authorize \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "client_name": "My Tool"}'
```

See [Authentication](/authentication) for how the response is shaped.

## 1. Check your account

```bash theme={null}
curl https://api.juicer.io/v1/account \
  -H "Authorization: Bearer jcr_your_key"
```

Returns your plan, current usage, and feature flags.

## 2. See available platforms

```bash theme={null}
curl https://api.juicer.io/v1/platforms \
  -H "Authorization: Bearer jcr_your_key"
```

Each platform lists its supported `term_type` values and whether OAuth is required before you can create sources for it.

## 3. Create a feed

```bash theme={null}
curl -X POST https://api.juicer.io/v1/feeds \
  -H "Authorization: Bearer jcr_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Brand Feed"}'
```

## 4. Add a source

```bash theme={null}
curl -X POST https://api.juicer.io/v1/feeds/{feed_id}/sources \
  -H "Authorization: Bearer jcr_your_key" \
  -H "Content-Type: application/json" \
  -d '{"platform": "YouTube", "term": "NASA", "term_type": "username"}'
```

Some platforms require a connected social account before sources can be created. Whether a given term type needs one is account-aware, so always check at runtime via `GET /platforms` (look at `requires_connection` on each term type) or `GET /social_accounts/status`. See [Connecting Social Accounts](#connecting-social-accounts) below for the flow.

## 5. Get the embed code

```bash theme={null}
curl https://api.juicer.io/v1/feeds/{feed_id}/embed \
  -H "Authorization: Bearer jcr_your_key"
```

Returns four ready-to-use snippets:

* **JavaScript** — `<script>` tag for any website
* **iframe** — for platforms that don't allow JavaScript
* **WordPress shortcode** — `[juicer name='your-feed']`
* **WordPress PHP** — `<?php juicer_feed('name=your-feed'); ?>`

## Connecting Social Accounts

When a platform requires a connected account, the flow is:

1. `GET /social_accounts/status` — check which platforms need connecting
2. `POST /social_accounts/connect_url` with `{"provider": "facebook"}` — generates a magic link
3. User clicks the link — it signs them in and starts the authorization flow (no Juicer login needed)
4. `GET /social_accounts` — verify the account is connected
5. Create sources for that platform as normal

The magic link expires in 30 minutes and is single-use — useful for AI agents and CLI tools that need to walk a user through setup.

<Note>
  If you try to create a source that requires a connected account and none is available, the API returns `422` with `error.code = "social_account_required"` and an `error.action` containing a magic link the user can click to complete the connection.
</Note>

## Plan limits

If you hit a plan limit, the API returns `422` with `error.code` of either `feed_limit_reached` or `source_limit_reached`, plus an `error.action` of type `upgrade_plan` containing a magic link to the upgrade page with the correct plan pre-selected.
