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

# Getting Started

> Start integrating SocQ social data APIs.

# SocQ Documentation

SocQ provides asynchronous social data APIs for public Instagram and Facebook data.

## Base URL

```text theme={null}
https://api.socq.ai
```

## Authentication

All requests require an API key:

```http theme={null}
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

## Request Flow

<Steps>
  <Step title="Submit a data task">
    Call one of the product endpoints, such as `POST /v1/instagram/posts`.
  </Step>

  <Step title="Receive a task ID">
    The submit endpoint returns immediately with a `task_id`.
  </Step>

  <Step title="Query task status">
    Poll `GET /v1/tasks/{task_id}` until the status becomes `succeeded` or `failed`.
  </Step>

  <Step title="Read results">
    When the task succeeds, `GET /v1/tasks/{task_id}` automatically returns normalized records under `results`. Download raw JSONL files from `GET /v1/tasks/{task_id}/files`.
  </Step>
</Steps>

## Status Values

| Status      | Description                                  |
| ----------- | -------------------------------------------- |
| `queued`    | Task has been accepted and is waiting to run |
| `running`   | Task is processing                           |
| `succeeded` | Task completed successfully                  |
| `failed`    | Task failed; see `error_message`             |

<Info>
  Data collection tasks are asynchronous. A successful submit response means the task was created, not that the final data is ready.
</Info>
