JUHE API Marketplace
Comprehensive Documentation

API Documentation

Everything you need to integrate and use our APIs effectively with guides, references, and examples

Tiktok Data API

3 min read

How to Build a Simple TikTok Profile Analyzer

This guide will walk you through the simple process of using a TikTok API to build a tool that fetches user profiles, analyzes video performance, and downloads content. You do not need complex setups to start pulling valuable data. We will show you how to make your first API calls and combine them into a useful application in just a few minutes.

Step One: Fetching a User's Public Profile

The first task is to retrieve the core statistics for any TikTok user. This allows you to get a real time snapshot of their public presence on the platform.

The Endpoint: We will use the GET /tiktok/v1/user_info_by_id endpoint for this.

The Process: You simply need to make an HTTP GET request to the endpoint, passing the userId of the user you want to query as a parameter. For this example, let's query the official TikTok account.

A simple curl request would look like this:

curl -X GET "https://hub.juheapi.com/tiktok/v1/user_info_by_id?userId=123&apikey=YOUR_API_KEY"

The API will return a clean JSON object with the user's information:

{
  "code": "0",
  "msg": "success",
  "data": {
    "uid": "107955",
    "unique_id": "tiktok",
    "nickname": "TikTok",
    "signature": "WANNA MAKE A TIKTOK!?",
    "follower_count": 81438576,
    "following_count": 2,
    "total_favorited": 325979360,
    "avatar_thumb": {
      "url_list": ["..."]
    }
  }
}

With this single call, you have successfully retrieved key metrics like their nickname, follower count, and total favorited count, ready to be used in your application.

Step Two: Retrieving Detailed Video Metrics

Next, let's dive deeper and get the performance statistics for a specific video. This is essential for tracking campaign performance or analyzing content strategy.

The Endpoint: We will use the GET /tiktok/v1/post_detail_by_id endpoint.

The Process: Similar to the first step, you make a GET request, but this time you will pass a videoId as a parameter.

The request looks like this:

curl -X GET "https://hub.juheapi.com/tiktok/v1/post_detail_by_id?videoId=123&apikey=YOUR_API_KEY"

The API will return detailed information about the video post, including its performance stats:

{
  "code": "0",
  "msg": "success",
  "data": {
    "itemStruct": {
      "id": "7306132438047116586",
      "desc": "Hi! Well, so, basically I have a birthday coming up...",
      "author": { "..."},
      "createTime": "1701091554",
      "stats": {
        "playCount": 44400000,
        "diggCount": 5300000,
        "commentCount": 68700,
        "shareCount": 91200
      },
      "video": { "..." }
    }
  }
}

The nested stats object gives you precise, real time counts for plays, likes (diggCount), comments, and shares.

Step Three: Downloading Video Content for Archiving

Finally, let's get direct download links for a TikTok video. This is perfect for building content archiving tools or services that repurpose video for other platforms.

The Endpoint: For this, we use the GET /tiktok/v1/download_video endpoint.

The Process: This endpoint takes the full public URL of the TikTok video as its main parameter.

Your request will be structured as follows:

curl -X GET "https://hub.juheapi.com/tiktok/v1/download_video?url=https://example.com&apikey=YOUR_API_KEY"

The response provides direct links to the video files:

{
  "code": "0",
  "msg": "success",
  "data": {
    "play": "https://.../video_without_watermark.mp4",
    "play_watermark": "https://.../video_with_watermark.mp4"
  }
}

Your application can now use the play URL to download the clean, watermark free version of the video, or the play_watermark URL for the version with the TikTok overlay.

Your Foundation for Powerful Tools

In just three simple steps, you have learned how to access user, post, and media data directly from TikTok. This is the foundation for building much more complex and powerful applications, from marketing analytics dashboards and trend trackers to content management systems.

Ready to start building? Dive into our API documentation and bring your next project to life.