TikTok API

TikTok API Documentation

Simple API for TikTok profile data, video data, and latest posts.

Every TikTok endpoint requires an API key. Bulk comma-separated requests are disabled.

Base URL: https://api.rentalaibot.com
API key format: add ?api=YOUR_API_KEY in the request URL.

Get Profile Data

GET /tiktok/profile

Get TikTok username, profile URL, follower count, and private account status.

Example URL

https://api.rentalaibot.com/tiktok/profile?api=YOUR_API_KEY&url=paksocialsmm

Response

{
  "username": "paksocialsmm",
  "profile_url": "https://www.tiktok.com/@paksocialsmm",
  "followers": 12345,
  "private": false,
  "source": "html",
  "used_cookies": true
}

Get Video Data

GET /tiktok/video

Get TikTok video ID, title, URL, views, likes, comments, and shares.

Example URL

https://api.rentalaibot.com/tiktok/video?api=YOUR_API_KEY&url=https://www.tiktok.com/@user/video/VIDEO_ID

Response

{
  "video_id": "123456789",
  "title": "Video title",
  "url": "https://www.tiktok.com/@user/video/123456789",
  "views": 1000,
  "likes": 100,
  "comments": 10,
  "share": 5,
  "used_cookies": true
}

Get Latest Posts

GET /tiktok/getpost

Get latest TikTok post links from a username or profile URL.

Example URL

https://api.rentalaibot.com/tiktok/getpost?api=YOUR_API_KEY&url=paksocialsmm&limit=10

Response

{
  "username": "paksocialsmm",
  "profile_url": "https://www.tiktok.com/@paksocialsmm",
  "posts": [
    "https://www.tiktok.com/@paksocialsmm/video/123"
  ],
  "count": 1,
  "source": "yt-dlp-flat-playlist"
}

Limits

Each API key can have a monthly limit and hourly limit.

api_keys.json Example

{
  "keys": {
    "pk_test_123456": {
      "name": "Test User",
      "monthly_limit": 1000,
      "hourly_limit": 100,
      "used": 0,
      "hour_used": 0,
      "month": "2026-05",
      "hour": "2026-05-10-19",
      "active": true
    }
  }
}

Errors

Invalid API Key

{
  "detail": "Invalid API key"
}

Hourly Limit Reached

{
  "detail": {
    "error": "Hourly request limit reached",
    "hour_used": 100,
    "hourly_limit": 100,
    "hour": "2026-05-10-19"
  }
}

Monthly Limit Reached

{
  "detail": {
    "error": "Monthly request limit reached",
    "used": 1000,
    "monthly_limit": 1000,
    "month": "2026-05"
  }
}

Bulk Disabled

{
  "detail": "Bulk profile data is disabled. Send only one value."
}