API Documentation

Danscot APIs are designed to be simple, predictable, and easy to integrate. All APIs follow the same request structure and response format.

How it works

Each API is accessed via a standard GET request. You provide the required parameters, and the API responds with a JSON object containing the result or an error message.

Base URL

https://api.danscot.com

Request format

GET /api-name/endpoint?param1=value¶m2=value
    

Replace api-name and parameters depending on the service you want to use.

Example: YouTube Downloader API

Below is a basic example showing how to download a YouTube video as MP3.

Python (GET request)

import requests

url = "https://api.danscot.com/youtube/download"
params = {
    "query": "lofi hip hop",
    "format": "mp3"
}

response = requests.get(url, params=params)
data = response.json()

print(data)
    

JavaScript (GET request)

const url = new URL("https://api.danscot.com/youtube/download");
url.search = new URLSearchParams({
  query: "lofi hip hop",
  format: "mp3"
});

fetch(url)
  .then(res => res.json())
  .then(data => {
    console.log(data);
  });
    

Example response

{
  "status": "success",
  "title": "Lofi Hip Hop Mix",
  "download_url": "https://..."
}
    

Notes