├── README.md └── workers.js /README.md: -------------------------------------------------------------------------------- 1 | # voot-api 2 | 3 | ## Get Voot URL From Here 👉 https://www.voot.com/ 👈

4 | 5 | ### for movies

6 | 7 | *Request:* 8 | 9 | ```bash 10 | https://vootapi.tk/?q=https://www.voot.com/movies/k-g-f-chapter-1-hindi/965391 11 | ``` 12 | 13 | *Response:* 14 | 15 | ```json 16 | { 17 | "title": "K.G.F: Chapter 1 (Hindi)", 18 | "description": "Rocky, a young man, with an ambition to die as the wealthiest and powerful man embarks on his mission from the streets of Mumbai to lands up in the fields of KGF, where he gets involved with the notorious mine mafia. Will Rocky's journey filled with dangerous inroads lead him to ambitious goal?", 19 | "thumnail": "https://kimg.voot.com/kimg/b1ac61d0f09542a7bf7a7ab62197ca25_1280X720.jpg", 20 | "Video_URL": "https://cdnapisec.kaltura.com/p/1982551/sp/198255100/playManifest/protocol/https/entryId/0_avlcjzzt/format/applehttp/tags/tv/f/a.m3u8" 21 | } 22 | ``` 23 | 24 | ### for series

25 | 26 | *Request:* 27 | 28 | ```bash 29 | https://vootapi.tk/?q=https://www.voot.com/shows/bigg-boss/14/978245/papa-ki-pari-hui-emotional/1072176 30 | ``` 31 | 32 | *Response:* 33 | 34 | ```json 35 | { 36 | "title": "Bigg Boss S14 - Season 14 - Episode 72", 37 | "description": "Day 98: Rashami Desai enters the house to support her friend Vikas Gupta and rebukes Jasmin Bhasin and Aly Goni for bullying Vikas and attacking him personally. Later in the day, Jasmin is elated on seeing her parents enter the house. However, their reunion turns into Aly Goni's worst nightmare as they advise her to concentrate on her game and play solo. With the growing closeness between the two, have Jasmin's parents indirectly rejected Aly? Watch this episode for more, on Voot.", 38 | "thumnail": "https://kimg.voot.com/kimg/dc9670a27df64ed1ad1e125199b87a63_1280X720.jpg", 39 | "Video_URL": "https://cdnapisec.kaltura.com/p/1982551/sp/198255100/playManifest/protocol/https/entryId/1_ivss21bx/format/applehttp/tags/webnew/f/a.m3u8" 40 | } 41 | ``` 42 | -------------------------------------------------------------------------------- /workers.js: -------------------------------------------------------------------------------- 1 | addEventListener('fetch', event => { 2 | event.respondWith(handleRequest(event.request)) 3 | }) 4 | 5 | async function handleRequest(request) { 6 | 7 | let req_query = new URL(request.url).searchParams.get('q') 8 | 9 | 10 | if (req_query == null) { 11 | 12 | const reply = { 13 | "status": "failed", 14 | "message": "Send with an url query" 15 | }; 16 | 17 | return new Response(JSON.stringify(reply), { 18 | headers: { 19 | "content-type": "application/json", 20 | }, 21 | }) 22 | 23 | } else { 24 | var id = req_query.split("/").pop() 25 | } 26 | 27 | var result = await fetch(`https://wapi.voot.com/ws/ott/getMediaInfo.json?platform=Web&pId=2&mediaId=${id}`, { 28 | headers: { 29 | 'Content-Type': 'application/json' 30 | } 31 | }) 32 | var result = await result.json() 33 | 34 | const error_msg = { 35 | "status": "failed", 36 | "message": "Invalid URL" 37 | } 38 | 39 | if (!result) { 40 | return new Response(JSON.stringify(error_msg), { 41 | status: 400, 42 | headers: ({ 43 | "Content-Type": "application/json", 44 | }) 45 | }) 46 | } else { 47 | var pass = ({ 48 | title: result.assets.MediaName, 49 | description: result.assets.Metas[1].Value, 50 | thumnail: result.assets.Pictures[0].URL.replace("https://viacom18-res.cloudinary.com/image/upload/f_auto,q_auto:eco,fl_lossy/kimg", "https://kimg.voot.com"), 51 | video: result.assets.Files[3].URL 52 | }) 53 | res_data = { 54 | "title": pass.title, 55 | "description": pass.description, 56 | "thumnail": pass.thumnail, 57 | "Video_URL": pass.video 58 | } 59 | return new Response(await JSON.stringify(res_data), { 60 | status: 200, 61 | headers: ({ 62 | "Content-Type": "application/json", 63 | }) 64 | }) 65 | } 66 | } 67 | --------------------------------------------------------------------------------