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

# X Posts

> Collect public X posts by URL.

# X Posts

Collect one normalized post record for each public post URL. Both `x.com` and `twitter.com` post URLs are accepted.

```json theme={"system"}
{
  "urls": ["https://x.com/openai/status/1234567890123456789"]
}
```

## Use with MCP

| Interface      | Value                                     |
| -------------- | ----------------------------------------- |
| REST           | `POST /v1/x/posts`                        |
| Compact MCP    | `socq_execute` with `endpoint: "x/posts"` |
| Typed MCP      | `socq_x_posts`                            |
| Exact-tool URL | `https://api.socq.ai/mcp?tools=x_posts`   |
| CLI            | `socq x posts`                            |

Use the JSON request body above as the nested `input` object for `socq_execute`, or pass the same fields directly to the typed tool. Typed tools also accept `_wait_seconds`, `_result_limit`, and `_idempotency_key`.

<Info>
  A successful collection returns a `task_id`. Continue with `socq_get_task` until the task succeeds, then read normalized records from `results.items`.
</Info>

See [MCP quickstart](/integrations/mcp) for the complete submission and polling flow.

## Result Item

```json theme={"system"}
{
  "id": "1234567890123456789",
  "platform": "x",
  "resource": "posts",
  "type": "post",
  "url": "https://x.com/openai/status/1234567890123456789",
  "text": "Example public post",
  "language": "en",
  "author": {
    "id": "123456789",
    "username": "openai",
    "name": "OpenAI",
    "url": "https://x.com/openai",
    "avatar_url": "https://example.com/avatar.jpg",
    "is_verified": true,
    "is_private": false
  },
  "metrics": {
    "likes_count": 1200,
    "comments_count": 80,
    "reposts_count": 150,
    "quotes_count": 20,
    "views_count": 100000,
    "bookmarks_count": 40
  },
  "media": [],
  "hashtags": [],
  "mentions": [],
  "created_at": "2026-07-17T08:00:00",
  "collected_at": "2026-07-17T10:30:00",
  "extra": {}
}
```


## OpenAPI

````yaml api-manual/agent-api/agent-api.json POST /v1/x/posts
openapi: 3.1.0
info:
  title: SocQ Agent API
  version: v1-063d1c96173a
  description: Asynchronous social data API generated from the SocQ Capability Registry.
servers:
  - url: https://api.socq.ai
security: []
paths:
  /v1/x/posts:
    post:
      tags:
        - x
      summary: X Posts API
      description: X Posts API
      operationId: socq_x_posts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              additionalProperties: false
              properties:
                urls:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  minItems: 1
                  description: Public profile or content URLs.
              required:
                - urls
      responses:
        '200':
          description: Task accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSubmitResponse'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    AgentSubmitResponse:
      type: object
      properties:
        code:
          type: integer
          const: 200
        data:
          type: object
          properties:
            task_id:
              type: string
            status:
              type: string
            created_time:
              type:
                - string
                - 'null'
            idempotent_replay:
              type: boolean
          required:
            - task_id
            - status
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````