{
"data": {
"id": "44196397",
"name": "Elon Musk",
"username": "elonmusk",
"createdAt": 1243973549,
"avatarUrl": "https://pbs.twimg.com/profile_images/2053244804520427520/m8mdWZCG.jpg",
"isBlueVerified": true,
"bioDescription": "https://t.co/ZdBx5WABYx",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/44196397/1774145451",
"followersCount": 241677194,
"followingCount": 1407,
"statusesCount": 108841,
"mediaCount": 4721
}
}
curl --location --request GET 'https://zylalabs.com/api/12396/x+media+data+api/23441/get+user+profile+info?username=elonmusk' --header 'Authorization: Bearer YOUR_API_KEY'
{
"data": {
"dataItems": [
{
"id": "2092325098200220146",
"title": "Dolly spent her whole life showing us what it means to lead with love. Lauren and I are so grateful to have known her. She lifted everyone with her music, her generosity, and her joy. Sending our sincere condolences to her family and everyone she touched.",
"createdAt": 1787684151,
"totalMediaCount": 1,
"statistics": {
"likeCount": 42322,
"commentCount": 2682,
"retweetCount": 2647,
"viewCount": 2001723,
"quoteCount": 380
},
"author": {
"id": "15506669",
"name": "Jeff Bezos",
"username": "JeffBezos",
"createdAt": 1216593516,
"avatarUrl": "https://pbs.twimg.com/profile_images/1591558315254890500/ETIHb4Nl.jpg",
"isBlueVerified": true,
"bioDescription": "Six thousand years ago, someone invented the plow, and we all got wealthier. A gentle reminder that all civilizational wealth is driven by invention.",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/15506669/1448361938",
"followersCount": 10171321,
"followingCount": 615,
"statusesCount": 523,
"mediaCount": 219
},
"mediaList": [
{
"id": "2092325095511670784",
"isVideo": false,
"downloadUrl": "https://pbs.twimg.com/media/HQlulribwAAmHCN.jpg?format=jpg&name=large",
"thumbnailUrl": null
}
],
"quoted": null
},
{
"id": "2085487855015719204",
"title": "Team is moving at record speed out at the pad. Gradatim Ferociter!",
"createdAt": 1786054025,
"totalMediaCount": 1,
"statistics": {
"likeCount": 8293,
"commentCount": 1265,
"retweetCount": 480,
"viewCount": 467894,
"quoteCount": 62
},
"author": {
"id": "15506669",
"name": "Jeff Bezos",
"username": "JeffBezos",
"createdAt": 1216593516,
"avatarUrl": "https://pbs.twimg.com/profile_images/1591558315254890500/ETIHb4Nl.jpg",
"isBlueVerified": true,
"bioDescription": "Six thousand years ago, someone invented the plow, and we all got wealthier. A gentle reminder that all civilizational wealth is driven by invention.",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/15506669/1448361938",
"followersCount": 10171321,
"followingCount": 615,
"statusesCount": 523,
"mediaCount": 219
},
"mediaList": [
{
"id": "2085487851966545920",
"isVideo": false,
"downloadUrl": "https://pbs.twimg.com/media/HPEkJufbwAATnO0.jpg?format=jpg&name=large",
"thumbnailUrl": null
}
],
"quoted": null
},
{
"id": "2075363502441865592",
"title": "Wally Funk waited 60 years to get to space, and no one ever earned it more. She trained with the Mercury 13 in 1961, out-tested the men, and was told no anyway. She never stopped flying — 19,600 hours, thousands of students, a lifetime of firsts.\n\nFive years ago this month, I had",
"createdAt": 1783640192,
"totalMediaCount": 1,
"statistics": {
"likeCount": 9121,
"commentCount": 1439,
"retweetCount": 1199,
"viewCount": 1180566,
"quoteCount": 106
},
"author": {
"id": "15506669",
"name": "Jeff Bezos",
"username": "JeffBezos",
"createdAt": 1216593516,
"avatarUrl": "https://pbs.twimg.com/profile_images/1591558315254890500/ETIHb4Nl.jpg",
"isBlueVerified": true,
"bioDescription": "Six thousand years ago, someone invented the plow, and we all got wealthier. A gentle reminder that all civilizational wealth is driven by invention.",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/15506669/1448361938",
"followersCount": 10171321,
"followingCount": 615,
"statusesCount": 523,
"mediaCount": 219
},
"mediaList": [
{
"id": "2075363496846381056",
"isVideo": false,
"downloadUrl": "https://pbs.twimg.com/media/HM0sGslXUAAiioR.jpg?format=jpg&name=large",
"thumbnailUrl": null
}
],
"quoted": null
},
{
"id": "2062615731158523935",
"title": "One week later, incredible progress. It’s a 24/7 operation with a solid path forward to launch this year, helped by a lot of luck. @NASA and @USSpaceForce have both been extremely helpful.\n\nThis team. Never tell them the odds.",
"createdAt": 1780600886,
"totalMediaCount": 2,
"statistics": {
"likeCount": 11153,
"commentCount": 1473,
"retweetCount": 985,
"viewCount": 968719,
"quoteCount": 121
},
"author": {
"id": "15506669",
"name": "Jeff Bezos",
"username": "JeffBezos",
"createdAt": 1216593516,
"avatarUrl": "https://pbs.twimg.com/profile_images/1591558315254890500/ETIHb4Nl.jpg",
"isBlueVerified": true,
"bioDescription": "Six thousand years ago, someone invented the plow, and we all got wealthier. A gentle reminder that all civilizational wealth is driven by invention.",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/15506669/1448361938",
"followersCount": 10171321,
"followingCount": 615,
"statusesCount": 523,
"mediaCount": 219
},
"mediaList": [
{
"id": "2062615725005512706",
"isVideo": false,
"downloadUrl": "https://pbs.twimg.com/media/HJ_iEt0WoAIjw0a.jpg?format=jpg&name=large",
"thumbnailUrl": null
},
{
"id": "2062615725190062080",
"isVideo": false,
"downloadUrl": "https://pbs.twimg.com/media/HJ_iEugWoAAakxJ.jpg?format=jpg&name=large",
"thumbnailUrl": null
}
],
"quoted": null
},
{
"id": "2051405101466882188",
"title": "Booster Parking Only",
"createdAt": 1777928064,
"totalMediaCount": 1,
"statistics": {
"likeCount": 6706,
"commentCount": 715,
"retweetCount": 666,
"viewCount": 467838,
"quoteCount": 74
},
"author": {
"id": "15506669",
"name": "Jeff Bezos",
"username": "JeffBezos",
"createdAt": 1216593516,
"avatarUrl": "https://pbs.twimg.com/profile_images/1591558315254890500/ETIHb4Nl.jpg",
"isBlueVerified": true,
"bioDescription": "Six thousand years ago, someone invented the plow, and we all got wealthier. A gentle reminder that all civilizational wealth is driven by invention.",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/15506669/1448361938",
"followersCount": 10171321,
"followingCount": 615,
"statusesCount": 523,
"mediaCount": 219
},
"mediaList": [
{
"id": "2051405048085876736",
"isVideo": true,
"downloadUrl": "https://video.twimg.com/amplify_video/2051405048085876736/vid/avc1/1280x720/bS6KWeKXeReX0qNX.mp4?tag=27",
"thumbnailUrl": "https://pbs.twimg.com/amplify_video_thumb/2051405048085876736/img/iLBZiYu4--ECainK.jpg?format=jpg&name=large"
}
]
}
]
},
"_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": 103031,
"commentCount": 3498,
"retweetCount": 12299,
"viewCount": 32800396,
"quoteCount": 358
},
"author": {
"id": "44196397",
"name": "Elon Musk",
"username": "elonmusk",
"createdAt": 1243973549,
"avatarUrl": "https://pbs.twimg.com/profile_images/2053244804520427520/m8mdWZCG.jpg",
"isBlueVerified": true,
"bioDescription": "https://t.co/ZdBx5WABYx",
"profileBannerUrl": "https://pbs.twimg.com/profile_banners/44196397/1774145451",
"followersCount": 241677197,
"followingCount": 1407,
"statusesCount": 108841,
"mediaCount": 4721
},
"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": 19186,
"commentCount": 618,
"retweetCount": 2449,
"viewCount": 31729265,
"quoteCount": 250
},
"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": 119603,
"followingCount": 20,
"statusesCount": 1080,
"mediaCount": 274
},
"mediaList": [
{
"id": "2045302933437526016",
"isVideo": true,
"downloadUrl": "https://video.twimg.com/amplify_video/2045302933437526016/vid/avc1/3840x2026/IEblQjFEFbwcuwQv.mp4?tag=21",
"thumbnailUrl": "https://pbs.twimg.com/amplify_video_thumb/2045302933437526016/img/GFFvnblI1S8q9aYC.jpg?format=jpg&name=large"
}
],
"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'
साइन अप करने के बाद, प्रत्येक डेवलपर को एक पर्सनल API एक्सेस की असाइन की जाती है, जो अक्षरों और अंकों का एक यूनिक संयोजन होता है, जिसका उपयोग हमारे API एंडपॉइंट तक पहुंचने के लिए किया जाता है। प्रमाणीकरण के लिए X मीडिया डेटा API के साथ बस अपने बेयरर टोकन को Authorization हेडर में शामिल करें।
| हेडर | विवरण |
|---|---|
Authorization
|
आवश्यक
होना चाहिए Bearer access_key. जब आप सब्सक्राइब हों तो ऊपर "Your API Access Key" देखें।
|
कोई लंबी अवधि की प्रतिबद्धता नहीं। कभी भी अपग्रेड, डाउनग्रेड या कैंसल करें। फ्री ट्रायल में 50 रिक्वेस्ट तक शामिल हैं।
(वार्षिक बिलिंग के साथ 2 महीने बचाएँ 🎉)
X मीडिया डेटा एपीआई डेवलपर्स को डैशबोर्ड, सामग्री शोध, क्रिएटर एनालिटिक्स, मॉडरेशन उपकरण और ऑटोमेशन पाइपलाइनों के लिए सार्वजनिक X डेटा एकत्र करने का सीधा तरीका देता है
यह एपीआई तीन उच्च मूल्य उपयोग मामलों पर केंद्रित है:
1) उपयोगकर्ता नाम को प्रोफ़ाइल जानकारी में हल करना
2) कर्सर-आधारित पेजिनेशन के साथ एक उपयोगकर्ता मीडिया टाइमलाइन ब्राउज़ करना
3) या तो ट्वीट आईडी या एक पूर्ण X यूआरएल से पूर्ण ट्वीट-स्तरीय विवरण प्राप्त करना
एंडपॉइंट्स उत्पादन एपीआई उपभोग के लिए स्पष्ट क्वेरी सत्यापन, पूर्वानुमानित प्रतिक्रिया लपेटने और एक हल्के प्रमाणीकरण मॉडल के साथ बनाए गए हैं
प्रमाणीकरण गैर-विकासात्मक वातावरण में एकल गुप्त हेडर का उपयोग करता है जिससे बैकएंड सेवाओं, सर्वर रहित कार्यों और नो-कोड ऑटोमेशन से एकीकृत करना आसान हो जाता है
यदि आप सोशल लिसनिंग उत्पाद, क्रिएटर इंटेलिजेंस वर्कफ़्लो, ग्रोथ टूल या सामग्री समृद्धि पाइपलाइनों को भेज रहे हैं, तो यह एपीआई एकीकृत समय को कम करने के लिए डिज़ाइन किया गया है जबकि एंडपॉइंट व्यवहार को सुसंगत बनाए रखता है
[प्रमुख मूल्य प्रस्ताव]
- केवल क्वेरी पैरामीटर और एक सत्यापन हेडर के साथ तेज़ एकीकरण
- ऑपरेशनल वर्कलोड के लिए डिज़ाइन किया गया: प्रोफ़ाइल लुकअप, मीडिया traversal, और ट्वीट निरीक्षण
- ईटीएल, बीआई डैशबोर्ड, क्रिएटर टूलिंग, और लीड इंटेलिजेंस के लिए अच्छा काम करता है
- रैपिडएपी उपभोक्ताओं के लिए उपयुक्त साफ़ रेस्तर संरचना
[बेस यूआरएल और संस्करण नोट्स]
इस सूची में शामिल X एंडपॉइंट:
- /user/info
- /user/media
- /tweet/details
[वैश्विक अनुरोध/प्रतिक्रिया अनुबंध नोट्स]
सफलता लपेटना:
- एपीआई प्रतिक्रियाएं "डेटा" फ़ील्ड के भीतर पेलोड लौटाती हैं
त्रुटि लपेटना:
- एपीआई त्रुटियां "त्रुटि" फ़ील्ड लौटाती हैं
- सत्यापन और HTTP अपवाद "त्रुटि विवरण" शामिल कर सकते हैं जब उपलब्ध हो
एंडपॉइंट्स के बीच सामान्य स्थिति का व्यवहार:
- 200: अनुरोध सफल
- 400: क्वेरी पैरामीटर के लिए सत्यापन विफल
- 403: प्रमाणीकरण विफल
- 500: अपस्ट्रीम विफलता या आंतरिक प्रसंस्करण त्रुटि
महत्वपूर्ण:
यह सूची जानबूझकर नेस्टेड डेटा ऑब्जेक्ट के लिए फिक्स्ड पेलोड उदाहरणों से बचती है क्योंकि अपस्ट्रीम सोशल स्रोत डेटा समय के साथ विकसित हो सकता है स्थिर अनुबंध लपेटने और नीचे दस्तावेजित पैरामीटर व्यवहार है
एपीआई विभिन्न डेटा प्रकार लौटाता है उपयोगकर्ता प्रोफ़ाइल जानकारी एंडपॉइंट उपयोगकर्ता विवरण प्रदान करता है जैसे आईडी नाम उपयोगकर्ता नाम जीवनी और अनुयायी संख्या उपयोगकर्ता मीडिया टाइमलाइन एंडपॉइंट मीडिया पोस्ट लौटाता है जिसमें पसंद टिप्पणियां और रीट्वीट जैसी आंकड़े होते हैं ट्वीट विवरण एंडपॉइंट व्यापक ट्वीट जानकारी प्रदान करता है जिसमें लेखक विवरण और ट्वीट से संबंधित मीडिया शामिल है
मुख्य क्षेत्र "id" "name" "username" "bioDescription" और "followersCount" उपयोगकर्ता प्रोफाइल के लिए शामिल हैं मीडिया टाइमलाइंस के लिए "totalMediaCount" "statistics" और "mediaList" जैसे क्षेत्र आवश्यक हैं ट्वीट विवरण एंडपॉइंट में "title" "createdAt" और "author" विवरण शामिल हैं जो ट्वीट का पूर्ण दृश्य प्रदान करते हैं
प्रतिक्रिया डेटा "डाटा" फ़ील्ड के भीतर संरचित है, जो संबंधित जानकारी को शामिल करता है प्रत्येक एंडपॉइंट की प्रतिक्रिया में अनुरोधित डेटा से संबंधित विशिष्ट विशेषताएँ शामिल हैं, जो एक सुसंगत प्रारूप सुनिश्चित करती हैं त्रुटियाँ "त्रुटि" फ़ील्ड में लिपटी होती हैं, जो अनुरोधों के दौरान encountered समस्याओं पर स्पष्टता प्रदान करती हैं
प्रत्येक एंडपॉइंट विशेष पैरामीटर स्वीकार करता है: यूजर प्रोफ़ाइल जानकारी एंडपॉइंट को एक उपयोगकर्ता नाम की आवश्यकता होती है जबकि यूजर मीडिया टाइमलाइन एंडपॉइंट को एक उपयोगकर्ता आईडी की आवश्यकता होती है ट्वीट विवरण एंडपॉइंट एक ट्वीट आईडी या एक पूर्ण एक्स यूआरएल स्वीकार कर सकता है ये पैरामीटर उपयोगकर्ताओं को सटीक डेटा पुनर्प्राप्ति के लिए अपने अनुरोधों को अनुकूलित करने की अनुमति देते हैं
विशिष्ट उपयोग के मामलों में सोशल मीडिया विश्लेषण के लिए डैशबोर्ड बनाना सामग्री अनुसंधान करना और निर्माता बुद्धिमत्ता उपकरण विकसित करना शामिल है एपीआई समाशोधन कार्य और स्वचालन पाइपलाइनों के लिए भी उपयोगी है विभिन्न अनुप्रयोगों के लिए कुशल डेटा प्रबंधन को सक्षम करना
डेटा सटीकता सार्वजनिक X खाता जानकारी तक सीधे доступа के माध्यम से बनाए रखी जाती है जिससे वास्तविक समय में अपडेट सुनिश्चित होते हैं API के डिज़ाइन में क्वेरी पैरामीटर के लिए मान्यता जांच शामिल होती है जो त्रुटियों को रोकने में मदद करती है और यह सुनिश्चित करती है कि वापस किया गया डेटा विश्वसनीय और अद्यतन है
उपयोगकर्ता डेटा को एनालिटिक्स और रिपोर्टिंग के लिए BI डैशबोर्ड या ETL प्रक्रियाओं में एकीकृत करके लाभ उठा सकते हैं संगठित प्रतिक्रिया आसान पार्सिंग और हेरफेर की अनुमति देती है जिससे विकासकर्ता अनुप्रयोग बना सकते हैं जिन्हें सार्वजनिक X डेटा से वास्तविक समय की अंतर्दृष्टि की आवश्यकता होती है
उपयोगकर्ताओं को प्रतिक्रिया में "डेटा" फ़ील्ड की जांच करनी चाहिए यदि यह ख़ाली या शून्य है तो इसका मतलब है कि कोई परिणाम नहीं मिला लागू करने के लिए स्थिति कोड जैसे 400 या 500 के लिए त्रुटि हैंडलिंग मदद कर सकती है अप्रत्याशित परिणामों का प्रबंधन करना सुनिश्चित करते हुए मजबूत अनुप्रयोग व्यवहार भले ही डेटा अधूरा हो