Inputs
FilterItem
SelectableOption
Output
Type:List[Dict]
Returns the list of media library items with full details.
Fields: dynamic (depend on the inputs)Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Lists the media in an X Ads account Media Library with their media_key values, so existing images and videos can be reused in posts and cards
| App | X Ads |
| Operation ID | x_ads_list_media |
| Type | Action |
| Connection | x_ads (required) |
| Credits per run | 1 |
| Agent / MCP tool | Yes |
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
account | DynamicAccount | Yes | - | Select the X Ads account whose Media Library should be listed. |
media_type | enum (IMAGE, VIDEO, GIF) | No | - | Only return media of this type: IMAGE, VIDEO, or GIF. |
q | string | No | - | Search the name, title, file name and description fields (case-insensitive term matching). |
filters | array of FilterItem | No | - | Additional filters applied to the returned media. The available fields to filter by are: - media_key: Filter by media key - name: Filter by name - file_name: Filter by file name - media_type: Filter by type (IMAGE, VIDEO, GIF) Filters are combined using AND logic. If you want to use OR logic, use relevant operators like REGEXP_MATCH or IN_LIST. |
limit | integer | No | 100 | Maximum number of media items to return. Default: 100. |
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
field | string or SelectableOption | Yes | - | The field to filter on, must be one of the current selected metrics or dimensions. |
operator | string | Yes | - | The operator to use for filtering. Must be one of the supported values. Use REGEXP_MATCH to search/filter by multiple OR values like ’.(summer|holiday).’ |
value | string | Yes | - | The value to filter by, always as a string: text, a number, or a regex. For IN_LIST and NOT_IN_LIST, pass the values as one comma-separated string such as ‘a,b,c’, not as an array. For regex values, escape backslashes once in the JSON string: write \b for a word boundary, not \b. |
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
value | string | Yes | - | |
label | string | Yes | - |
List[Dict]
Returns the list of media library items with full details.
Fields: dynamic (depend on the inputs)