मुख्य सामग्री पर जाएं
समाचार लुकअप एंडपॉइंट डेवलपरों को X पर ताज़ा समाचार और सुर्खियाँ प्राप्त करने की सुविधा देता है। यह एंडपॉइंट OAuth1 और OAuth2 PKCE, दोनों के लिए ऐप-प्रमाणीकरण और उपयोगकर्ता-प्रमाणीकरण का समर्थन करता है।

शुरुआत करें

एंडपॉइंट का उपयोग करने के लिए, आपको बेयरर टोकन की आवश्यकता होगी, जो डेवलपर कंसोल से प्राप्त होता है। बेयरर टोकन मिल जाने के बाद, आप नीचे दिखाए गए अनुसार news API को कॉल कर सकते हैं:
curl 'https://api.x.com/2/news/1989418137272422538?news.fields=contexts,cluster_posts_results' --header 'Authorization: Bearer XXXXX'
यदि अनुरोध सफल होता है, तो आपको नीचे दिखाए गए अनुसार JSON रिस्पॉन्स दिखाई देना चाहिए:
{
  "data":{
    "category":"News",
    "name":"Nebius Group Stock Plunges 30% Despite Q3 Revenue Surge and Meta Deal",
    "summary":"Nebius Group announced third-quarter revenue of $214 million, a fourfold increase year-over-year, alongside a $3 billion five-year GPU cloud services contract with Meta Platforms on November 11, 2025. Despite these positives, shares fell over 30% to $83.58 by November 14, driven by AI sector cooling and a $119.6 million net loss. Analysts hold a strong Buy rating with an average price target of $139.67, while X users see the dip as a buying opportunity.",
    "hook":"Nebius Group's shares cratered 30% after blockbuster Q3 earnings and a $3 billion Meta deal—yet analysts and investors are calling it a golden buying chance amid AI hype.",
    "contexts":{
      "sports":{
        "teams":[]
      },
      "entities":{
        "events":[],
        "organizations":[
          "Goldman Sachs",
          "Nebius Group N.V."
        ],
        "people":[],
        "places":[],
        "products":[]
      },
      "topics":[
        "Stocks"
      ],
      "finance":{
        "tickers":[
          "NBIS"
        ]
      }
    },
    "cluster_posts_results":[
      {
        "post_id":"1989409257394245835"
      },
      {
        "post_id":"1989410019562197162"
      },
      {
        "post_id":"1989413132993999177"
      },
      {
        "post_id":"1989411147179610400"
      },
      {
        "post_id":"1989409829937656067"
      },
      {
        "post_id":"1989415596249985296"
      },
      {
        "post_id":"1989415537781477721"
      },
      {
        "post_id":"1989413002739691628"
      },
      {
        "post_id":"1989414454644363445"
      },
      {
        "post_id":"1989411489988710860"
      }
    ],
    "disclaimer":"This story is a summary of posts on X and may evolve over time. Grok can make mistakes, verify its outputs.",
    "last_updated_at_ms":"2025-11-17T16:21:41.000Z",
    "id":"1989418137272422538"
  }
}