Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

X Users API

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

X Users API is one of 4 APIs that X publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Users. The published artifact set on APIs.io includes an OpenAPI specification.

This API exposes 2 operations across 2 paths. It is described by OpenAPI 3.1.0, at version 2.0.

Requests are made against a single base URL, https://api.x.com/2.

2 operations 2 paths 0 schemas 2 GET

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
2.0
Server
https://api.x.com/2
Authentication
HTTP Bearer
Resource Areas
1

Authentication & Security 1

X Users API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (JWT) (BearerAuth). By default, every request must be authenticated.

  • BearerAuth — App-only authentication using an OAuth 2.0 Bearer Token issued by the X Developer Platform, passed via the Authorization header.

Paths & Operations 2

Across 2 paths, the API surfaces 2 operations — 2 GET. Each is listed below with its method, path, parameters, and response codes.

Users 2
GET
/users/{id}
Look up a user by ID
getUserById 1 param → 200
GET
/users/by/username/{username}
Look up a user by username
getUserByUsername 1 param → 200

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

x-users-api-openapi.yml Raw ↑

Other APIs X publishes across the network.

X Posts API
X Trends API