Welcome to the Xyra - Drama API
Code Example for Noobs 🚀
Welcome to the land of POST and GET! We support both—because why not? 😎
Wanna send data? Use POST. Wanna just peek? Use GET. Simple, right?
Below is an example of how to use POST in case you're like, "What's that?" (Spoiler: It's not a parcel service.)
POST Example: You’re sending data like: { "username": "coolcoder", "password": "superSecret123" } ...and the server’s like, "Got it! Here’s your response." 📨 GET Example: You’re just browsing—like asking, "Hey server, what’s up?" 🤔 Server: "Not much, here’s the data you wanted." 📜
Remember: POST is for when you want to do something (like sign up for free pizza 🍕). GET is for when you’re just snooping around, politely, of course.
import requests import json url = "https://api.xyrastream.live/v1/dramacool/search" payload = {"api_key": "your_api_key", "query": "Your Drama Title"} headers = {"Content-Type": "application/json"} response = requests.post(url, data=json.dumps(payload), headers=headers) print(response.json())
curl -X POST https://api.dramacool.com/search -H "Content-Type: application/json" -d '{"api_key": "your_api_key", "query": "Your Drama Title"}'
fetch("https://api.xyrastream.live/v1/dramacool/search", { method: "POST", // Specify the HTTP method headers: { "Content-Type": "application/json", // Define the content type }, body: JSON.stringify({ api_key: "key1", // Replace with your actual API key query: "Your Drama Title", }), }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error(error));
GET/home
Retrieve the home page using the POST/GET method.
This will return results for the Drama home page.
GET/search
Search for dramas using the POST/GET method.
This requires three parameters: api_key
, query
, and page
(optional, default is 1).
This will return results based on the search query.
GET/latest
Retrieve the latest dramas using the POST/GET method.
This requires two parameters: api_key
and page
(optional, default is 1).
This will return the latest drama episodes or movies.
GET/latest_kdrama
Retrieve the latest K-dramas using the POST/GET method.
This requires two parameters: api_key
and page
(optional, default is 1).
This will return the latest K-drama episodes or movies.
GET/popular
Retrieve popular dramas using the POST/GET method.
This requires two parameters: api_key
and page
(optional, default is 1).
This will return popular dramas.
GET/ongoing
Retrieve ongoing dramas using the POST/GET method.
This requires two parameters: api_key
and page
(optional, default is 1).
This will return ongoing dramas.
GET/upcoming
Retrieve upcoming dramas using the POST/GET method.
This requires two parameters: api_key
and page
(optional, default is 1).
This will return upcoming dramas.
GET/discover
Discover dramas using the POST/GET method.
This requires two parameters: api_key
and page
(optional, default is 1).
Additionally, use filter parameters such as type
, country
, genre
, and release_year
.
(Pro tip: use the /discover-info route to find available options for type, country, genre, and release year.)
This will return results based on the applied filters.
GET/info
Retrieve detailed drama information using the POST/GET method.
This requires two parameters: api_key
and id
.
This will return detailed information about a specific drama.
GET/stream
Retrieve streaming information using the POST/GET method.
This requires two parameters: api_key
and episode_id
.
This will return the streaming link, subtitles, and embedded link for a specific episode.
PS: Always keep your API key secure. Sharing it with others may result in unexpected drama. 🌟