> ## 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.

# Facebook Posts

> Collect public Facebook post data.

# Facebook Posts

Collect public Facebook post data, including post text, source URLs, media fields, and engagement metrics.

## Endpoint

```http theme={null}
POST https://api.socq.ai/v1/facebook/posts
```

## Request Body

```json theme={null}
{
  "urls": ["https://www.facebook.com/facebook/posts/POST_ID"],
  "results_limit": 10
}
```

## Result Item

After the task succeeds, call `GET /v1/tasks/{task_id}` to read paginated standard records under `results`.

```json theme={null}
{
  "id": "1569965031842178",
  "platform": "facebook",
  "resource": "posts",
  "type": "post",
  "url": "https://www.facebook.com/facebook/posts/1569965031842178",
  "message": "Post message text",
  "author": {
    "id": "100064860875397",
    "username": "facebook",
    "name": "facebook",
    "url": "https://www.facebook.com/facebook/",
    "avatar_url": null,
    "is_verified": null,
    "is_private": null
  },
  "metrics": {
    "likes_count": 11033,
    "comments_count": 2070,
    "shares_count": 541,
    "reactions_count": 11033
  },
  "reactions": {
    "like": 8340,
    "love": 1555,
    "care": 245,
    "haha": 821,
    "wow": 40,
    "sad": 12,
    "angry": 20
  },
  "media": [],
  "created_at": "2026-07-07T19:17:33",
  "collected_at": "2026-07-08T08:59:45",
  "extra": {}
}
```

## Response

```json theme={null}
{
  "code": 200,
  "data": {
    "task_id": "A1B2C3D4E5F6G7H8",
    "status": "queued",
    "created_time": "2026-07-08T10:30:00"
  }
}
```


## OpenAPI

````yaml api-manual/agent-api/agent-api.json POST /v1/facebook/posts
openapi: 3.0.0
info:
  title: Agent API
  description: Asynchronous social data collection API
  version: 1.0.0
servers:
  - url: https://api.socq.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /v1/facebook/posts:
    post:
      tags:
        - Agent API
      summary: Submit Facebook Posts task
      description: Collect public Facebook post data.
      operationId: submitFacebookPostsTask
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              default:
                summary: Submit Facebook Posts task
                value:
                  results_limit: 10
                  urls:
                    - https://www.facebook.com/facebook/posts/POST_ID
              with_callback:
                summary: With callback URL
                value:
                  results_limit: 10
                  callback_url: https://your-domain.com/webhook
                  urls:
                    - https://www.facebook.com/facebook/posts/POST_ID
      responses:
        '200':
          description: Task submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
components:
  schemas:
    SubmitRequest:
      type: object
      additionalProperties: false
      properties:
        urls:
          type: array
          items:
            type: string
          description: Array of public URLs to collect.
        usernames:
          type: array
          items:
            type: string
          description: Array of public usernames to collect.
        query:
          type: string
          description: Search query
        results_limit:
          type: integer
          minimum: 1
          description: Maximum number of results to collect
        callback_url:
          type: string
          description: Optional callback URL
    SubmitResponse:
      type: object
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          properties:
            task_id:
              type: string
              example: A1B2C3D4E5F6G7H8
            status:
              type: string
              example: queued
            created_time:
              type: string
              format: date-time
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    PaymentRequired:
      description: Insufficient credits
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````