Skip to main content
GET
/
2
/
insights
/
historical
ऐतिहासिक पोस्ट इनसाइट्स प्राप्त करें
curl --request GET \
  --url https://api.x.com/2/insights/historical \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "errors": [
        {
          "error": "<string>",
          "tweets": [
            "<string>"
          ]
        }
      ],
      "measurement": {
        "metrics_time_series": [
          {
            "tweet_id": "1346889436626259968",
            "value": {
              "metric_values": [
                {
                  "metric_type": "<string>",
                  "metric_value": 123
                }
              ],
              "timestamp": {
                "iso8601_time": "<string>"
              }
            }
          }
        ],
        "metrics_total": [
          {
            "tweet_id": "1346889436626259968",
            "value": [
              {
                "metric_type": "<string>",
                "metric_value": 123
              }
            ]
          }
        ]
      }
    }
  ],
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

tweet_ids
string[]
required

ऐतिहासिक मेट्रिक्स के लिए PostIds की सूची।

Required array length: 1 - 25 elements

इस Tweet का विशिष्ट पहचानकर्ता। इसे स्ट्रिंग के रूप में लौटाया जाता है, ताकि उन भाषाओं और टूल्स में जटिलताओं से बचा जा सके जो बड़े पूर्णांकों को संभाल नहीं सकते।

Pattern: ^[0-9]{1,19}$
Example:
["20"]
end_time
string<date-time>
required

YYYY-MM-DDTHH:mm:ssZ. समय सीमा के अंत को दर्शाने वाला UTC टाइमस्टैम्प।

start_time
string<date-time>
required

YYYY-MM-DDTHH:mm:ssZ. समय सीमा की शुरुआत को दर्शाने वाला UTC टाइमस्टैम्प।

granularity
enum<string>
required

मेट्रिक्स रिस्पॉन्स की ग्रैन्युलैरिटी।

Available options:
Daily,
Hourly,
Weekly,
Total
Example:

"Total"

requested_metrics
enum<string>[]
required

ऐतिहासिक अनुरोध के लिए मेट्रिक्स का अनुरोध करें।

Minimum array length: 1
Available options:
AppInstallAttempts,
AppOpens,
DetailExpands,
EmailTweet,
Engagements,
Follows,
HashtagClicks,
Impressions,
Likes,
LinkClicks,
MediaEngagements,
MediaViews,
PermalinkClicks,
ProfileVisits,
QuoteTweets,
Replies,
Retweets,
UniqueVideoViews,
UrlClicks,
UserProfileClicks,
VideoCompletions,
VideoPlayed25Percent,
VideoPlayed50Percent,
VideoPlayed75Percent,
VideoStarts,
VideoViews
engagement.fields
enum<string>[]

प्रदर्शित करने के लिए Engagement फ़ील्ड्स की अल्पविराम-से-पृथक सूची। Engagement ऑब्जेक्ट के लिए उपलब्ध फ़ील्ड्स।

Minimum array length: 1
Available options:
errors,
measurement
Example:
["errors", "measurement"]

Response

अनुरोध सफल रहा।

data
object[]
Minimum array length: 1
errors
object[]
Minimum array length: 1

IETF RFC 7807 (https://tools.ietf.org/html/rfc7807) में परिभाषित एक HTTP Problem Details ऑब्जेक्ट।