API Documentation

Complete guide to integrating with SoketHub API. Get started with our TikTok data endpoints.

Quick Start

Get up and running with SoketHub API in minutes

1

Get Your API Key

Sign up and generate your API key from the dashboard

2

Make Your First Request

Include your API key in the request headers

3

Start Building

Integrate TikTok data into your applications

Authentication

All API requests require authentication using your API key

Include your API key in the request headers:

X-API-Key: your_api_key_here

Keep your API key secure

Never expose your API key in client-side code or public repositories.

Base URL

All API requests should be made to:

https://api.sokethub.com/api/v1

API Endpoints

GET/tiktok/user/{username}
Auth Required

Retrieve detailed information about a TikTok user

Parameters

username(string)*- TikTok username (without @)

Example Request

curl -X GET "https://api.sokethub.com/api/v1/tiktok/user/username" \
  -H "X-API-Key: your_api_key_here"

Response

{
                "data": {
                  "room_id": "7513832535370681093",
                  "title": "Sample Live Stream Title",
                  "viewer_count": 543,
                  "like_count": 1250,
                  "owner": {
                    "id": "7099295493754962970",
                    "nickname": "Sample Streamer Name",
                    "avatar": "https://example.com/avatar.webp"
                  },
                  "live_stream_url": "https://example.com/stream.flv"
                },
                "source": "sokethub_api",
                "timestamp": 1749451667
              }
GET/tiktok/room/{roomId}
Auth Required

Get live room information and statistics

Parameters

roomId(string)*- TikTok live room ID

Example Request

curl -X GET "https://api.sokethub.com/api/v1/tiktok/room/123456789" \
  -H "X-API-Key: your_api_key_here"

Response

{
  "data": {
    "room_id": "123456789",
    "title": "Sample Live Stream Title",
    "viewer_count": 543,
    "like_count": 1250,
    "owner": {
      "id": "7099295493754962970",
      "nickname": "Sample Streamer Name",
      "avatar": "https://example.com/avatar.webp"
    },
    "live_stream_url": "https://example.com/stream.flv"
  },
  "source": "sokethub_api",
  "timestamp": 1749451667
}

Rate Limits

API usage limits based on your subscription plan

Free Plan

1,000

requests/day

Pro Plan

5,000

requests/day

Enterprise

25,000+

requests/day

Rate limit headers: Each response includes X-RateLimit-Remaining and X-RateLimit-Reset headers.

Error Codes

Standard HTTP status codes and error responses

400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Something went wrong

Need Help?

Get support and connect with our community