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

# Search Posts

> Search X posts by query string

Search for posts on X matching a query string with pagination support.

## Query Parameters

<ParamField query="q" type="string" required>
  Search query string (1-1000 characters)
</ParamField>

<ParamField query="count" type="number" default="20">
  Number of results to return (1-50)
</ParamField>

<ParamField query="cursor" type="string">
  Pagination cursor for fetching next page
</ParamField>

## Response

<ResponseField name="posts" type="array">
  Array of post objects
</ResponseField>

<ResponseField name="nextCursor" type="string">
  Cursor for fetching the next page of results
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl -X GET "https://scrape.st/x/search?q=bitcoin&count=20" \
    -H "x-api-key: YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "posts": [
      {
        "id": "1886493083207827456",
        "text": "Bitcoin hits new all-time high! 🚀",
        "created_at": "2024-04-02T15:30:00.000Z",
        "lang": "en",
        "favorite_count": 15000,
        "retweet_count": 3000,
        "reply_count": 800,
        "quote_count": 400,
        "bookmark_count": 1200,
        "author": {
          "id": "44196397",
          "name": "Elon Musk",
          "screen_name": "elonmusk",
          "profile_image_url": "https://pbs.twimg.com/profile_images/xxx/elonmusk_normal.jpg",
          "verified": true,
          "is_blue_verified": true
        },
        "link": "https://x.com/elonmusk/status/1886493083207827456"
      }
    ],
    "nextCursor": "DAABCgAB..."
  }
  ```
</ResponseExample>
