Runnable integration examples for xvideodownloader.pro, a service that resolves public X (Twitter) post URLs into available MP4 variants and temporary download links.
One backend serves three surfaces:
| Surface | Entry point | Auth |
|---|---|---|
| Website | https://xvideodownloader.pro/ | None (free within shared limits) |
| HTTP API | POST https://xvideodownloader.pro/api/v1/resolve |
Authorization: Bearer YOUR_API_KEY |
| Remote MCP | https://xvideodownloader.pro/mcp (Streamable HTTP) | MCP OAuth 2.1 consent, or Bearer key |
curl https://xvideodownloader.pro/api/v1/resolve \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{"url":"https://x.com/USERNAME/status/POST_ID"}'A successful response returns code: 0 and data.videos[].variants[], where each variant carries source metadata (width, height, bitrate, has_audio, size_bytes) plus an opaque download_url and ticket_expires_at. Download links expire 15 minutes after resolution — fetch them with a plain GET, which streams video/mp4 with Content-Disposition: attachment.
| File | What it shows |
|---|---|
examples/curl.sh |
Resolve a post and save the highest-bitrate MP4 with curl only |
examples/python.py |
Python client: resolve, pick a variant, stream the download to disk |
examples/node.mjs |
Node.js 18+ client using built-in fetch |
examples/mcp-client.json |
MCP client configuration for the remote resolve_x_video tool |
- Sign in at https://xvideodownloader.pro/ and open API keys.
- Create a key and copy it immediately — the full key is shown once and cannot be retrieved later.
- MCP clients that support OAuth 2.1 are issued a key automatically after browser consent; the resulting token appears on the same page and can be revoked there.
Keys are free with an account. There is no CLI, paid plan, or billing in the current release.
| Scope | Limit |
|---|---|
| Per user | 60 resolutions / 10 minutes (shared across that user's keys) |
| Shared service | 2,000 resolutions / UTC day, 10 GB reserved transfer / UTC day |
| File size | 250 MB maximum |
| Rate limiting | HTTP 429 with Retry-After when available |
Only public, native X video/animated-GIF media with MP4 sources is supported — no private posts, livestreams, external embeds, batch downloads, or transcoding.
- Developer hub: https://xvideodownloader.pro/developers
- HTTP API reference: https://xvideodownloader.pro/docs/api
- MCP integration guide: https://xvideodownloader.pro/docs/mcp
- Scope, failures, and current limits: https://xvideodownloader.pro/faq
The example code in this repository is released under the MIT License. It is not the source code of the xvideodownloader.pro service itself.
Use of this API is subject to the xvideodownloader.pro terms of service. Respect X's Terms of Service and Developer Policy, and only access content you have the right to access.