High-Speed OK.ru Stream Extraction
Stand-alone API platform that decodes video stream URLs from ok.ru embed pages. Designed for fileshare uploaders, media hubs, and developers looking for high-performance direct streaming options.
Developer Documentation
All endpoints accept and return JSON payload. The API enforces strict daily request rate limiting using a token bucket counter backed by Cloudflare D1.
1. Extract Video Streams
Decodes ok.ru embed page HTML and extracts raw video stream file links.
| Method | Path | Authentication |
|---|---|---|
| POST | /api/extract |
Header: X-API-Key: YOUR_API_KEY |
Request Body
{
"url": "https://ok.ru/video/7553942366898"
}
Response (200 OK)
[
{
"quality": "1080p",
"label": "OK.ru",
"url": "https://vod-cdn.ok.ru/expires/.../7553942366898_1080p.mp4"
},
{
"quality": "720p",
"label": "OK.ru",
"url": "https://vod-cdn.ok.ru/expires/.../7553942366898_720p.mp4"
}
]
Response (429 Rate Limited)
{
"error": "Daily limit reached",
"limit": 1000,
"used": 1000,
"reset_at": "2026-07-01T00:00:00.000Z"
}
Code Example
You can execute queries via terminal curl command:
curl -X POST https://YOUR-API-HOST.pages.dev/api/extract \
-H "Content-Type: application/json" \
-H "X-API-Key: okru_your_api_key_here" \
-d '{"url": "https://ok.ru/video/7553942366898"}'