मुख्य सामग्री पर जाएं

Documentation Index

Fetch the complete documentation index at: https://generaltranslation.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

यह मार्गदर्शिका आपको कोट पोस्ट्स (ऐसी पोस्ट्स जो किसी दूसरी पोस्ट को quote करती हैं) प्राप्त करने की प्रक्रिया बताती है।
पूर्वापेक्षाएँशुरू करने से पहले, आपको इनकी आवश्यकता होगी:

पोस्ट ID ढूँढें

जिस पोस्ट के कोट पोस्ट्स आप ढूँढना चाहते हैं, उसकी ID प्राप्त करें। आप इसे पोस्ट के URL में पा सकते हैं:
https://x.com/XDevelopers/status/1409931481552543749
                                └── यह पोस्ट ID है

कोट पोस्ट्स का अनुरोध करें

cURL
curl "https://api.x.com/2/tweets/1409931481552543749/quote_tweets?\
tweet.fields=created_at,public_metrics,author_id&\
expansions=author_id&\
user.fields=username,verified&\
max_results=10" \
  -H "Authorization: Bearer $BEARER_TOKEN"

रिस्पॉन्स की समीक्षा करें

{
  "data": [
    {
      "id": "1495979553889697792",
      "text": "Great thread on the new API features! https://t.co/...",
      "author_id": "29757971",
      "created_at": "2022-02-22T04:31:34.000Z",
      "public_metrics": {
        "retweet_count": 5,
        "reply_count": 2,
        "like_count": 42,
        "quote_count": 1
      },
      "edit_history_tweet_ids": ["1495979553889697792"]
    }
  ],
  "includes": {
    "users": [
      {
        "id": "29757971",
        "username": "developer",
        "verified": false
      }
    ]
  },
  "meta": {
    "result_count": 1,
    "next_token": "avdjwk0udyx6"
  }
}

परिणामों के लिए पेजिनेशन करें

SDKs पेजिनेशन को अपने-आप संभालते हैं। cURL के लिए, और कोट पोस्ट्स प्राप्त करने हेतु next_token का उपयोग करें:
curl "https://api.x.com/2/tweets/1409931481552543749/quote_tweets?\
max_results=10&\
pagination_token=avdjwk0udyx6" \
  -H "Authorization: Bearer $BEARER_TOKEN"

अगले चरण

रीट्वीट्स

रीट्वीट्स खोजें

पोस्ट खोज

ID से पोस्ट्स खोजें

API संदर्भ

एंडपॉइंट का पूरा दस्तावेज़ीकरण