> Documentation index: https://www.socialcrawl.dev/llms.txt > Every page is also available as Markdown by adding .md. # API introduction (/docs/api-reference/introduction) The base URL, how to authenticate, what a response looks like and where each part of the API is documented. ## What the API covers The SocialCrawl API reads public data from 95 platforms through 802 endpoints. Every endpoint answers with the same JSON shape, so code written for one platform reads the others. - [Endpoints](/docs/api-reference.md): Every endpoint with its parameters, a request builder and a sample response. - [Response objects](/docs/schema.md): The fields of a post, an author, a comment and every other object the API returns. - [Account endpoints](/docs/api-reference/account.md): Read your balance, your usage and the limits of your key. These calls are free. ## Base URL ```text title="Base URL" https://www.socialcrawl.dev/v1 ``` Every path in this reference sits under `/v1`. Nothing already live under `/v1` changes how it works, and [Versioning](/docs/versioning.md) explains how a retirement is announced. ## Authentication Send your key in the `x-api-key` header, or as `Authorization: Bearer` if your tool prefers that form. ```bash title="cURL" curl "https://www.socialcrawl.dev/v1/tiktok/profile?handle=charlidamelio" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" ``` [Authentication](/docs/authentication.md) covers creating a key, capping what a key may spend, and OAuth for agents. ## Response codes A failed call answers with one of the statuses below, and its body names the exact error code. One status can carry several codes, so read `error.type` in the body before you decide what to do. | Status | Name | Details | |---|---|---| | 200 | OK | The call worked. The data is in `data`. | | 202 | Accepted | A run continues. Follow `data.next.status_url`. | | 400 | Bad Request | [`INVALID_REQUEST`](/docs/errors.md#invalid-request), [`COHORT_MEMBER_LIMIT_EXCEEDED`](/docs/errors.md#cohort-member-limit-exceeded), [`COHORT_LIMIT_EXCEEDED`](/docs/errors.md#cohort-limit-exceeded), [`COHORT_IDENTITY_PLATFORM_UNSUPPORTED`](/docs/errors.md#cohort-identity-platform-unsupported) | | 401 | Unauthorized | [`MISSING_API_KEY`](/docs/errors.md#missing-api-key), [`INVALID_API_KEY`](/docs/errors.md#invalid-api-key) | | 402 | Payment Required | [`INSUFFICIENT_CREDITS`](/docs/errors.md#insufficient-credits), [`KEY_BUDGET_EXCEEDED`](/docs/errors.md#key-budget-exceeded) | | 403 | Forbidden | [`INSUFFICIENT_SCOPE`](/docs/errors.md#insufficient-scope), [`MONITOR_LIMIT_REACHED`](/docs/errors.md#monitor-limit-reached) | | 404 | Not Found | [`ENDPOINT_NOT_FOUND`](/docs/errors.md#endpoint-not-found), [`RESOURCE_NOT_FOUND`](/docs/errors.md#resource-not-found), [`RUN_NOT_FOUND`](/docs/errors.md#run-not-found), [`SCHEDULE_NOT_FOUND`](/docs/errors.md#schedule-not-found), [`STREAM_NOT_FOUND`](/docs/errors.md#stream-not-found) | | 405 | Method Not Allowed | [`METHOD_NOT_ALLOWED`](/docs/errors.md#method-not-allowed) | | 409 | Conflict | [`IDEMPOTENCY_KEY_CONFLICT`](/docs/errors.md#idempotency-key-conflict), [`IDEMPOTENCY_IN_PROGRESS`](/docs/errors.md#idempotency-in-progress), [`IDEMPOTENCY_REPLAY_UNAVAILABLE`](/docs/errors.md#idempotency-replay-unavailable), [`COHORT_IDENTITY_CONFLICT`](/docs/errors.md#cohort-identity-conflict), [`COHORT_QUERY_NOT_CANCELLABLE`](/docs/errors.md#cohort-query-not-cancellable), [`COHORT_QUERY_NOT_READY`](/docs/errors.md#cohort-query-not-ready), [`RUN_STATE_CONFLICT`](/docs/errors.md#run-state-conflict), [`STREAM_STATE_CONFLICT`](/docs/errors.md#stream-state-conflict) | | 410 | Gone | [`RUN_EXPIRED`](/docs/errors.md#run-expired), [`CURSOR_EXPIRED`](/docs/errors.md#cursor-expired) | | 413 | Content Too Large | [`COHORT_RESULT_TOO_LARGE`](/docs/errors.md#cohort-result-too-large), [`PAYLOAD_TOO_LARGE`](/docs/errors.md#payload-too-large) | | 422 | Unprocessable Content | [`IDEMPOTENCY_KEY_PAYLOAD_MISMATCH`](/docs/errors.md#idempotency-key-payload-mismatch), [`NEEDS_ASYNC`](/docs/errors.md#needs-async) | | 429 | Too Many Requests | [`CONCURRENCY_LIMIT`](/docs/errors.md#concurrency-limit), [`RATE_LIMITED`](/docs/errors.md#rate-limited) | | 500 | Internal Server Error | [`INTERNAL_ERROR`](/docs/errors.md#internal-error) | | 502 | Bad Gateway | [`UPSTREAM_ERROR`](/docs/errors.md#upstream-error) | | 503 | Service Unavailable | [`SERVICE_UNAVAILABLE`](/docs/errors.md#service-unavailable) | | 504 | Gateway Timeout | [`UPSTREAM_ERROR`](/docs/errors.md#upstream-error) | [Errors](/docs/errors.md) lists every code, whether to retry it, and whether the call is charged. ## Rate limits Each key may send 600 requests a minute and keep 50 in flight at once. A call over either limit answers 429 with a `Retry-After` header that says how long to wait. [Rate limits](/docs/rate-limits.md) has the headers and the backoff to use.