List media attached to an X post
xcrap_list_mediaList every downloadable photo, video, or GIF attached to a post. Returns metadata (type, dimensions, duration, alt text) and direct download URLs for each variant.
Instructions
List every downloadable file attached to a post — photos, videos and GIFs — with type, dimensions, duration, alt text, every available quality variant, and a direct download URL for each.
Use this when the user wants the image or the video from a post rather than its text: "download the video from this tweet", "what images are in this post", "get me the alt text". The download URLs it returns stream the original file straight from X and can be handed to the user or fetched directly.
When to use this instead of the alternatives:
Use xcrap_get_tweet if you want the post's text and only need to know whether media exists.
Use this when you need the actual file URLs, resolutions or alt text.
Args:
url (string, required): post URL or numeric id.
Returns JSON (media metadata is field-level data, so this tool does not offer a markdown mode): { tweet_id, tweet_url, author, count, media: [ { id, type: "photo"|"video"|"gif", url, thumbnail_url, width, height, duration, format, alt_text, variants[ {url, container, bitrate} ], index, download_url } ] }
A post with no attachments returns count: 0 and an empty media array — that is a successful answer, not an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Post URL or bare numeric id whose attachments to list. |