Felo API PlatformFelo API Platform

Felo X पोस्ट खोज

Provider: Felo · भुगतान platform balance से

आपको जिस डेटा की आवश्यकता है, उसके लिए उपयुक्त operation चुनें। सभी पाँच endpoints POST का उपयोग करते हैं और root पर JSON लौटाते हैं, बिना किसी shared data wrapper के।

सभी examples overview से FELO_API_KEY का उपयोग करते हैं। Calls platform balance का उपयोग करती हैं, Felo Pro credits का नहीं। Response examples केवल illustrative हैं; live content और optional fields बदलते रहते हैं।

4. पोस्ट खोजें

POST /api/v1/data/x/tweet/search

फ़ील्डप्रकारआवश्यकअर्थ
querystringहाँखोज पाठ, 1–1,000 वर्ण
query_typestringनहींLatest (डिफ़ॉल्ट) या Top
limitintegerनहीं1–1,000; वर्तमान कार्यान्वयन कम से कम 20 का उपयोग करता है, डिफ़ॉल्ट 20
cursorstringनहींपृष्ठांकन कर्सर, अधिकतम 4,000 वर्ण
since_timeपूर्णांक या स्ट्रिंगनहींआरंभ समय; अस्पष्टता रहित संख्यात्मक मान के लिए Unix सेकंड का उपयोग करें
until_timeपूर्णांक या स्ट्रिंगनहींसमाप्ति समय; मिलीसेकंड नहीं, Unix सेकंड का उपयोग करें
curl -sS --request POST "https://openapi.felo.ai/api/v1/data/x/tweet/search" \
  -H "Authorization: Bearer $FELO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"retrieval augmented generation","query_type":"Latest","limit":20}'

Response में tweets, total, has_next और next_cursor होते हैं। Post objects में id, content, author, created_at और metrics शामिल होते हैं; replies और quoted/retweeted posts nested हो सकती हैं। IDs को strings की तरह treat करें।

परिणाम संख्या सीमाएँ

limit एक target है, guarantee नहीं। वर्तमान implementation कम से कम 20 का target उपयोग करती है: 20 का target एक upstream page पढ़ता है; बड़े targets अपने-आप अधिकतम 50 pages तक fetch करते हैं। प्रत्येक page से पहले elapsed time जाँचा जाता है, और 60 seconds से अधिक होते ही आगे के pages fetch नहीं किए जाते। In-flight upstream request फिर भी समय ले सकती है, इसलिए यह overall HTTP timeout नहीं है।

Collection तब भी रुक जाती है जब target पूरा हो जाए, upstream में next page न हो, कोई page empty हो, या cursor missing हो। limit से कम posts लौटना यह नहीं दर्शाता कि request विफल हुई या हर matching post प्राप्त कर ली गई। आगे बढ़ने से पहले has_next और next_cursor जाँचें।

{
  "tweets": [{
    "id":"example-post-id",
    "content":"Example post content",
    "author":{"user_id":"example-user-id","username":"example","display_name":"Example"},
    "created_at":"2026-11-01T00:00:00Z",
    "metrics":{},
    "replies":[]
  }],
  "total":1,
  "has_next":false,
  "next_cursor":null
}

पृष्ठांकन और लागत नियंत्रण

total वर्तमान response में संबंधित array को count करता है: post queries के लिए top-level posts, या reply queries के लिए प्रत्येक result entry के भीतर replies। यह global match count, किसी post की complete reply count, या अंतिम billable count नहीं है।

  1. पहली request cursor के बिना भेजें।
  2. Response से has_next और next_cursor पढ़ें। Replies के लिए, उन्हें प्रत्येक result entry पर पढ़ें।
  3. यदि कोई और page मौजूद है और cursor nonempty है, तो उसी query के साथ उसे बिना बदले भेजें। Replies batch के लिए, प्रत्येक post को अलग-अलग जारी रखें।
  4. जब next page न हो, cursor दोहराया जाए, या आपकी अपनी page अथवा spending limit पूरी हो जाए, तब रुकें।

Pagination metadata अंतिम upstream response को दर्शाती है; returned collection result cap पर truncate हो सकती है। यहाँ तक कि has_next=false भी इस बात की गारंटी नहीं है कि पूरा X history या replies प्राप्त कर लिए गए हैं। Bounded result set को all available data कहने के बजाय actual returned count दिखाएँ।

हर successful page पर charge लग सकता है। ये पाँच operations flat request fee से नहीं, बल्कि returned results के अनुसार billed होती हैं। Nested replies और अन्य returned records billed count को प्रभावित कर सकते हैं; केवल top-level array length से cost का अनुमान न लगाएँ। current prices और console में usage जाँचें। Complete object fields OpenAPI schema में हैं।

मदद चाहिए?