Shoti API Documentation

A detailed guide on using Shoti API, covering getting videos, images, best practices, and integration tips for your projects.

Table of Contents

  1. 1. Installation
  2. 2. Getting Shoti
  3. 2.1. Video
  4. 2.2. Images
  5. 3. Adding Shoti
  6. 4. Rating Shoti
  7. 5. Getting Top Users

Installation

Installing Shoti API is pretty straightforward, just type these commands on your fuck*ing terminal to install Shoti API Wrapper:

npm install shoti

Initialize Shoti API instance:

import Shoti from 'shoti';

/* Initialize with API key */
const shoti = new Shoti("YOUR-APIKEY"); //$shoti-xxxx

You can get your apikey here.

Getting Shoti

Getting videos on Shoti API is pretty basic 😎, just copy this codes:

const data = await shoti.getShoti({ type: "video" });
        
/* or dont specify config, by default shoti api returns videos */
const data = await shoti.getShoti();

/* Print the result */
console.log("Shoti Result:", data);

For getting Shoti API images:

const data = await shoti.getShoti({ type: 'image' });

/* Print the result */
console.log("Shoti Images Result:", data);

Shoti API response output:

{
  "code": number,
  "result": {
    "content": string | Array[string,...], //If the type is video, this will be string, else it will be array of string's.
    "duration": string,
    "region": string, //ISO 3166-1
    "title": string,
    "type": "video" | "image",
    "shoti_score": number,
    "shoti_id": string,
    "user": {
      "signature": string,
      "instagram": string,
      "twitter": string,
      "nickname": string,
      "username": string
    }
  }
}

Adding Shoti

NOTE: Adding data to Shoti API database isn't available to everyone, you should request to the API administrators to promote your apikey into admin type.

const sumakses = await shoti.newShoti({ 
  url: "https://vt.tiktok.com/XxXxxxX"
});

console.log(sumakses);

Rating Shoti

This function let the user rate the quality of Shoti API output.

const rate = await shoti.rateShoti({ 
  shoti_id: "xxxxxx-xxx-xxxx",
  isNotMaasim: true /* true or false */
});

console.log(rate);

If you rate this as 'not maasim' the score of the shoti will be increased by one, please don't abuse this feature because you can rate it multiple times.


Honestly rating the Shoti will help our API to produce more quality Shoti videos and images.

Getting Top Users

This function lets you get the top 10 Shoti API users.

const topUsers = await shoti.getTop();

console.log(topUsers);