API संदर्भ
अवलोकन
SNSTracker API आपको मॉनिटरिंग फीड्स और चैनल्स को प्रोग्रामेटिक रूप से मैनेज करने देता है। आप फीड्स (वीडियो, पोस्ट आदि) और चैनल्स (अकाउंट, प्रोफाइल) बना सकते हैं, उन्हें रिफ्रेश करके नवीनतम डेटा पा सकते हैं, और वेबहुक्स के ज़रिए रियल‑टाइम नोटिफिकेशन प्राप्त कर सकते हैं।
प्रमाणीकरण
सभी API अनुरोधों के लिए API की के ज़रिए प्रमाणीकरण आवश्यक है। अपने API की को X-API-Key हेडर में शामिल करें।
अपना API की कैसे प्राप्त करें:
- SNSTracker में लॉग इन करें
- Settings → API Keys पर जाएँ
- नया API की बनाएँ या मौजूदा का उपयोग करें
- API की कॉपी करें (यह केवल बनाते समय एक बार दिखाई देता है)
API एंडपॉइंट्स
1. फीड्स बनाएँ
फीड URL (वीडियो, पोस्ट आदि) सबमिट करके मॉनिटरिंग फीड्स बनाएँ।
POST /api/v1/feedsअनुरोध
Headers:
X-API-Key: आपका API की (आवश्यक)Content-Type:application/json
Request Body:
{
"urls": [
"https://www.tiktok.com/@user/video/1234567890",
"https://www.instagram.com/p/ABC123/"
],
"collectionId": "coll_abc123xyz"
}Parameters:
urls(आवश्यक): मॉनिटर करने के लिए फीड URL की सूची। प्रति अनुरोध अधिकतम 200 URL।collectionId(वैकल्पिक): वह कलेक्शन ID जहाँ फीड्स जोड़े जाएँगे। यदि नहीं दिया गया, तो आपकी टीम का डिफ़ॉल्ट कलेक्शन उपयोग होगा।
प्रतिक्रिया
Success Response (200):
{
"code": 0,
"message": "ok",
"data": {
"success": 2,
"failed": 0,
"total": 2,
"results": [
{
"index": 0,
"url": "https://www.tiktok.com/@user/video/1234567890",
"platform": "tiktok",
"feedId": "feed_abc123xyz",
"success": true
},
{
"index": 1,
"url": "https://www.instagram.com/p/ABC123/",
"platform": "instagram",
"feedId": "feed_def456uvw",
"success": true
}
],
"errors": [],
"message": "Feeds created successfully. Data will be updated shortly."
}
}Response Fields:
success: सफलतापूर्वक बनाए गए फीड्स की संख्याfailed: विफल फीड निर्माण की संख्याtotal: प्रदान किए गए कुल URLs की संख्याresults: प्रत्येक URL के लिए परिणामों की सूचीindex: अनुरोध सूची में शून्य‑आधारित इंडेक्सurl: वैलिडेट किया गया और मानकीकृत URLplatform: पहचाना गया प्लेटफ़ॉर्म (tiktok, instagram, youtube, आदि)feedId: बनाए गए फीड का यूनिक पहचानकर्ताsuccess: क्या फीड सफलतापूर्वक बनाया गयाskipped: (वैकल्पिक) क्या फीड पहले से मौजूद होने के कारण स्किप किया गयाresumed: (वैकल्पिक) क्या रुका हुआ फीड फिर से शुरू किया गयाerror: (वैकल्पिक) निर्माण विफल होने पर त्रुटि संदेश
errors: असफल URLs के लिए त्रुटियों की सूची
उदाहरण अनुरोध
curl -X POST https://snstracker.com/api/v1/feeds \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"urls": [
"https://www.tiktok.com/@user/video/1234567890"
]
}'2. फीड्स रिफ्रेश करें
नवीनतम डेटा तुरंत प्राप्त करने के लिए मौजूदा फीड्स रिफ्रेश करें। केवल "Pending" या "Tracked" स्टेटस वाले फीड्स को रिफ्रेश किया जा सकता है।
POST /api/v1/feeds/refreshअनुरोध
Headers:
X-API-Key: आपका API की (आवश्यक)Content-Type:application/json
Request Body:
{
"feedIds": ["feed_abc123xyz", "feed_def456uvw"]
}Parameters:
feedIds(आवश्यक): रिफ्रेश करने के लिए फीड IDs की सूची
प्रतिक्रिया
Success Response (200):
{
"code": 0,
"message": "ok",
"data": {
"success": true,
"feedIds": ["feed_abc123xyz", "feed_def456uvw"],
"total": 2,
"message": "Successfully refreshed 2 feed(s)"
}
}Response Fields:
success: क्या रिफ्रेश ऑपरेशन सफल रहाfeedIds: रिफ्रेश किए गए फीड IDs की सूचीtotal: रिफ्रेश किए गए फीड्स की संख्याmessage: सफलता संदेश
उदाहरण अनुरोध
curl -X POST https://snstracker.com/api/v1/feeds/refresh \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"feedIds": ["feed_abc123xyz"]
}'3. चैनल्स बनाएँ
चैनल URL (अकाउंट प्रोफाइल आदि) सबमिट करके मॉनिटरिंग चैनल्स बनाएँ।
Channel pricing note: Xiaohongshu channel tasks are priced separately from the default channel task price and currently cost 10 credits per successful request.
POST /api/v1/channelsअनुरोध
Headers:
X-API-Key: आपका API की (आवश्यक)Content-Type:application/json
Request Body:
{
"urls": [
"https://www.tiktok.com/@username",
"https://www.instagram.com/username/"
],
"collectionId": "coll_abc123xyz"
}Parameters:
urls(आवश्यक): मॉनिटर करने के लिए चैनल URLs की सूची। प्रति अनुरोध अधिकतम 5 URL।collectionId(वैकल्पिक): वह कलेक्शन ID जहाँ चैनल्स जोड़े जाएँगे। यदि नहीं दिया गया, तो आपकी टीम का डिफ़ॉल्ट कलेक्शन उपयोग होगा।
प्रतिक्रिया
Success Response (200):
{
"code": 0,
"message": "ok",
"data": {
"success": 2,
"failed": 0,
"total": 2,
"results": [
{
"index": 0,
"url": "https://www.tiktok.com/@username",
"platform": "tiktok",
"channelId": "channel_abc123xyz",
"success": true
},
{
"index": 1,
"url": "https://www.instagram.com/username/",
"platform": "instagram",
"channelId": "channel_def456uvw",
"success": true
}
],
"errors": [],
"message": "Channels created successfully. Data will be updated shortly."
}
}Response Fields:
success: सफलतापूर्वक बनाए गए चैनल्स की संख्याfailed: विफल चैनल निर्माण की संख्याtotal: प्रदान किए गए कुल URLs की संख्याresults: प्रत्येक URL के लिए परिणामों की सूचीindex: अनुरोध सूची में शून्य‑आधारित इंडेक्सurl: वैलिडेट किया गया और मानकीकृत URLplatform: पहचाना गया प्लेटफ़ॉर्म (tiktok, instagram, youtube, आदि)channelId: बनाए गए चैनल का यूनिक पहचानकर्ताsuccess: क्या चैनल सफलतापूर्वक बनाया गयाskipped: (वैकल्पिक) क्या चैनल पहले से मौजूद होने के कारण स्किप किया गयाresumed: (वैकल्पिक) क्या रुका हुआ चैनल फिर से शुरू किया गयाerror: (वैकल्पिक) निर्माण विफल होने पर त्रुटि संदेश
errors: असफल URLs के लिए त्रुटियों की सूची
उदाहरण अनुरोध
curl -X POST https://snstracker.com/api/v1/channels \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"urls": [
"https://www.tiktok.com/@username"
]
}'4. चैनल्स रिफ्रेश करें
नवीनतम डेटा तुरंत प्राप्त करने के लिए मौजूदा चैनल्स रिफ्रेश करें। केवल "Pending" या "Tracked" स्टेटस वाले चैनल्स को रिफ्रेश किया जा सकता है।
Channel pricing note: Xiaohongshu channel tasks are priced separately from the default channel task price and currently cost 10 credits per successful request.
POST /api/v1/channels/refreshअनुरोध
Headers:
X-API-Key: आपका API की (आवश्यक)Content-Type:application/json
Request Body:
{
"channelIds": ["channel_abc123xyz", "channel_def456uvw"]
}Parameters:
channelIds(आवश्यक): रिफ्रेश करने के लिए चैनल IDs की सूची
प्रतिक्रिया
Success Response (200):
{
"code": 0,
"message": "ok",
"data": {
"success": true,
"channelIds": ["channel_abc123xyz", "channel_def456uvw"],
"total": 2,
"message": "Successfully refreshed 2 channel(s)"
}
}Response Fields:
success: क्या रिफ्रेश ऑपरेशन सफल रहाchannelIds: रिफ्रेश किए गए चैनल IDs की सूचीtotal: रिफ्रेश किए गए चैनल्स की संख्याmessage: सफलता संदेश
उदाहरण अनुरोध
curl -X POST https://snstracker.com/api/v1/channels/refresh \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"channelIds": ["channel_abc123xyz"]
}'5. फीड सिंक
scrapy सेवा से सीधे फीड डेटा सिंक करें। यह एंडपॉइंट तुरंत नवीनतम फीड डेटा लाता है और सफल सिंक पर क्रेडिट्स खर्च करता है। टीम के सभी सदस्य और API कुंजियाँ सभी सिंक एंडपॉइंट के लिए एक ही सीमा साझा करते हैं। साझा सीमा स्टार्टर या सक्रिय सदस्यता न होने पर 1, स्टैंडर्ड पर 5 और प्रीमियम पर 10 समवर्ती अनुरोध है।
⚠️ महत्वपूर्ण नोट: यह सिंक एंडपॉइंट स्टैंडअलोन है और वेब प्लेटफ़ॉर्म के साथ इंटीग्रेट नहीं होता। सिंक ऑपरेशन्स:
- वेब डैशबोर्ड में फीड रिकॉर्ड्स नहीं बनाएँगे या अपडेट करेंगे
- आपकी फीड्स सूची या कलेक्शन्स में नहीं दिखाई देंगे
- वेबहुक्स या नोटिफिकेशन ट्रिगर नहीं करेंगे
- सिर्फ API प्रतिक्रिया में सीधे प्राप्त डेटा लौटाएँगे
यह एंडपॉइंट API के ज़रिए एक‑बार डेटा रिट्रीवल के लिए डिज़ाइन किया गया है। वेब प्लेटफ़ॉर्म में दिखाई देने वाले स्थायी मॉनिटरिंग फीड्स बनाने के लिए Create Feeds एंडपॉइंट का उपयोग करें।
POST /api/v1/feeds/syncअनुरोध
Headers:
X-API-Key: आपका API की (आवश्यक)Content-Type:application/json
Request Body:
{
"url": "https://www.tiktok.com/@user/video/1234567890"
}Parameters:
url(आवश्यक): सिंक करने के लिए फीड URL। वैध, गैर‑खाली स्ट्रिंग होना चाहिए।
प्रतिक्रिया
Success Response (200):
{
"code": 0,
"message": "ok",
"data": {
"success": true,
"url": "https://www.tiktok.com/@user/video/1234567890",
"feedInfo": {
"feed_id": "1234567890",
"platform": 1,
"platform_name": "tiktok",
"url": "https://www.tiktok.com/@user/video/1234567890",
"views": 1000000,
"likes": 200000,
"comments": 1000,
"shares": 2000,
"bookmarks": 200,
"engagement": 512000,
"description": "Video description",
"hashtags": ["tag1", "tag2"],
"publish_at": 1234567890
}
}
}Response Fields:
success: क्या सिंक ऑपरेशन सफल रहाurl: सिंक किया गया फीड URLfeedInfo: मीट्रिक्स, विवरण, हैशटैग्स आदि सहित पूरा फीड विवरण
Error Responses:
429 Too Many Requests: टीम की साझा समवर्ती सीमा पूरी हो गई है। अनुरोध कतार में नहीं रखा जाता।400 Bad Request: अपर्याप्त क्रेडिट्स या अमान्य URL
उदाहरण अनुरोध
curl -X POST https://snstracker.com/api/v1/feeds/sync \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.tiktok.com/@user/video/1234567890"
}'6. चैनल सिंक
scrapy सेवा से सीधे चैनल डेटा सिंक करें। यह एंडपॉइंट तुरंत नवीनतम चैनल डेटा लाता है और सफल सिंक पर क्रेडिट्स खर्च करता है। टीम के सभी सदस्य और API कुंजियाँ सभी सिंक एंडपॉइंट के लिए एक ही सीमा साझा करते हैं। साझा सीमा स्टार्टर या सक्रिय सदस्यता न होने पर 1, स्टैंडर्ड पर 5 और प्रीमियम पर 10 समवर्ती अनुरोध है।
Channel pricing note: Xiaohongshu channel tasks are priced separately from the default channel task price and currently cost 10 credits per successful request.
⚠️ महत्वपूर्ण नोट: यह सिंक एंडपॉइंट स्टैंडअलोन है और वेब प्लेटफ़ॉर्म के साथ इंटीग्रेट नहीं होता। सिंक ऑपरेशन्स:
- वेब डैशबोर्ड में चैनल रिकॉर्ड्स नहीं बनाएँगे या अपडेट करेंगे
- आपकी चैनल्स सूची या कलेक्शन्स में नहीं दिखाई देंगे
- वेबहुक्स या नोटिफिकेशन ट्रिगर नहीं करेंगे
- सिर्फ API प्रतिक्रिया में सीधे प्राप्त डेटा लौटाएँगे
यह एंडपॉइंट API के ज़रिए एक‑बार डेटा रिट्रीवल के लिए डिज़ाइन किया गया है। वेब प्लेटफ़ॉर्म में दिखाई देने वाले स्थायी मॉनिटरिंग चैनल्स बनाने के लिए Create Channels एंडपॉइंट का उपयोग करें।
POST /api/v1/channels/syncअनुरोध
Headers:
X-API-Key: आपका API की (आवश्यक)Content-Type:application/json
Request Body:
{
"url": "https://www.tiktok.com/@username"
}Parameters:
url(आवश्यक): सिंक करने के लिए चैनल URL। वैध, गैर‑खाली स्ट्रिंग होना चाहिए।
प्रतिक्रिया
Success Response (200):
{
"code": 0,
"message": "ok",
"data": {
"success": true,
"url": "https://www.tiktok.com/@username",
"channelInfo": {
"id": "1234567890",
"platform": 1,
"platform_name": "tiktok",
"username": "username",
"nickname": "User Name",
"description": "Channel description",
"followers": 1000000,
"followings": 2000,
"likes": 200000000,
"total_count": 1000,
"track_count": 1000,
"status": 1
}
}
}Response Fields:
success: क्या सिंक ऑपरेशन सफल रहाurl: सिंक किया गया चैनल URLchannelInfo: मीट्रिक्स, विवरण आदि सहित पूरा चैनल विवरण
Error Responses:
429 Too Many Requests: टीम की साझा समवर्ती सीमा पूरी हो गई है। अनुरोध कतार में नहीं रखा जाता।400 Bad Request: अपर्याप्त क्रेडिट्स या अमान्य URL
उदाहरण अनुरोध
curl -X POST https://snstracker.com/api/v1/channels/sync \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.tiktok.com/@username"
}'7. चैनल सामग्री सिंक करें
Instagram और Reels के लिए एक पेज लौटाता है, प्रति अनुरोध अधिकतम 12 आइटम; अगला पेज अपने आप नहीं लाता। instagram में चित्र, वीडियो और कैरोसेल पोस्ट शामिल हैं; reels Reels वीडियो लौटाता है।
POST /api/v1/channels/feeds/sync
X-API-Key: your-api-key
Content-Type: application/jsonRequest and pagination
{
"platform": "instagram",
"channel_name": "instagram"
}countएक वैकल्पिक धनात्मक पूर्णांक है, जो इस पेज पर वांछित आइटम संख्या बताता है। इसका कोई डिफ़ॉल्ट मान नहीं है। संख्या की सीमा प्लेटफ़ॉर्म के अनुसार बदलती है: Instagram और Reels प्रति अनुरोध अधिकतम 12 आइटम लौटाते हैं, और वास्तविक संख्या कम हो सकती है। इसे छोड़ने पर प्लेटफ़ॉर्म का डिफ़ॉल्ट पेज आकार उपयोग होता है।- पहले पेज के लिए
cursorछोड़ें। अगले पेज के लिए पिछलाnext_cursorबिना बदलाव भेजें औरplatform,channel_nameसमान रखें। अंत मेंhas_more=false,next_cursor=nullमिलता है।
{
"platform": "instagram",
"channel_name": "instagram",
"cursor": "previous-next-cursor"
}हर सफल पेज की कीमत 10 क्रेडिट है, भले ही पेज खाली हो। केवल विफल अनुरोध निःशुल्क हैं; अनुरोध से पहले कम से कम 10 क्रेडिट चाहिए। यह अन्य सिंक API के साथ टीम की समवर्ती सीमा साझा करता है और डैशबोर्ड रिकॉर्ड नहीं बनाता।
Response example (placeholder cursor) — reels, lunacut.edit, count=1
{
"code": 0,
"message": "ok",
"data": {
"success": true,
"platform": "reels",
"channel_name": "lunacut.edit",
"channel_url": "https://www.instagram.com/lunacut.edit/",
"requested_count": 1,
"returned_count": 1,
"has_more": true,
"next_cursor": "cursor-from-response",
"items": [
{
"feed_id": "4009169989985582972",
"platform": 5,
"platform_name": "reels",
"type": "video",
"url": "https://www.instagram.com/reel/Dejbt1JPz98/",
"author_username": "lunacut.edit",
"publish_at": 1792150387,
"duration": 70.077,
"view_count": 310475
}
]
}
}platform and channel_name are required. channel_name is the username, not the display name; leading @ is accepted and dots are preserved. requested_count is null when count is omitted; returned_count equals items.length. Unknown metrics/timestamps are null. Posts may lack timestamps and carousel details. items uses the existing feed fields, including video_url, image_urls and cover_url; the example shows only selected fields. publish_at is Unix seconds and duration is seconds. Upstream order is preserved, without a most-popular sorting option; deduplicate across pages by feed_id. Empty pages can still have a next cursor; a carousel counts as one post.
items में व्यू (view_count), लाइक (like_count), सेव (bookmark_count) और टिप्पणी (comment_count) जैसे आँकड़े प्लेटफ़ॉर्म और उसकी सामग्री सूची में उपलब्ध डेटा पर निर्भर करते हैं। कुछ आँकड़े उपलब्ध नहीं हो सकते। जो आँकड़े नहीं मिलते, वे null के रूप में लौटते हैं; इसका अर्थ शून्य नहीं है।
सूची में अनुपलब्ध आँकड़े खोजने के लिए POST /api/v1/feeds/sync को अलग से कॉल करें और अनुरोध बॉडी के url फ़ील्ड में उस आइटम का url दें। इस विवरण अनुरोध का शुल्क उस endpoint के नियमों के अनुसार अलग से लिया जाता है। परिणाम प्लेटफ़ॉर्म द्वारा उपलब्ध डेटा पर निर्भर करते हैं; सभी अनुपलब्ध आँकड़े मिलने की गारंटी नहीं है।
HTTP: 400 invalid input/cursor or insufficient initial credits; 401 invalid API key; 403 disabled team or inaccessible channel; 402 insufficient credits at settlement; 429 team concurrency limit (Retry-After: 1); 502 upstream/invalid page; 503 service unavailable; 504 timeout.
8. प्रोफ़ाइल की अतिरिक्त जानकारी प्राप्त करें
POST /api/v1/channels/about/syncकेवल Instagram और Reels समर्थित हैं। इनपुट /api/v1/channels/sync जैसा अनिवार्य url है: https://www.instagram.com/lunacut.edit/ या https://www.instagram.com/lunacut.edit/reels/। platform, count, cursor की आवश्यकता नहीं है। पोस्ट URL और अन्य प्लेटफ़ॉर्म समर्थित नहीं हैं।
curl -X POST https://snstracker.com/api/v1/channels/about/sync \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.instagram.com/lunacut.edit/"}'हर सफल अनुरोध पर 80 क्रेडिट लगते हैं, भले ही फ़ील्ड null हों। त्रुटि पर शुल्क नहीं लगता; पहले कम से कम 80 क्रेडिट चाहिए। सभी सिंक API टीम की साझा समवर्ती सीमा इस्तेमाल करते हैं: Starter/सक्रिय सदस्यता नहीं 1, Standard 5, Premium 10। डैशबोर्ड रिकॉर्ड या webhook नहीं बनते।
उत्तर का उदाहरण; फ़ील्ड उपलब्धता खाते की सार्वजनिक जानकारी पर निर्भर करती है।
{
"code": 0,
"message": "ok",
"data": {
"success": true,
"url": "https://www.instagram.com/lunacut.edit/",
"channelAbout": {
"platform": 6,
"platform_name": "instagram",
"username": "lunacut.edit",
"channel_url": "https://www.instagram.com/lunacut.edit/",
"country": "Brazil",
"country_visible": true,
"date_joined": "2020-05",
"date_joined_text": "May 2020"
}
}
}country: सार्वजनिक देश/क्षेत्र, केवल country_visible=true होने पर; वास्तविक समय का IP स्थान नहीं है। country_visible: दृश्यता, अज्ञात होने पर null। date_joined: शामिल होने का महीना (YYYY-MM), अनुपलब्ध/अपरिचित होने पर null। date_joined_text: मूल तारीख पाठ या null। Bio, फ़ॉलोअर संख्या और पुराने नाम शामिल नहीं हैं।
400 / 401 / 402 / 403 / 429 (Retry-After: 1) / 502 / 503 / 504.
वेबहुक इंटीग्रेशन
SNSTracker वेबहुक्स का समर्थन करता है ताकि जब मॉनिटर किया गया कंटेंट आपके कॉन्फ़िगर किए गए थ्रेशहोल्ड्स को पूरा करे तो आपको रियल‑टाइम नोटिफिकेशन मिलें। आप वेबहुक्स को निम्न के बारे में नोटिफिकेशन पाने के लिए कॉन्फ़िगर कर सकते हैं:
- फीड अपडेट्स: जब व्यूज़, एंगेजमेंट (लाइक्स + कमेंट्स + शेयर्स) आपके थ्रेशहोल्ड के अनुसार बढ़ें
- चैनल अपडेट्स: जब फॉलोअर्स, फॉलोइंग्स या लाइक्स आपके थ्रेशहोल्ड के अनुसार बढ़ें
वेबहुक्स सेट अप करना
- अपनी कलेक्शन्स सेटिंग्स में वेबहुक टारगेट्स कॉन्फ़िगर करें
- अपनी कलेक्शन कॉन्फ़िगरेशन में नोटिफिकेशन सक्षम करें
- जिन मीट्रिक्स को मॉनिटर करना है उनके लिए थ्रेशहोल्ड्स सेट करें
विस्तृत वेबहुक कॉन्फ़िगरेशन निर्देशों के लिए, कृपया Webhook Configuration Guide देखें।
त्रुटि प्रतिक्रियाएँ
सभी एंडपॉइंट्स निम्न त्रुटि प्रतिक्रियाएँ लौटा सकते हैं:
401 Unauthorized - Missing API Key
{
"code": -1,
"message": "X-API-Key header is required"
}401 Unauthorized - Invalid API Key
{
"code": -1,
"message": "Invalid API key"
}400 Bad Request - Invalid Input
{
"code": -1,
"message": "Invalid request: urls must be an array"
}400 Bad Request - Too Many URLs (Create Feeds)
{
"code": -1,
"message": "Maximum 200 URLs allowed per request"
}400 Bad Request - Too Many URLs (Create Channels)
{
"code": -1,
"message": "Maximum 200 URLs allowed per request"
}400 Bad Request - Insufficient Credits
{
"code": -1,
"message": "Insufficient credits. Required: 10, Available: 5"
}429 Too Many Requests - टीम सिंक समवर्ती सीमा
{
"code": -1,
"message": "Maximum concurrent sync requests (1) reached for this team. Currently active: 1. Wait for a request to complete, or contact official support to increase the limit."
}403 Forbidden - Invalid Collection
{
"code": -1,
"message": "Collection not found or does not belong to your team"
}404 Not Found
{
"code": -1,
"message": "No feeds found"
}या
{
"code": -1,
"message": "No channels found"
}उपयोग के उदाहरण
Python उदाहरण - फीड्स बनाएँ
import requests
url = "https://snstracker.com/api/v1/feeds"
headers = {
"X-API-Key": "your-api-key-here",
"Content-Type": "application/json"
}
data = {
"urls": [
"https://www.tiktok.com/@user/video/1234567890",
"https://www.instagram.com/p/ABC123/"
]
}
response = requests.post(url, json=data, headers=headers)
result = response.json()
if result["code"] == 0:
print(f"Successfully created {result['data']['success']} feeds")
for feed in result["data"]["results"]:
print(f" - {feed['url']}: {feed['feedId']}")
else:
print(f"Error: {result['message']}")JavaScript उदाहरण - फीड्स रिफ्रेश करें
const response = await fetch('https://snstracker.com/api/v1/feeds/refresh', {
method: 'POST',
headers: {
'X-API-Key': 'your-api-key-here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
feedIds: ['feed_abc123xyz', 'feed_def456uvw'],
}),
});
const result = await response.json();
if (result.code === 0) {
console.log(`Successfully refreshed ${result.data.total} feeds`);
result.data.feedIds.forEach((feedId) => {
console.log(` - ${feedId}`);
});
} else {
console.error(`Error: ${result.message}`);
}महत्वपूर्ण नोट्स
-
URL वैलिडेशन: सभी URLs को निर्माण से पहले स्वतः वैलिडेट किया जाता है। अमान्य URLs अस्वीकार कर दिए जाएँगे।
-
डुप्लिकेट आइटम्स: अगर वही URL वाला कोई आइटम पहले से कलेक्शन में मौजूद है:
- अगर वह सक्रिय है, तो उसे स्किप किया जाएगा (
skipped: trueके साथ) - अगर वह रुका हुआ है, तो उसे फिर से शुरू किया जाएगा (
resumed: trueके साथ)
- अगर वह सक्रिय है, तो उसे स्किप किया जाएगा (
-
डेटा कलेक्शन: सफल निर्माण के बाद, आइटम्स को डेटा कलेक्शन के लिए क्यू किया जाता है। निर्माण के थोड़ी देर बाद डेटा उपलब्ध हो जाएगा।
-
रिफ्रेश स्टेटस: केवल "Pending" या "Tracked" स्टेटस वाले आइटम्स को रिफ्रेश किया जा सकता है। अन्य स्टेटस वाले आइटम्स फ़िल्टर कर दिए जाएँगे।
-
क्रेडिट्स: अनुरोध करने से पहले सुनिश्चित करें कि आपके पास पर्याप्त क्रेडिट्स हैं। सिंक ऑपरेशन्स सफल डेटा रिट्रीवल पर तुरंत क्रेडिट्स खर्च करते हैं। Xiaohongshu channel tasks are priced separately and currently cost 10 credits per successful request.
/api/v1/channels/feeds/sync: हर सफल पेज की कीमत 10 क्रेडिट है, भले ही पेज खाली हो। केवल विफल अनुरोध निःशुल्क हैं; अनुरोध से पहले कम से कम 10 क्रेडिट चाहिए। यह अन्य सिंक API के साथ टीम की समवर्ती सीमा साझा करता है और डैशबोर्ड रिकॉर्ड नहीं बनाता।/api/v1/channels/about/sync: हर सफल अनुरोध पर 80 क्रेडिट लगते हैं, भले ही फ़ील्डnullहों। त्रुटि पर शुल्क नहीं लगता; पहले कम से कम 80 क्रेडिट चाहिए। सभी सिंक API टीम की साझा समवर्ती सीमा इस्तेमाल करते हैं: Starter/सक्रिय सदस्यता नहीं 1, Standard 5, Premium 10। डैशबोर्ड रिकॉर्ड या webhook नहीं बनते। -
टीम सिंक समवर्ती सीमा (
/api/v1/feeds/sync+/api/v1/channels/sync+/api/v1/channels/feeds/sync+/api/v1/channels/about/sync): टीम के सभी सदस्य और API कुंजियाँ सभी सिंक एंडपॉइंट के लिए एक ही सीमा साझा करते हैं। साझा सीमा स्टार्टर या सक्रिय सदस्यता न होने पर 1, स्टैंडर्ड पर 5 और प्रीमियम पर 10 समवर्ती अनुरोध है। सीमा वर्तमान प्रभावी सदस्यता के अनुसार बदलती है; आधिकारिक सहायता द्वारा टीम के लिए निर्धारित अलग सीमा को प्राथमिकता मिलती है। टीम की सीमा बढ़ाने के लिए आधिकारिक सहायता से संपर्क करें। -
सिंक बनाम क्रिएट: सिंक एंडपॉइंट्स (
/api/v1/feeds/syncऔर/api/v1/channels/sync+/api/v1/channels/feeds/sync+/api/v1/channels/about/sync) स्टैंडअलोन हैं और वेब प्लेटफ़ॉर्म के साथ इंटीग्रेट नहीं होते। वे केवल API प्रतिक्रिया में डेटा लौटाते हैं और डैशबोर्ड में रिकॉर्ड नहीं बनाते। वेब प्लेटफ़ॉर्म में दिखाई देने वाले स्थायी मॉनिटरिंग आइटम्स बनाने के लिए क्रिएट एंडपॉइंट्स (/api/v1/feedsऔर/api/v1/channels) का उपयोग करें। -
दोबारा प्रयास: 429 मिलने पर सक्रिय अनुरोध पूरा होने की प्रतीक्षा करें और
Retry-Afterका पालन करते हुए बढ़ते अंतराल पर फिर प्रयास करें। 503 मिलने पर बाद में प्रयास करें। -
समर्थित प्लेटफ़ॉर्म्स: TikTok, Instagram, YouTube, और अन्य प्रमुख सोशल मीडिया प्लेटफ़ॉर्म्स।
समस्या निवारण
समस्या: "X-API-Key header is required"
समाधान: सुनिश्चित करें कि आप अपने अनुरोध में X-API-Key हेडर शामिल कर रहे हैं।
समस्या: "Invalid API key"
समाधान: सत्यापित करें कि आपका API की सही है। आप Settings → API Keys से नया बना सकते हैं।
समस्या: "Maximum URLs allowed per request"
समाधान: अपने URLs को कई अनुरोधों में बाँटें। फीड्स में प्रति अनुरोध अधिकतम 200 URLs, चैनल्स में प्रति अनुरोध अधिकतम 5 URLs की अनुमति है।
समस्या: "No collection found"
समाधान: पहले डैशबोर्ड में एक कलेक्शन बनाएँ, या मौजूदा कलेक्शन ID निर्दिष्ट करें।
समस्या: "Insufficient credits"
समाधान: अधिक क्रेडिट्स खरीदें या अपना सब्सक्रिप्शन प्लान जांचें।
समस्या: "No refreshable items found"
समाधान: केवल "Pending" या "Tracked" स्टेटस वाले आइटम्स को रिफ्रेश किया जा सकता है। अपने आइटम्स की स्टेटस जांचें।
समस्या: कुछ URLs वैलिडेशन में असफल होते हैं
समाधान: प्रतिक्रिया में errors ऐरे में दिए गए विशिष्ट त्रुटि संदेश देखें। सुनिश्चित करें कि URLs समर्थित प्लेटफ़ॉर्म्स से हैं और सार्वजनिक रूप से सुलभ हैं।