# X API

> X's official API: look up users and posts, search public posts back to 2006 and stream matches, paid per resource returned.

Source: https://osinttools.io/tools/x-api/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

- **Inputs:** Username, Name, URL
- **Category:** Social media intelligence
- **Pricing:** Paid (Pay-per-usage: prepaid credits charged per post or user returned; no free tier described; Enterprise plans for higher volume)
- **Footprint:** passive (does not contact the target)
- **Account required:** yes, for full results
- **API:** yes
- **Platforms:** API
- **Website:** https://developer.x.com/
- **Docs:** https://docs.x.com/x-api/introduction
- **Listed:** Nov 29
- **Last verified by an editor:** Nov 29, 2026

## What it does

The X API is the official programmatic interface to X, formerly Twitter. Its v2 REST endpoints return posts, user profiles, timelines, followers, lists, Spaces and trends by location. Recent search covers the last 7 days, full-archive search goes back to 2006, and the filtered stream delivers posts that match up to 1,000 rules in near real time.

Investigators use it to pull an account's profile and timeline, search posts with operators such as from:, to:, url: and lang:, and follow a topic as it develops. You sign in to the Developer Console with an X account, accept the developer agreement, create an app and use its Bearer Token for app-only reads of public data. The current docs describe no free tier: pricing is pay-per-usage, with credits bought upfront and charged per post or user returned, deduplicated within a 24-hour UTC day. Pay-per-usage accounts are capped at 3 million post reads per monthly billing cycle; more needs an Enterprise plan.

Footprint is passive: it reads its own index or third-party records and does not contact the target. An account is needed for full results. There is an API.

## Features

- User lookup by username or ID
- Post lookup and user timelines
- Recent search (7 days) and full-archive search (back to 2006)
- Filtered stream with up to 1,000 rules
- Post counts for a query
- Trends by location and Spaces lookup
- Official Python, TypeScript, Java and C# SDKs

## Pros

- The official source, with the whole public archive searchable
- Search operators for users, keywords, links, language and media
- No subscription or minimum spend
- Per-endpoint rate limits are published

## Cons

- No free tier: every post or user read is charged from prepaid credits
- Pay-per-usage is capped at 3 million post reads a month; more needs Enterprise
- Needs an X account and a developer app

## When to use it

- Use it when you need an account's posts or profile as structured data straight from X.
- Use it when you want to search the full public archive for a keyword, link or account.
- Use it when you need to follow a topic in near real time with filter rules.

## Quick start

1. Open X API and sign in.
2. Paste the username and run the lookup.
3. Record the result with the date and the exact query; results change over time.

## Alternatives

- [DataXAPI](https://osinttools.io/tools/dataxapi/): Pay-per-call API for public posts, profiles, comments and ad library data on 21 platforms, including Douyin, WeChat and Weibo. (Paid · Name, Username, URL · passive)
- [GetYouTubeTranscript MCP](https://osinttools.io/tools/getyoutubetranscript-mcp/): Hosted MCP server for YouTube transcripts, video details, comments, channel uploads, playlists and community posts. (Freemium · URL, Username, Name · passive)
- [Jev Social](https://osinttools.io/tools/jev-social/): Open-source AI research agent that browses Instagram, TikTok and LinkedIn in your own Chrome and writes source-cited reports. (Open source · Username, URL, Name · active · 223 GitHub stars)
- [LinkedIn MCP Server (eliasbiondo)](https://osinttools.io/tools/linkedin-mcp-server/): Community MCP server that reads LinkedIn people, company and job pages through a browser logged in to your own account. (Open source · Name, URL, Username · passive · 222 GitHub stars)
- [LurkAPI](https://osinttools.io/tools/lurkapi/): Data API and hosted MCP server returning posts, profiles, comments, ads and transcripts from public pages on 16 platforms. (Freemium · Username, URL, Name · passive)
- [Reddit Data API](https://osinttools.io/tools/reddit-data-api/): Reddit's official API: read posts, comment trees, subreddits and user histories as JSON, with an approved OAuth app. (Freemium · Username, Name, URL · passive)

All alternatives to X API in one table: https://osinttools.io/tools/x-api/alternatives/

## Change history

- 2026-11-29: API reference published: 2 endpoints. (api reference: /apis/x-api/)
- 2026-11-29: Listed in the directory.

Feed of changes to X API: https://osinttools.io/tools/changes/feed.xml?tool=x-api

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
