मुख्य सामग्री पर जाएं
GET
/
2
/
news
/
search
समाचार खोजें
curl --request GET \
  --url https://api.x.com/2/news/search \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "rest_id": "2244994945",
      "category": "<string>",
      "cluster_posts_results": [
        {
          "post_id": "1346889436626259968"
        }
      ],
      "contexts": {
        "entities": {
          "events": [
            "<string>"
          ],
          "organizations": [
            "<string>"
          ],
          "people": [
            "<string>"
          ],
          "places": [
            "<string>"
          ],
          "products": [
            "<string>"
          ]
        },
        "finance": {
          "tickers": [
            "<string>"
          ]
        },
        "sports": {
          "teams": [
            "<string>"
          ]
        },
        "topics": [
          "<string>"
        ]
      },
      "disclaimer": "<string>",
      "hook": "<string>",
      "keywords": [
        "<string>"
      ],
      "last_updated_at_ms": "2025-7-14T04:35:55Z",
      "name": "<string>",
      "summary": "<string>"
    }
  ],
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ],
  "meta": {
    "result_count": 123
  }
}

प्राधिकरण

Authorization
string
header
आवश्यक

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

क्वेरी पैरामीटर

query
string
आवश्यक

खोज क्वेरी।

Required string length: 1 - 2048
उदाहरण:

"crypto"

max_results
integer<int32>
डिफ़ॉल्ट:10

लौटाए जाने वाले परिणामों की संख्या।

आवश्यक सीमा: 1 <= x <= 100
max_age_hours
integer<int32>
डिफ़ॉल्ट:168

खोजे जाने वाले समाचार लेख की अधिकतम आयु।

आवश्यक सीमा: 1 <= x <= 720
news.fields
enum<string>[]

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

Minimum array length: 1
उपलब्ध विकल्प:
category,
cluster_posts_results,
contexts,
disclaimer,
hook,
id,
keywords,
name,
summary,
updated_at
उदाहरण:
[
  "category",
  "cluster_posts_results",
  "contexts",
  "disclaimer",
  "hook",
  "id",
  "keywords",
  "name",
  "summary",
  "updated_at"
]

प्रतिक्रिया

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

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

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

meta
object