X Twitter Searchnews

60 credits/call
ae_x_twitter_searchnews

Search news stories by keyword, result limit and maximum age.

NewsSocial
60 credits/call

Pricing

60 credits/call
ConditionCharge
Each call60 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
querystringYes搜索关键词。 Search keywords.—
max_resultsintegerNo可选,1–100,指定本次最多返回的记录数量。省略时采用接口原默认上限10;实际结果可能更少。 Optional, from 1 to 100. Maximum records to return. Omit to use the endpoint default limit of 10; actual results may be fewer.—
news.fieldsstringNo需要返回的字段,多个字段名用逗号分隔。可选值:category, cluster_posts_results, contexts, disclaimer, hook, id, keywords, name, summary, updated_at。 Comma-separated fields to include in the response. Allowed values: category, cluster_posts_results, contexts, disclaimer, hook, id, keywords, name, summary, updated_at.—
max_age_hoursintegerNo新闻最长时间范围,单位小时。 Maximum news story age in hours.168

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_x_twitter_searchnews' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "max_age_hours": 30,
    "max_results": 6,
    "query": "GPT-6.2 OR \"Gemini 4\" OR Opus 5.5 launch release"
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "data": [
    {
      "category": "News",
      "contexts": {
        "topics": [
          "Technology"
        ]
      },
      "disclaimer": "This story is a summary of posts on X and may evolve over time. Grok can make mistakes, verify its outputs.",
      "hook": "AI fans waited eagerly for GPT-6.2 Astra and Fable 5.5, but weeks later, both models remain unreleased. The labs have gone quiet on flagships, opting instead for posts on safety and science.",
      "id": "2118880983525057013",
      "name": "OpenAI and Anthropic Delay Next AI Models in Standoff"
    }
  ],
  "meta": {
    "result_count": 6
  }
}

This example shows part of the response. Copied content is valid JSON.