Toutiao APIs - User Profile (V1)
prod-global
GET
/api/toutiao/get-user-detail/v1
Retrieve detailed information for a specific Toutiao (Jinri Toutiao) user by their user ID.
The API returns comprehensive profile metadata including user ID, nickname, avatar, bio/description, verification status, follower and following counts, total likes, and total published articles or videos.
Typical use cases:
- Influencer profiling and audience analysis.
- Monitoring creator performance and growth.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
token | query | string | Yes | Authentication token required to access the API. |
userId | query | string | Yes | The unique identifier of the Toutiao user. |
Code Samples
💡 Environment Note
Default samples use https://api.justoneapi.com (prod-global). For users in Mainland China, it is recommended to replace it with http://47.117.133.51:30015 (prod-cn) for better performance. See Environment Guide.
bash
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/toutiao/get-user-detail/v1?token=YOUR_API_KEY&userId=VALUE"text
I want to use the "User Profile (V1)" API from Just One API.
API Endpoint: https://api.justoneapi.com/api/toutiao/get-user-detail/v1
HTTP Method: GET
Authentication: Append "?token=YOUR_API_KEY" to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/toutiao-apis/user-profile-v1-en.json
Parameters:
- token (query): Authentication token required to access the API. (Required)
- userId (query): The unique identifier of the Toutiao user. (Required)
Return format: JSON
Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set request timeout to at least 60 seconds.
3. Business Code Reference:
- 0: Success
- 100: Invalid or Inactive Token
- 301: Collection Failed. Please Retry.
- 302: Rate Limit Exceeded
- 303: Daily Quota Exceeded
- 400: Invalid Parameters
- 500: Internal Server Error
- 600: Permission Denied
- 601: Insufficient Balance
Please help me write a script in my preferred programming language to call this API and handle the response.python
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import requests
url = "https://api.justoneapi.com/api/toutiao/get-user-detail/v1?token=YOUR_API_KEY&userId=VALUE"
response = requests.get(url)
print(response.json())js
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/toutiao/get-user-detail/v1?token=YOUR_API_KEY&userId=VALUE", {
method: "GET"
});
const data = await response.json();
console.log(data);java
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.justoneapi.com/api/toutiao/get-user-detail/v1?token=YOUR_API_KEY&userId=VALUE"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}go
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
url := "https://api.justoneapi.com/api/toutiao/get-user-detail/v1?token=YOUR_API_KEY&userId=VALUE"
req, _ := http.NewRequest("GET", url, nil)
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}php
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/toutiao/get-user-detail/v1?token=YOUR_API_KEY&userId=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;Responses
json
{
"code": 0,
"data": {
"message": "success",
"errno": 0,
"data": {
"avatar_url": "",
"big_avatar_url": "",
"description": "",
"gender": 0,
"bg_image": {
"status": 0,
"url": "https://p3-sign.toutiaoimg.com/tos-cn-i-tt/d74fb91f2825491584acf1afb99c8a2d~tplv-noop.webp?_iz=30575&from=sign_default&lk3s=133d4839&x-expires=1773670307&x-signature=fW3pKCduTzos8Oc4DCeNTQZiLeI%3D"
},
"top_tab": [
{
"disable_common_params": false,
"is_default": false,
"is_native": true,
"load_count": 20,
"show_name": "小视频",
"total_count": 0,
"type": "external_ies_video",
"url": "/api/feed/profile/v1/?category=external_short_video",
"pseries_card_count": 0,
"pseries_card_info": ""
}
],
"external_info": {
"button_name": "打开抖音关注作者",
"name": "抖音",
"app_name": "aweme",
"package_name": "com.ss.android.ugc.aweme",
"app_schema": "snssdk1128://user/profile/1352838578180211",
"download_url": "https://d.douyin.com/eXBJ/",
"icon_url": "https://p26.toutiaoimg.com/obj/motor-img/9fd81928b2576d559b363fcf77681f5c",
"icon_title": "来源于抖音",
"app_icon_url": "https://p26.toutiaoimg.com/obj/ies.fe.effect/a752e3bd176b10ea340c65db16e7c91c",
"appstore_app_id": 1142110895
},
"name": "",
"user_id": 1352838578180211,
"publish_count": 0,
"digg_count": 0,
"followers_count": 0,
"followings_count": 0,
"external_media_type": 0,
"is_gov_media": false
}
}
}💡 Note: For list data, the example shows only 1-2 items for simplicity. The actual count depends on the API response.
