---
title: "Search Twitter Posts"
method: GET
path: "/v1/twitter/posts"
tags: ["Twitter"]
---

# Search Twitter Posts

`GET /v1/twitter/posts`

## Request

- Base URL: `https://apidirect.io`
- URL: `https://apidirect.io/v1/twitter/posts`
- Auth: API key in header `X-API-Key`

Search for tweets by keyword. Returns tweet content, author username, URL, publication date, engagement metrics (likes, retweets, replies, quotes, bookmarks, views), author info (follower count, verification), language, hashtags, and user mentions. Supports sorting by most recent or relevance, and filtering by time window (posted_ago) or date range (start_date, end_date). Fetch multiple pages in a single request.

**Price:** $0.006 per page. **Free tier:** 50 requests/month.

## Query parameters

- `query` string, required
- `pages` integer
- `sort_by` 'most_recent' | 'relevance'
- `posted_ago` '1h' | '24h' | '7d' | '30d' | '12m'
- `start_date` string, date
- `end_date` string, date
- `get_sentiment` boolean

## Response `200`

Successful response

- SearchTwitterResponse: Inferred from a live response. Any field can be null or absent, and new fields may be added at any time.
  - `count` number, nullable
  - `pages` number, nullable
  - `posts` object[], nullable
    - `author` string, nullable
    - `author_followers` number, nullable
    - `author_verified` boolean, nullable
    - `bookmarks` number, nullable
    - `date` string, nullable
    - `domain` string, nullable
    - `hashtags` string[], nullable
    - `is_quote` boolean, nullable
    - `is_reply` boolean, nullable
    - `lang` string, nullable
    - `likes` number, nullable
    - `quotes` number, nullable
    - `replies` number, nullable
    - `retweets` number, nullable
    - `snippet` string, nullable
    - `source` string, nullable
    - `title` string, nullable
    - `url` string, nullable
    - `user_mentions` string[], nullable
    - `views` number, nullable

## Other responses

- `400`: Bad request: a required parameter is missing or a value is invalid (code: missing_parameter or invalid_parameter).
- `401`: Unauthorized: the API key is missing or invalid (code: missing_api_key or invalid_api_key).
- `402`: Free tier used up for this endpoint and no payment method on file (`payment_required`).
- `403`: Account blocked after a failed payment (`account_blocked`).
- `429`: Rate limit exceeded, or too many concurrent requests for this endpoint
- `500`: Internal server error (code: server_error).
- `502`: Temporary failure retrieving X (Twitter) data. Please retry shortly.
- `503`: Service temporarily unavailable. Please retry shortly.
- `504`: The request timed out

---

[API](https://skmtc.dev/apidirect/apis/api-direct.md) · [All operations](https://skmtc.dev/apidirect/apis/api-direct/llms.txt) · [OpenAPI document](https://skmtc.dev/apidirect/apis/api-direct/revisions/fa8c68d70bd0?raw)
