X

X Users API

The Users API from X — 2 operation(s) for users.

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/x-users-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

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

Get an API key

Free tier, no email required.

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

OpenAPI Specification

x-users-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: X API v2 Posts Users API
  version: '2.0'
  description: 'The X (formerly Twitter) API v2 provides programmatic access to posts, users,

    spaces, direct messages, lists, and trends. Endpoints derived from the public

    X API v2 introduction documentation at docs.x.com.

    '
  contact:
    name: X Developer Platform
    url: https://docs.x.com/x-api/introduction
servers:
- url: https://api.x.com/2
  description: X API v2 production server
security:
- BearerAuth: []
tags:
- name: Users
paths:
  /users/{id}:
    get:
      tags:
      - Users
      summary: Look up a user by ID
      operationId: getUserById
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A user
  /users/by/username/{username}:
    get:
      tags:
      - Users
      summary: Look up a user by username
      operationId: getUserByUsername
      parameters:
      - name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A user
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'App-only authentication using an OAuth 2.0 Bearer Token issued by the

        X Developer Platform, passed via the Authorization header.

        '