Skip to content

Toutiao Article Details API (V1) ​

GET
API health status
Healthy Available Limited Mostly unavailable No data
Loading health status...

Retrieves details for a Toutiao article identified by its article ID. Use it to look up a known article for content review, archiving, or related media analysis.

Parameters ​

NameInTypeRequiredDefaultDescription
tokenquerystringYes-Authentication token required to access the API.
idquerystringYes-The unique identifier of the Toutiao article.

Code Samples ​

bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/toutiao/get-article-detail/v1?token=YOUR_API_KEY&id=VALUE'
text
I want to use the "Article Details (V1)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/toutiao/get-article-detail/v1?token=YOUR_API_KEY&id=VALUE
API Endpoint: BASE_URL + /api/toutiao/get-article-detail/v1?token=YOUR_API_KEY&id=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/toutiao/article-details-v1-en.json

Parameters:
- token (query): Authentication token required to access the API. (Required)
- id (query): The unique identifier of the Toutiao article. (Required)

Return format: safely handle JSON or text according to the actual Content-Type.

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 the request timeout to 120 seconds. If 120 seconds is too long for your use case, use at least 60 seconds, but a small number of requests may time out before receiving a result.
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
   - 602: Token Budget Exceeded
4. Code 601 means the shared account balance is insufficient. Code 602 means the current API token's own cumulative budget limit has been reached. Token budget limits do not transfer funds out of the shared account balance.

Please help me write a script in my preferred programming language to call this API and handle the response.
python
import requests

BASE_URL = "https://api.justoneapi.com"  # Provided by OpenAPI servers

url = BASE_URL + "/api/toutiao/get-article-detail/v1?token=YOUR_API_KEY&id=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
js
const BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
const url = BASE_URL + "/api/toutiao/get-article-detail/v1?token=YOUR_API_KEY&id=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
        final String url = BASE_URL + "/api/toutiao/get-article-detail/v1?token=YOUR_API_KEY&id=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
go
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // Provided by OpenAPI servers

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/toutiao/get-article-detail/v1?token=YOUR_API_KEY&id=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
php
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Provided by OpenAPI servers
$url = $BASE_URL . '/api/toutiao/get-article-detail/v1?token=YOUR_API_KEY&id=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}

Response Fields ​

Key fields in a successful response (code = 0).

Article and publication21 fields

data.data

Article body, publishing metadata, and media variants.

FieldTypeDescription
contentstringArticle body returned as HTML text.
group_idintegerNative numeric article group ID. Use h5_extra.str_group_id to preserve exact digits in JavaScript.
item_idintegerNative numeric article item ID. Use h5_extra.str_item_id to preserve exact digits in JavaScript.
media_user_idintegerPublisher user identifier returned as an integer.
video_countintegerNumber of videos reported for the article.
audio_idstringAudio identifier returned with the article as text.
h5_extraobjectPublic article, publisher, and engagement metadata.
h5_extra.titlestringTitle returned for the article.
h5_extra.namestringPublisher name displayed with the article.
h5_extra.sourcestringPublisher attribution displayed with the article.
h5_extra.src_linkstringSource link returned with the article, when available.
h5_extra.avatarstringPublisher avatar URL displayed with the article.
h5_extra.publish_stampstringPublication instant as a Unix timestamp in seconds, returned as text.
h5_extra.publish_timestringPublication time displayed as text, sometimes without a year. Checked values match UTC+8.
h5_extra.str_group_idstringArticle group identifier returned as text. Use this field to retain every digit when processing the ID.
h5_extra.str_item_idstringArticle item identifier returned as text. Use this field to retain every digit when processing the ID.
h5_extra.media_user_idstringPublisher user identifier returned as text.
h5_extra.is_originalbooleanWhether the article is marked as original.
h5_extra.video_countintegerReported video count in the article display metadata.
h5_extra.diversityobjectDisplay attribution accompanying the article.
h5_extra.diversity.publish_loc_infostringPublication location label returned for display.
Publisher profiles19 fields

data.data.h5_extra

FieldTypeDescription
mediaobjectPublic publishing media profile accompanying the article.
media.idintegerNumeric identifier reported for the publishing media profile.
media.creator_idintegerNumeric creator identifier returned for the media profile.
media.namestringDisplay name returned for the media profile.
media.descriptionstringPublic profile description returned for the publisher.
media.avatar_urlstringAvatar image URL returned for the media profile.
media.auth_infostringPublic verification text displayed for the media profile.
media.user_verifiedbooleanWhether the media profile is marked as verified.
media.vbooleanVerification badge flag reported for the media profile.
media.can_be_praisedbooleanWhether the platform reports that the publisher can receive appreciation.
itemCell.userInfoobjectPublic publisher profile supplied with the article card when available.
itemCell.userInfo.userIDintegerNumeric user identifier returned for this public profile.
itemCell.userInfo.mediaIDintegerNumeric media identifier returned for this public profile.
itemCell.userInfo.mediaTypeintegerPlatform type code for this public media profile.
itemCell.userInfo.namestringDisplay name returned for this public user profile.
itemCell.userInfo.descriptionstringDescription text returned for this public user profile.
itemCell.userInfo.avatarURLstringAvatar image URL returned for this public user profile.
itemCell.userInfo.userVerifiedintegerVerification indicator returned for this user profile.
itemCell.userInfo.verifiedContentstringVerification description displayed for this user profile.
Engagement counts8 fields

data.data.h5_extra.itemCell.itemCounter

