# X (Twitter) API

Category: [Social media](https://free-web-services.com/web-services/communication/social-media/)  
Page: https://free-web-services.com/web-services/communication/social-media/twitter-api.html  
Documentation: https://docs.x.com/x-api/introduction

The X API (formerly Twitter API) lets you post, read and search posts, and work with users, followers, lists, likes, direct messages and trends on X. It uses REST with JSON and OAuth. The X API is now paid per use: you buy credits up front, which are used up as you make calls; there are no subscriptions or minimum spend. An official MCP server at https://api.x.com/mcp lets AI agents use the X API; calls are billed like normal API calls.

- Formats: JSON
- Interface: REST, MCP
- Provider: docs.x.com
- Last checked: Working on November 16th, 2026

Example request:

```sh
curl 'https://api.x.com/2/users/by/username/XDevelopers' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Replace YOUR_API_KEY with your own key.

