Platform APIs
X API
Public profiles, recent posts, replies and search results without an X developer account or OAuth review.
GET /x/profile?username=...5 credits per profileauth: x-api-keycontent-type: application/jsonenvelope: data + meta
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| username | string | yes | Public X handle without the at sign. |
| posts_limit | number | no | Recent posts to include, 1 to 100. Adds 1 credit. |
| include_replies | boolean | no | Include public replies in the activity set. |
request.sh
curl -s "https://api.cleanfetch.dev/v1/x/profile?username=openai" \ -H "x-api-key: cf_live_your_key_here"
response.json
200 OK / application/json
{
"data": {
"platform": "x",
"profile": {
"username": "openai",
"name": "OpenAI",
"bio": "Creating safe AGI that benefits all of humanity.",
"followers": 4200000,
"following": 12,
"posts": 3100,
"verified": true,
"joinedAt": "2015-12-11"
}
},
"meta": {
"requestId": "req_cf_01j9k966a6b",
"lookupStatus": "found",
"creditsCharged": 5,
"latencyMs": 760,
"cached": true
}
}Endpoints
Use /v1/x/profile, /v1/x/posts, /v1/x/post, /v1/x/search and /v1/x/followers. The directory lists all 44 X endpoints.
Credits
A profile costs 5 credits. The free tier allows 2 X lookups a day. Cached public records cost zero credits and are returned with a cached flag in meta; paid accounts skip the daily cap.
Limits
Protected posts and accounts are not returned. The API does not log in as a user and does not return email addresses or phone numbers.