The X API is the official API (an interface that another program calls over the internet) of the social network X. It gives programmatic access to X's public conversation through version 2 REST endpoints, a style of web interface in which each address stands for one kind of resource.
An application creates an app in the Developer Console at console.x.com, gets credentials such as a Bearer Token, and sends HTTP requests to api.x.com. Endpoints search, read and publish posts; read timelines, threads and quote posts; look up users and manage follows, blocks and mutes; send and receive direct messages; manage lists; and read trends by location. A filtered stream delivers matching posts in near real time, with up to 1,000 filter rules, and full-archive search covers public posts back to 2006. Official libraries exist for Python and TypeScript, and MCP servers are available.
Pricing is pay per use with no subscription: the developer buys credits in advance, and each read resource or write request uses some of them. Higher volumes need an Enterprise plan.