X Twitter Getusersmentions

60 credits/call
ae_x_twitter_getusersmentions

Get public posts mentioning an account by user ID, with a result limit, time range and pagination.

Social
60 credits/call

Pricing

60 credits/call
ConditionCharge
Each call60 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
idstringYes必填,用户ID,填写数字字符串,不是用户名。 Required numeric user ID as a string, not a username.—
end_timestringNo仅通过用户ID查询时可用。截止时间,不包含该时刻。使用带时区的RFC3339格式;与until_id二选一。 Available with user ID lookup only. Exclusive end time in RFC3339 format with a timezone. Do not combine with until_id.—
since_idstringNo仅通过用户ID查询时可用。仅查询晚于该推文ID的帖子;与start_time二选一。 Available with user ID lookup only. Return posts newer than this post ID; do not combine with start_time.—
until_idstringNo仅通过用户ID查询时可用。仅查询早于该推文ID的帖子;与end_time二选一。 Available with user ID lookup only. Return posts older than this post ID; do not combine with end_time.—
expansionsstringNo仅通过用户ID查询时可用。需要额外展开的关联对象,多个值用逗号分隔。可选值:article.cover_media, article.media_entities, attachments.media_keys, attachments.media_source_tweet, attachments.poll_ids, author_id, edit_history_tweet_ids, entities.mentions.username, geo.place_id, in_reply_to_user_id, entities.note.mentions.username, referenced_tweets.id, referenced_tweets.id.attachments.media_keys, referenced_tweets.id.author_id。 Available with user ID lookup only. Comma-separated related objects to expand. Allowed values: article.cover_media, article.media_entities, attachments.media_keys, attachments.media_source_tweet, attachments.poll_ids, author_id, edit_history_tweet_ids, entities.mentions.username, geo.place_id, in_reply_to_user_id, entities.note.mentions.username, referenced_tweets.id, referenced_tweets.id.attachments.media_keys, referenced_tweets.id.author_id.—
start_timestringNo仅通过用户ID查询时可用。起始时间,包含该时刻。使用带时区的RFC3339格式;与since_id二选一。 Available with user ID lookup only. Inclusive start time in RFC3339 format with a timezone. Do not combine with since_id.—
max_resultsintegerNo可选,5–100,指定本次最多返回的记录数量。不填时按接口默认行为返回,实际结果可能较少。 Optional, from 5 to 100. Maximum records to return. Omit to use the endpoint default behavior; actual results may be fewer.—
poll.fieldsstringNo仅通过用户ID查询时可用。需要返回的字段,多个字段名用逗号分隔。可选值:duration_minutes, end_datetime, id, options, voting_status。 Available with user ID lookup only. Comma-separated fields to include in the response. Allowed values: duration_minutes, end_datetime, id, options, voting_status.—
user.fieldsstringNo仅通过用户ID查询时可用。需要返回的字段,多个字段名用逗号分隔。可选值:affiliation, created_at, description, entities, id, is_identity_verified, location, most_recent_tweet_id, name, parody, pinned_tweet_id, profile_banner_url, profile_image_url, protected, public_metrics, url, username, verified, verified_followers_count, verified_type, withheld。 Available with user ID lookup only. Comma-separated fields to include in the response. Allowed values: affiliation, created_at, description, entities, id, is_identity_verified, location, most_recent_tweet_id, name, parody, pinned_tweet_id, profile_banner_url, profile_image_url, protected, public_metrics, url, username, verified, verified_followers_count, verified_type, withheld.—
media.fieldsstringNo仅通过用户ID查询时可用。需要返回的字段,多个字段名用逗号分隔。可选值:alt_text, duration_ms, height, media_key, preview_image_url, public_metrics, type, url, variants, width。 Available with user ID lookup only. Comma-separated fields to include in the response. Allowed values: alt_text, duration_ms, height, media_key, preview_image_url, public_metrics, type, url, variants, width.—
place.fieldsstringNo仅通过用户ID查询时可用。需要返回的字段,多个字段名用逗号分隔。可选值:contained_within, country, country_code, full_name, geo, id, name, place_type。 Available with user ID lookup only. Comma-separated fields to include in the response. Allowed values: contained_within, country, country_code, full_name, geo, id, name, place_type.—
tweet.fieldsstringNo仅通过用户ID查询时可用。需要返回的字段,多个字段名用逗号分隔。可选值:article, attachments, author_id, card_uri, community_id, context_annotations, conversation_id, created_at, display_text_range, edit_controls, edit_history_tweet_ids, entities, geo, id, in_reply_to_user_id, lang, matched_media_notes, media_metadata, note_tweet, possibly_sensitive, public_metrics, referenced_tweets, reply_settings, scopes, source, suggested_source_links, suggested_source_links_with_counts, text, withheld。 Available with user ID lookup only. Comma-separated fields to include in the response. Allowed values: article, attachments, author_id, card_uri, community_id, context_annotations, conversation_id, created_at, display_text_range, edit_controls, edit_history_tweet_ids, entities, geo, id, in_reply_to_user_id, lang, matched_media_notes, media_metadata, note_tweet, possibly_sensitive, public_metrics, referenced_tweets, reply_settings, scopes, source, suggested_source_links, suggested_source_links_with_counts, text, withheld.—
pagination_tokenstringNo上一页返回的分页标记。首次查询不填;不能自行编造。 Pagination token returned by the previous page. Omit for the first page; do not invent a token.—

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_getusersmentions' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "id": "2244994945"
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "data": [
    {
      "edit_history_tweet_ids": [
        "2108112467276829123"
      ],
      "id": "2108112467276829123",
      "text": "@XDevelopers These guys are amazing! Keep up the awesome work with @bot 🔥🤘🏼🔥"
    }
  ],
  "meta": {
    "newest_id": "2108112467276829123",
    "next_token": "7140dibdnow9c7btwp0fs6t9ia6y1cxewu8cfh8w6fol4",
    "oldest_id": "2107986634646155308",
    "result_count": 10
  }
}

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