> ## 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 User Posts

> Collect recent public posts from X profiles.

# X User Posts

Collect recent public posts for one or more usernames. Replies are excluded.

```json theme={"system"}
{
  "usernames": ["openai", "github"],
  "results_limit": 40
}
```

## Use with MCP

| Interface      | Value                                          |
| -------------- | ---------------------------------------------- |
| REST           | `POST /v1/x/user-posts`                        |
| Compact MCP    | `socq_execute` with `endpoint: "x/user-posts"` |
| Typed MCP      | `socq_x_user_posts`                            |
| Exact-tool URL | `https://api.socq.ai/mcp?tools=x_user_posts`   |
| CLI            | `socq x user-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.

`results_limit` specifies the maximum number of posts returned for each username. The total number of results can be up to the number of usernames multiplied by `results_limit`. Billing is based on the total number of results returned.

Results use the normalized structure documented in [X Posts](/api-manual/x/posts), with `resource` set to `user-posts`. The submitted username is returned under `extra.input_username`.


## OpenAPI

````yaml api-manual/agent-api/agent-api.json POST /v1/x/user-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/user-posts:
    post:
      tags:
        - x
      summary: X User Posts API
      description: X User Posts API
      operationId: socq_x_user_posts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              additionalProperties: false
              properties:
                results_limit:
                  type: integer
                  minimum: 1
                  maximum: 2000
                usernames:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  minItems: 1
                  description: Public account usernames.
              required:
                - usernames
      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

````