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

# X (Twitter)

> Twitter/X data via Apify.

Twitter/X data via Apify. Search tweets with advanced query syntax, or scrape profiles, tweet URLs, and lists. Returns slimmed tweet projections by default; pass filter.mode=full for the raw payload.

1 endpoint available through Lava's AI Gateway. See the [X (Twitter) API docs](https://docs.apify.com/api/v2) for full documentation.

<Info>Supports both **managed** (Lava's API keys) and **unmanaged** (bring your own credentials) mode.</Info>

## Endpoints

### Scrape tweets from Twitter/X. Supports search terms (Twitter advanced search syntax), profile handles, tweet URLs, and list URLs. By default Lava returns a compact projection (\~400 bytes/tweet) with id/url/text/createdAt/lang/counts, a slim author (userName, name, description, followers, verified), and slimmed entities (hashtags, expanded URLs, user mentions); retweets and quotes are recursively slimmed. Pass `filter.mode="full"` to receive the raw Apify payload (\~4-6KB/tweet) with media variants, card binding values, and full author metadata. \$0.40 per 1,000 tweets.

**POST** `https://api.apify.com/v2/acts/apidojo~tweet-scraper/run-sync-get-dataset-items` — \$0.008 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.apify.com/v2/acts/apidojo~tweet-scraper/run-sync-get-dataset-items', { body: {"searchTerms":["from:NASA"],"maxItems":20,"sort":"Latest"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.apify.com%2Fv2%2Facts%2Fapidojo~tweet-scraper%2Frun-sync-get-dataset-items" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"searchTerms":["from:NASA"],"maxItems":20,"sort":"Latest"}'
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
