X Get User Media
## Retrieve user media Retrieve a page of media associated with an X (Twitter) account. ### Inputs - `screen_name` (required string): The account's username, such as `elonmusk`, taken from its profile URL. - `rest_id` (optional integer): The numeric user ID, such as `44196397`. If supplied, it takes precedence over `screen_name` for selecting the account. The input schema still requires `screen_name`. - `cursor` (optional string): Omit for the initial request. To retrieve another page, pass the `next_cursor` returned by the previous response when available. ### Result Returns the account's media in the response data. Individual media fields are not specified by the documented response schema. If a `next_cursor` is returned, it can be used to request a subsequent page. This retrieves media information; it does not download media files. ### Example `{"screen_name":"elonmusk"}`
Pricing
| Condition | Charge |
|---|---|
| Each call | 2.07 credits/call |
Each call has a fixed fee of 2.07 credits. Charges are per query. A successful query is billed even if it returns no results.
Each request for a subsequent page using a cursor is a separate call and is charged separately.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
cursor | string | No | 翻页游标/Page Cursor | — |
rest_id | integer | No | 用户ID/User ID | — |
screen_name | string | Yes | 用户名/Screen Name | — |
Invocation example
Copy the request and explore its response example.
/agent-api/v1/tool/executeX-Api-Keycurl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_x_get_user_media' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"screen_name": "TeodoroObiang17"
}
}'{
"detail": {
"code": 400,
"message": "Request failed. Please retry. Check the docs below to verify your parameters, test with the default demo parameters, and send the response JSON to support. You won't be charged for this request.",
"message_zh": "请求失败,请重试。请查看下方文档核对参数,使用默认演示参数测试,并将响应 JSON 提交给支持团队。本次请求不会被扣费。",
"request_id": "6553145b-e490-408a-a064-32f8b6f2a80a"
}
}This example shows part of the response. Copied content is valid JSON.





