X (Twitter) · GraphQL Specification

Twitter (X) GraphQL Schema

This conceptual GraphQL schema models the Twitter (X) API v2 data model. The X API v2 is a REST API available at `https://api.x.com/2`, but the types defined here represent the full surface of objects, relationships, and operations exposed by that API. This schema captures tweets, users, spaces, lists, direct messages, media, polls, streams, compliance, and advertising data.

Documentation Endpoint View on GitHub Social-MediaMicrobloggingReal-Time DataStreamingAdvertisingContentGraphQL

Overview

Twitter (X) GraphQL Schema is a GraphQL API specification published by X (Twitter) on the APIs.io network.

This conceptual GraphQL schema models the Twitter (X) API v2 data model. The X API v2 is a REST API available at https://api.x.com/2, but the types defined here represent the full surface of objects, relationships, and operations exposed by that API. This schema captures tweets, users, spaces, lists, direct messages, media, polls, streams, compliance, and advertising data.

The specification includes 2 reference links.

Tagged areas include Social-Media, Microblogging, Real-Time Data, Streaming, and Advertising.

Endpoint

References

Related API Specs

X (Twitter) Account Activity API (OpenAPI) X (Twitter) Activity API (OpenAPI) X (Twitter) Bookmarks API (OpenAPI) X (Twitter) Chat API (OpenAPI) X (Twitter) Communities API (OpenAPI) X (Twitter) Community Notes API (OpenAPI) X (Twitter) Compliance API (OpenAPI) X (Twitter) Connections API (OpenAPI) X (Twitter) Direct Messages API (OpenAPI) X (Twitter) General API (OpenAPI) X (Twitter) Likes API (OpenAPI) X (Twitter) Lists API (OpenAPI) X (Twitter) Media API (OpenAPI) X (Twitter) News API (OpenAPI) X (Twitter) Spaces API (OpenAPI) X (Twitter) Stream API (OpenAPI) X (Twitter) Trends API (OpenAPI) X (Twitter) Tweets API (OpenAPI) X (Twitter) Usage API (OpenAPI) X (Twitter) Users API (OpenAPI) X (Twitter) Webhooks API (OpenAPI)
Back to X (Twitter) · All GraphQL Specs · GitHub

Work with this as data

Every GraphQL schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for graphql

4 MCP tools reach this
  • find_graphqlBrowse and filter every GraphQL schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This GraphQL schema
curl "https://apis.io/api/v1/graphql/twitter-graphql"
All graphql
curl "https://apis.io/api/v1/graphql?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.