# xmedia X/Twitter Media Downloader

> xmedia X/Twitter Media Downloader is a paid API for AI agents from xmedia.use.x402atlas.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-16, last successful call 2026-08-27).

Extracts direct CDN video (.mp4) and image URLs from a public X (Twitter) post URL

## Facts

- Endpoint: GET https://xmedia.use.x402atlas.com/tweet?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Last successful call: 2026-08-27
- Success rate: 50% of calls made through Zero
- Rating: 2.8 / 5 from 2 reviews
- Activations on Zero: 8
- Tags: x402
- Canonical page: https://www.zero.xyz/c/xmedia-x-twitter-media-downloader-c84ace1f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_J1LyVwDeoMgUlqKSJC8co

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability xmedia-x-twitter-media-downloader-c84ace1f
```

Example prompt: Can you get me the direct downloadable video and image links from this tweet: https://x.com/NASA/status/1234567890?

## When to prefer this

Use this endpoint when you need direct CDN media URLs from a public X/Twitter post without running a browser or scraping HTML. Ideal for agents that need to re-host, embed, or download tweet videos and images programmatically. Prefer over generic scrapers when you specifically need .mp4 video links with thumbnails from X posts.

## Known failure modes

- Tweet URL is private or requires login — returns error or empty media list
- Tweet has no media (text-only post) — returns empty media arrays
- Invalid or malformed tweet URL — returns validation error
- Tweet has been deleted — returns not found error
- Rate limiting or payment failure — returns 402 or 429 error

## How this service works

**Twitter (X) Video & Image Downloader — Tweet Media to Direct CDN URLs** on x402 Atlas — pay-per-call over the [x402 protocol](https://x402.org).

Paid routes are billed per call in USDC on Base, starting at $0.005; each operation states its exact price below. Request a route with no payment to receive the `402` challenge, then repeat it with an `X-PAYMENT` header — an x402 client (`x402-fetch` / `x402-axios`) performs that exchange for you.

Full onboarding, quickstart, and the other APIs: https://use.x402atlas.com/docs

## Output

Returns direct CDN URLs for all media in the tweet: .mp4 video file URLs with associated thumbnail images, plus direct URLs for every image attached to the post — ready to stream, embed, re-host, or download without scraping or browser automation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "pattern": "^https?://(www\\.|mobile\\.)?(x\\.com|twitter\\.com)/.*/status/.*$",
       "description": "Full URL of a public tweet / X post on x.com or twitter.com; the path must contain /status/<id>, e.g. https://x.com/user/status/1234567890"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "queried_at",
      "post_url",
      "video_count",
      "image_count",
      "videos",
      "images"
     ],
     "properties": {
      "images": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "description": "Direct CDN image URLs; always present, never null"
      },
      "videos": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "url"
        ],
        "properties": {
         "url": {
          "type": "string",
          "description": "Direct CDN .mp4 URL"
         },
         "thumbnail": {
          "type": "string",
          "description": "Thumbnail image CDN URL"
         }
        }
       },
       "description": "Always present, never null; empty if the post has no video"
      },
      "post_url": {
       "type": "string",
       "description": "Echoed input tweet URL"
      },
      "queried_at": {
       "type": "string",
       "format": "date-time",
       "description": "UTC timestamp when the upstream was queried"
      },
      "image_count": {
       "type": "integer",
       "minimum": 0,
       "description": "Number of images found in the post"
      },
      "video_count": {
       "type": "integer",
       "minimum": 0,
       "description": "Number of videos found in the post"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "images": [
   "https://pbs.twimg.com/media/AbC123.jpg"
  ],
  "videos": [
   {
    "url": "https://video.twimg.com/amplify_video/1234567890/vid/avc1/1920x1080/abc.mp4?tag=28",
    "thumbnail": "https://pbs.twimg.com/amplify_video_thumb/1234567890/img/xyz.jpg"
   }
  ],
  "post_url": "https://x.com/user/status/1234567890",
  "queried_at": "2026-07-05T12:00:00Z",
  "image_count": 1,
  "video_count": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/xmedia-x-twitter-media-downloader-c84ace1f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from xmedia.use.x402atlas.com](https://www.zero.xyz/host/xmedia.use.x402atlas.com/llms.txt)
