# Zapier (/docs/integrations/zapier) Pull social media data into Zapier without writing a server. You can call SocialCrawl from a Zap with Webhooks by Zapier. One GET request returns structured data that later steps can read. Setup takes three steps: add the webhook step, set the key header, test it. Webhooks by Zapier is the one Zapier app that needs a paid Zapier plan, so check your plan first. ## Before you start Create an API key in the dashboard under API Keys. Put it only in the header field of the webhook step, and never paste a Zap's contents into a public place. Prove the key with a call that costs nothing: ```bash title="Check the key (0 credits)" curl "https://www.socialcrawl.dev/v1/credits/balance" \ -H "x-api-key: sc_your_key_here" ``` A reply with `"success": true` and your balance in `data.balance` means the key works. ## Connect Add a Webhooks by Zapier action that sends a GET request, and set these fields: | Field | Value | | ------- | ------------------------------------------------------- | | URL | `https://www.socialcrawl.dev/v1/tiktok/profile` | | Query | `handle` = `charlidamelio` | | Headers | `x-api-key` = your key | Change the path and the query to call any other endpoint. Browse the [platform directory](/platforms) to find one. ## Read the answer Every response has the same shape, so one mapping works for every platform. Branch on `success`, and read the rows from `data`. A list puts them in `data.items`, with `pagination.next_cursor` as the token for the next page. ```json title="Response (trimmed)" { "success": true, "data": { "author": { "username": "charlidamelio" } }, "credits_used": 1, "credits_remaining": 99 } ``` To read the next page of a list, send `next_cursor` back as the `cursor` query parameter, and stop when `pagination.has_more` is `false`. See [Pagination](/docs/pagination.md). ## When it stops Zapier sends an email to your account address by default when a Zap errors, and a failed run shows in your Zap history. Nothing in the Zap emails the SocialCrawl message itself, so open the failed step in the history to read the response body. When credits run out, the answer is a 402 with `error.type` set to `INSUFFICIENT_CREDITS`. In the body, read `error.message` for the text and `error.details.checkout_url` for the link that opens checkout. When the link is absent, `error.details.top_up_url` opens the billing page. Never retry a 402, because it fails until credits are added. Retry a 429 after the seconds in the `Retry-After` header, and a 502, 503 or 504 after a short backoff. See [Errors](/docs/errors.md) and [Rate limits](/docs/rate-limits.md). ## What a run costs It depends on the endpoint, and some endpoints are priced by what they return. [Endpoint pricing](/docs/endpoint-pricing.md) lists each one, and [Credits](/docs/credits.md) explains cache hits and refunds. Before you turn a Zap on, `GET /v1/utility/estimate` quotes a call for 0 credits. - [Errors](/docs/errors.md): Every error code, with the fix and whether to retry. - [Credits](/docs/credits.md): How credits, cache hits and refunds work. - [Endpoint pricing](/docs/endpoint-pricing.md): What each endpoint costs before you turn a Zap on.