Platform-reported engagement and display counts.

FieldTypeDescription
readCountintegerReported read count for the article.
showCountintegerReported display count for the article.
commentCountintegerReported comment count for the article.
diggCountintegerReported like count for the article.
repinCountintegerReported bookmark count for the article.
forwardCountintegerReported repost count for the article.
shareCountintegerReported share count for the article.
videoWatchCountintegerReported video watch count in the article metadata.
Article images24 fields

data.data

FieldTypeDescription
image_detailarrayImage details returned for the article.
image_detail[].uristringImage resource identifier returned by Toutiao.
image_detail[].urlstringPrimary image URL returned for this variant.
image_detail[].widthintegerWidth of this image variant as reported.
image_detail[].heightintegerHeight of this image variant as reported.
image_detail[].image_typeintegerPlatform image type code for this variant.
image_detail[].url_listarrayURLs reported for this image variant. The primary URL can also be present.
image_detail[].url_list[].urlstringOne image URL reported for this variant.
main_image_listarrayMain image variants supplied for the article.
main_image_list[].uristringImage resource identifier returned by Toutiao.
main_image_list[].urlstringPrimary image URL returned for this variant.
main_image_list[].widthintegerWidth of this image variant as reported.
main_image_list[].heightintegerHeight of this image variant as reported.
main_image_list[].image_typeintegerPlatform image type code for this variant.
main_image_list[].url_listarrayURLs reported for this image variant. The primary URL can also be present.
main_image_list[].url_list[].urlstringOne image URL reported for this variant.
origin_image_listarrayOriginal-image variants reported for the article.
origin_image_list[].uristringImage resource identifier returned by Toutiao.
origin_image_list[].urlstringPrimary image URL returned for this variant.
origin_image_list[].widthintegerWidth of this image variant as reported.
origin_image_list[].heightintegerHeight of this image variant as reported.
origin_image_list[].image_typeintegerPlatform image type code for this variant.
origin_image_list[].url_listarrayURLs reported for this image variant. The primary URL can also be present.
origin_image_list[].url_list[].urlstringOne image URL reported for this variant.
Thumbnails and title images27 fields

data.data

FieldTypeDescription
thumb_imagearrayThumbnail image variants returned for the article.
thumb_image[].uristringImage resource identifier returned by Toutiao.
thumb_image[].urlstringPrimary image URL returned for this variant.
thumb_image[].widthintegerWidth of this image variant as reported.
thumb_image[].heightintegerHeight of this image variant as reported.
thumb_image[].image_typeintegerPlatform image type code for this variant.
thumb_image[].url_listarrayURLs reported for this image variant. The primary URL can also be present.
thumb_image[].url_list[].urlstringOne image URL reported for this variant.
webp_image_detailarrayArticle image details returned in the WebP variant list.
webp_image_detail[].uristringImage resource identifier returned by Toutiao.
webp_image_detail[].urlstringPrimary image URL returned for this variant.
webp_image_detail[].widthintegerWidth of this image variant as reported.
webp_image_detail[].heightintegerHeight of this image variant as reported.
webp_image_detail[].image_typeintegerPlatform image type code for this variant.
webp_image_detail[].url_listarrayURLs reported for this image variant. The primary URL can also be present.
webp_image_detail[].url_list[].urlstringOne image URL reported for this variant.
webp_thumb_imagearrayThumbnail variants returned in the WebP variant list.
webp_thumb_image[].uristringImage resource identifier returned by Toutiao.
webp_thumb_image[].urlstringPrimary image URL returned for this variant.
webp_thumb_image[].widthintegerWidth of this image variant as reported.
webp_thumb_image[].heightintegerHeight of this image variant as reported.
webp_thumb_image[].image_typeintegerPlatform image type code for this variant.
webp_thumb_image[].url_listarrayURLs reported for this image variant. The primary URL can also be present.
webp_thumb_image[].url_list[].urlstringOne image URL reported for this variant.
title_imageobjectArticle title image variants returned when available.
title_image.title_image_urlstringArticle title image URL for the default display.
title_image.title_image_night_urlstringArticle title image URL for the dark display mode.
Audio5 fields

data.data.h5_extra.audio_info

Audio details attached to the article when available.

FieldTypeDescription
audioIDintegerNumeric audio identifier reported with the audio metadata.
audioGroupIDstringGroup identifier returned for the audio as text.
audioDurationintegerReported audio duration value. Its time unit is unconfirmed.
audioWatchCountintegerReported listen count for the audio.
audioWatchCountShowTextstringDisplay text returned for the audio listen count.
Article card and sharing10 fields

data.data.h5_extra.itemCell

Article card data and reported engagement.

FieldTypeDescription
articleBaseobjectPublic identifiers and version metadata for the article.
articleBase.gidStrstringArticle group identifier returned as text.
articleBase.articleVersionintegerVersion number reported for the article.
articleBase.itemStatusintegerArticle status code reported by Toutiao.
articleClassificationobjectPublic article classification fields returned by Toutiao.
articleClassification.articleTypeintegerPlatform content type code for the article.
articleClassification.articleSubTypeintegerPlatform content subtype code for the article.
articleClassification.isOriginalbooleanWhether the article is marked as original in its classification information.
shareInfoobjectPublic sharing information for the article.
shareInfo.shareURLstringArticle share link returned by Toutiao.
Platform status1 field

data

Toutiao article details and reported platform status.

FieldTypeDescription
messagestringStatus message returned with the Toutiao article result.

Response Example ​

Loading the response example...