X API
Read public X data in one call: public posts with view counts and top replies, profiles and recent timelines. Responses come in the shape of X’s API v2 Tweet and User objects, over REST or MCP.
- Endpoints
- 14
- From
- 1 credit · $0.01
- Failed calls
- Refunded
- Access
- REST · MCP · SDK
X (Twitter) tweet API
Endpoint details →import os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/x/tweets/1585341984679469056",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json(){ "data": { "id": "1585341984679469056", "text": "Entering Twitter HQ – let that sink in! https://t.co/D68z4K2wq7", "created_at": "2022-10-26T18:45:58.000Z", "author_id": "44196397", "conversation_id": "1585341984679469056", "lang": "en", "possibly_sensitive": false, "edit_history_tweet_ids": [ "1585341984679469056" ], "public_metrics": { "like_count": 1221661, "retweet_count": 154511, "reply_count": 58031, "quote_count": 42891, "bookmark_count": 14044 }, "entities": { "urls": [ { "…": "6 fields" } ] }, "…": "1 more fields" }, "includes": { "users": [ { "id": "44196397", "name": "Elon Musk", "username": "elonmusk", "description": "https://t.co/ZdBx5WABYx", "profile_image_url": "https://pbs.twimg.com/profile_images/2122506092437504001/NSS4RHyZ_normal.jpg", "protected": false, "verified": true, "verified_type": "blue", "public_metrics": { "…": "3 fields" }, "entities": { "…": "1 fields" } }, "… 1 more" ], "media": [ { "media_key": "7_1585341912877146112", "type": "video", "preview_image_url": "https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9ir…", "width": 1920, "height": 1080, "duration_ms": 9301, "variants": [ "…" ] } ] }, "replies": [ { "id": "1585385664606269440", "text": "Meeting a lot of cool people at Twitter today!", "created_at": "2022-10-26T21:39:32.000Z", "author_id": "44196397", "in_reply_to_user_id": "44196397", "lang": "en", "edit_history_tweet_ids": [ "1585385664606269440" ], "public_metrics": { "like_count": 257616, "retweet_count": 10874, "reply_count": 11381, "quote_count": 1592, "bookmark_count": 385 }, "referenced_tweets": [ { "…": "2 fields" } ] }, "… 1 more" ]}All X endpoints
Credits per call · refunded on failure · Code tutorials- X (Twitter) user tweets API
GET /v1/x/users/{username}/tweets1 cr - X (Twitter) user tweets, next page (beta)
GET /v1/x/users/{username}/tweets/next2 cr - X (Twitter) Community posts API
GET /v1/x/communities/{id}/tweets1 cr - X (Twitter) highlights API
GET /v1/x/users/{username}/highlights1 cr - X (Twitter) trending posts API
GET /v1/x/trends/tweets1 cr
What people build with it
Social listening
Track mentions of a brand, product or topic as they post.
Creator research
Profiles, follower counts and recent posts for vetting.
Agent context
Give an AI agent what people are saying, with sources.
Pricing
Pay per call with credit packs that never expire, or keyless per call. No subscription. 100 free credits to start.
All packs →| Provider | Per 1,000 | Unit |
|---|---|---|
| Groundsocial | $1.00 → $0.40 | standard calls; $0.01 per call keyless |
| SocialCrawl | £6.00 → £1.99 | credits |
| ScrapeCreators | $1.88 → $0.99 | credits |
| Apify | From $1.70 | results, varies by actor |
| Bright Data | $1.50 → $1.30 | records |
| The X API | $5.00 posts / $10.00 users | per 1,000 resources returned |
| Data365 | €0.85 → €0.60 | credits |
| EnsembleData | $2.22 → $0.93 | units |
| Phyllo | Quote only | custom plans |
Other providers’ prices from their public pages, in their own currency. A credit buys a different amount on each.
X API questions
Do I need an X account or API key?
No. Most X endpoints read what a logged-out visitor sees. Search, full replies and followers run on account sessions we supply; you only need a Groundsocial key.
How much does the X API cost?
From 1 credit per call. Credits cost $1.00 to $0.40 per 1,000 depending on the pack, or $0.01 per call keyless. Failed calls are refunded. You start with 100 free credits.
What format is the data in?
Responses come in the shape of X’s API v2 Tweet and User objects, not a lossy cross-platform schema, so field names match what X itself uses.
Can an AI agent use it?
Yes. Every X endpoint is an MCP tool (x_tweet_get, …), and agents can sign themselves up with POST /v1/agent/signup.
Is it official?
No. Groundsocial is an independent API for public data. X is a trademark of X Corp. We are not affiliated with or endorsed by X Corp.
More social APIs
All platforms →26 endpoints
LinkedIn API12 endpoints
Facebook API17 endpoints
Threads API6 endpoints
Bluesky API27 endpoints
Pinterest API10 endpoints
X is a trademark of X Corp. We are not affiliated with or endorsed by X Corp.