{
"data": {
"id": "1360509398041378817",
"name": "Defense Intelligence",
"username": "DI313_",
"createdAt": 1613205701,
"avatarUrl": "https://pbs.twimg.com/profile_images/1773964459205181440/KJTgBai3.jpg",
"isBlueVerified": true,
"bioDescription": "Covering International Affairs, Monitoring Threat Matrix, National Security, Intelligence, Militancy and tracking politics.",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/1360509398041378817/1754337330",
"followersCount": 339166,
"followingCount": 3761,
"statusesCount": 30413,
"mediaCount": 13292
}
}
curl --location --request GET 'https://zylalabs.com/api/12396/x+media+data+api/23441/get+user+profile+info?username=Required' --header 'Authorization: Bearer YOUR_API_KEY'
{
"data": {
"dataItems": [
{
"id": "2045874068763632017",
"title": "",
"createdAt": 1776609363,
"totalMediaCount": 1,
"statistics": {
"likeCount": 188966,
"commentCount": 10423,
"retweetCount": 13521,
"viewCount": 16003821,
"quoteCount": 2725
},
"author": {
"id": "15506669",
"name": "Jeff Bezos",
"username": "JeffBezos",
"createdAt": 1216593516,
"avatarUrl": "https://pbs.twimg.com/profile_images/1591558315254890500/ETIHb4Nl.jpg",
"isBlueVerified": true,
"bioDescription": "Amazon. Blue Origin. Washington Post. Bezos Earth Fund. Bezos Academy.",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/15506669/1448361938",
"followersCount": 7461550,
"followingCount": 568,
"statusesCount": 495,
"mediaCount": 214
},
"mediaList": [
{
"id": "2045874002250416128",
"isVideo": true,
"downloadUrl": "https://video.twimg.com/amplify_video/2045874002250416128/vid/avc1/720x1280/Jai7sCeUH1ZrVWFD.mp4?tag=21"
}
],
"quoted": null
},
{
"id": "2044788684223066396",
"title": "",
"createdAt": 1776350587,
"totalMediaCount": 1,
"statistics": {
"likeCount": 10336,
"commentCount": 601,
"retweetCount": 859,
"viewCount": 493525,
"quoteCount": 87
},
"author": {
"id": "15506669",
"name": "Jeff Bezos",
"username": "JeffBezos",
"createdAt": 1216593516,
"avatarUrl": "https://pbs.twimg.com/profile_images/1591558315254890500/ETIHb4Nl.jpg",
"isBlueVerified": true,
"bioDescription": "Amazon. Blue Origin. Washington Post. Bezos Earth Fund. Bezos Academy.",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/15506669/1448361938",
"followersCount": 7461550,
"followingCount": 568,
"statusesCount": 495,
"mediaCount": 214
},
"mediaList": [
{
"id": "2044788615935664128",
"isVideo": true,
"downloadUrl": "https://video.twimg.com/amplify_video/2044788615935664128/vid/avc1/1280x720/ghkmXyJBW5eLztD_.mp4?tag=21"
}
],
"quoted": null
},
{
"id": "2043744899678515256",
"title": "",
"createdAt": 1776101729,
"totalMediaCount": 1,
"statistics": {
"likeCount": 23855,
"commentCount": 1071,
"retweetCount": 1494,
"viewCount": 1084509,
"quoteCount": 197
},
"author": {
"id": "15506669",
"name": "Jeff Bezos",
"username": "JeffBezos",
"createdAt": 1216593516,
"avatarUrl": "https://pbs.twimg.com/profile_images/1591558315254890500/ETIHb4Nl.jpg",
"isBlueVerified": true,
"bioDescription": "Amazon. Blue Origin. Washington Post. Bezos Earth Fund. Bezos Academy.",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/15506669/1448361938",
"followersCount": 7461550,
"followingCount": 568,
"statusesCount": 495,
"mediaCount": 214
},
"mediaList": [
{
"id": "2043744897640083458",
"isVideo": false,
"downloadUrl": "https://pbs.twimg.com/media/HFzXJ_tasAIL1wZ.jpg?format=jpg&name=large"
}
],
"quoted": null
},
{
"id": "2039372675211301259",
"title": "Let’s go!",
"createdAt": 1775059310,
"totalMediaCount": 1,
"statistics": {
"likeCount": 14651,
"commentCount": 911,
"retweetCount": 914,
"viewCount": 338954,
"quoteCount": 94
},
"author": {
"id": "15506669",
"name": "Jeff Bezos",
"username": "JeffBezos",
"createdAt": 1216593516,
"avatarUrl": "https://pbs.twimg.com/profile_images/1591558315254890500/ETIHb4Nl.jpg",
"isBlueVerified": true,
"bioDescription": "Amazon. Blue Origin. Washington Post. Bezos Earth Fund. Bezos Academy.",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/15506669/1448361938",
"followersCount": 7461550,
"followingCount": 568,
"statusesCount": 495,
"mediaCount": 214
},
"mediaList": [
{
"id": "2039372673055424512",
"isVideo": false,
"downloadUrl": "https://pbs.twimg.com/media/HE1OpB4bgAA31rJ.jpg?format=jpg&name=large"
}
],
"quoted": null
},
{
"id": "2020861883524247807",
"title": "",
"createdAt": 1770645993,
"totalMediaCount": 1,
"statistics": {
"likeCount": 23941,
"commentCount": 3470,
"retweetCount": 1403,
"viewCount": 7524170,
"quoteCount": 976
},
"author": {
"id": "15506669",
"name": "Jeff Bezos",
"username": "JeffBezos",
"createdAt": 1216593516,
"avatarUrl": "https://pbs.twimg.com/profile_images/1591558315254890500/ETIHb4Nl.jpg",
"isBlueVerified": true,
"bioDescription": "Amazon. Blue Origin. Washington Post. Bezos Earth Fund. Bezos Academy.",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/15506669/1448361938",
"followersCount": 7461550,
"followingCount": 568,
"statusesCount": 495,
"mediaCount": 214
},
"mediaList": [
{
"id": "2020861879552499712",
"isVideo": false,
"downloadUrl": "https://pbs.twimg.com/media/HAuLLCba4AAB2kT.jpg?format=jpg&name=large"
}
],
"quoted": null
},
{
"id": "1991987664766328990",
"title": "The Blue Moon MK1 flight vehicle that will land near Shackleton crater. We’ll soon be doing fully integrated checkout tests. At over 26 feet tall (8 meters), it’s smaller than our MK2 human lander but larger than the historic Apollo lander.",
"createdAt": 1763761843,
"totalMediaCount": 1,
"statistics": {
"likeCount": 12434,
"commentCount": 3739,
"retweetCount": 1603,
"viewCount": 1261663,
"quoteCount": 314
},
"author": {
"id": "15506669",
"name": "Jeff Bezos",
"username": "JeffBezos",
"createdAt": 1216593516,
"avatarUrl": "https://pbs.twimg.com/profile_images/1591558315254890500/ETIHb4Nl.jpg",
"isBlueVerified": true,
"bioDescription": "Amazon. Blue Origin. Washington Post. Bezos Earth Fund. Bezos Academy.",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/15506669/1448361938",
"followersCount": 7461550,
"followingCount": 568,
"statusesCount": 495,
"mediaCount": 214
},
"mediaList": [
{
"id": "1991987659888009216",
"isVideo": false
}
]
}
]
},
"_note": "Response truncated for documentation purposes"
}
curl --location --request GET 'https://zylalabs.com/api/12396/x+media+data+api/23442/get+user+media+timeline?userId=15506669' --header 'Authorization: Bearer YOUR_API_KEY'
{
"data": {
"id": "2045309037848272993",
"title": "Tesla engineering redesigned lithium refining from physics first principles",
"createdAt": 1776474649,
"totalMediaCount": 0,
"statistics": {
"likeCount": 107713,
"commentCount": 3560,
"retweetCount": 14328,
"viewCount": 31523263,
"quoteCount": 350
},
"author": {
"id": "44196397",
"name": "Elon Musk",
"username": "elonmusk",
"createdAt": 1243973549,
"avatarUrl": "https://pbs.twimg.com/profile_images/2035314704307081216/71U1ftM3.jpg",
"isBlueVerified": true,
"bioDescription": "https://t.co/dDtDyVssfm",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/44196397/1774145451",
"followersCount": 238604221,
"followingCount": 1315,
"statusesCount": 101597,
"mediaCount": 4456
},
"mediaList": [],
"quoted": {
"id": "2045303851482546505",
"title": "Our Lithium Refinery is designed to have a much lower carbon footprint than traditional hard rock refineries\n\n– Acid-free refining helps produce a safe coproduct\n– Water is recycled throughout production, with every drop treated & cleaned on site\n– Designed to close the loop for",
"createdAt": 1776473412,
"totalMediaCount": 1,
"statistics": {
"likeCount": 19470,
"commentCount": 613,
"retweetCount": 2627,
"viewCount": 30877306,
"quoteCount": 239
},
"author": {
"id": "1679769205938311169",
"name": "Tesla North America",
"username": "tesla_na",
"createdAt": 1689323193,
"avatarUrl": "https://pbs.twimg.com/profile_images/1681000114607857665/FLyxuLUB.jpg",
"isBlueVerified": true,
"bioDescription": "Building a world of amazing abundance",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/1679769205938311169/1689616932",
"followersCount": 110959,
"followingCount": 20,
"statusesCount": 941,
"mediaCount": 229
},
"mediaList": [
{
"id": "2045302933437526016",
"isVideo": true,
"downloadUrl": "https://video.twimg.com/amplify_video/2045302933437526016/vid/avc1/3840x2026/IEblQjFEFbwcuwQv.mp4?tag=21"
}
],
"quoted": null
}
}
}
curl --location --request GET 'https://zylalabs.com/api/12396/x+media+data+api/23443/get+tweet+details?idOrUrl=https://x.com/elonmusk/status/2045309037848272993' --header 'Authorization: Bearer YOUR_API_KEY'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the X Media Data API simply include your bearer token in the Authorization header.
| Header | Description |
|---|---|
Authorization
|
Required
Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.
|
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
(Save 2 months with annual billing 🎉)
X Media Data API gives developers a direct way to collect public X data for dashboards, content research, creator analytics, moderation tools, and automation pipelines.
This API focuses on three high-value use cases:
1) Resolve a username into profile information.
2) Browse a user media timeline with cursor-based pagination.
3) Retrieve full tweet-level details from either a tweet ID or a full X URL.
The endpoints are built for production API consumption with clear query validation, predictable response wrapping, and a lightweight authentication model.
Authentication uses a single secret header in non-development environments, making it easy to integrate from backend services, serverless functions, and no-code automations.
If you are shipping social listening products, creator intelligence workflows, growth tools, or content enrichment pipelines, this API is designed to reduce integration time while keeping endpoint behavior consistent.
[PRIMARY VALUE PROPOSITION]
- Fast integration with only query params and one auth header.
- Designed for operational workloads: profile lookup, media traversal, and tweet inspection.
- Works well for ETL, BI dashboards, creator tooling, and lead intelligence.
- Clean REST shape suitable for RapidAPI consumers.
[BASE URL AND VERSIONING NOTES]
X endpoints covered in this listing:
- /user/info
- /user/media
- /tweet/details
[GLOBAL REQUEST/RESPONSE CONTRACT NOTES]
Success wrapper:
- API responses return payload inside the "data" field.
Error wrapper:
- API errors return the "error" field.
- Validation and HTTP exceptions can include "errorDetails" when available.
Common status behavior across endpoints:
- 200: Request successful.
- 400: Validation failed for query parameters.
- 403: Authentication failed.
- 500: Upstream failure or internal processing error.
IMPORTANT:
This listing intentionally avoids fixed payload examples for the nested data object because upstream social source data can evolve over time. The stable contract is the wrapper and parameter behavior documented below.
The API returns various data types: the User Profile Info endpoint provides user details like ID, name, username, bio, and follower counts. The User Media Timeline endpoint returns media posts with statistics such as likes, comments, and retweets. The Tweet Details endpoint offers comprehensive tweet information, including author details and media associated with the tweet.
Key fields include "id," "name," "username," "bioDescription," and "followersCount" for user profiles. For media timelines, fields like "totalMediaCount," "statistics," and "mediaList" are essential. The Tweet Details endpoint features "title," "createdAt," and "author" details, providing a complete view of the tweet.
Response data is structured within a "data" field, which contains the relevant information. Each endpoint's response includes specific attributes related to the requested data, ensuring a consistent format. Errors are wrapped in an "error" field, providing clarity on issues encountered during requests.
Each endpoint accepts specific parameters: the User Profile Info endpoint requires a username, while the User Media Timeline endpoint needs a user ID. The Tweet Details endpoint can accept either a tweet ID or a full X URL. These parameters allow users to customize their requests for precise data retrieval.
Typical use cases include creating dashboards for social media analytics, conducting content research, and developing creator intelligence tools. The API is also useful for moderation tasks and automation pipelines, enabling efficient data handling for various applications.
Data accuracy is maintained through direct access to public X account information, ensuring real-time updates. The API's design includes validation checks for query parameters, which helps prevent errors and ensures that the data returned is reliable and up-to-date.
Users can leverage the returned data for analytics and reporting by integrating it into BI dashboards or ETL processes. The structured response allows for easy parsing and manipulation, enabling developers to build applications that require real-time insights from public X data.
Users should check the "data" field in the response. If it is empty or null, it indicates no results were found. Implementing error handling for status codes like 400 or 500 can help manage unexpected outcomes, ensuring robust application behavior even with incomplete data.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund