APP Opener API Documentation

Introduction

Welcome to the YouTube URL Shortener API documentation. This API enables you to shorten YouTube URLs and obtain responses in either JSON or plain text formats. Below, you will find detailed instructions, examples, and usage guidelines.

Base URL: https://appopener.recut.in/v1/api

Endpoints

GET https://appopener.recut.in/v1/api?url={youtube_url}

The request supports the following parameters:

Parameters
Parameter Type Description
url String The YouTube URL you want to shorten.
json (optional) Integer (1) Set to 1 to receive a JSON response (default).
plain (optional) Integer (1) Set to 1 to receive a plain text response.
Example Request URLs:
JSON Response: https://appopener.recut.in/v1/api?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ&json=1
Plain Text Response: https://appopener.recut.in/v1/api?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ&plain=1
Example Responses
Success Response (JSON)
{ "error": 0,
"id": "3",
"shorturl": "https://rcut.in/smartlink"
}
Success Response (Plain Text)
ID: rcLkap Short URL: https://rcut.in/smartlink
Error Response (JSON)
{ "error": 1,
"message": "An error occurred"
}
Code Examples
fetch('https://appopener.recut.in/v1/api?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ&json=1')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X GET \
'https://appopener.recut.in/v1/api?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ&json=1' \
-H 'Accept: application/json'
Test the API