Skip to content

Weibo Post Details API (V1) ​

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

Retrieves details for a Weibo post identified by its post ID. Use it to look up a known post for content review, archiving, or related engagement analysis.

Parameters ​

NameInTypeRequiredDefaultDescription
tokenquerystringYes-API access token.
idquerystringYes-Weibo post ID.

Code Samples ​

bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/weibo/get-weibo-detail/v1?token=YOUR_API_KEY&id=VALUE'
text
I want to use the "Post Details (V1)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/weibo/get-weibo-detail/v1?token=YOUR_API_KEY&id=VALUE
API Endpoint: BASE_URL + /api/weibo/get-weibo-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/weibo/post-details-v1-en.json

Parameters:
- token (query): API access token. (Required)
- id (query): Weibo post ID. (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/weibo/get-weibo-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/weibo/get-weibo-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/weibo/get-weibo-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/weibo/get-weibo-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/weibo/get-weibo-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).

Post overview11 fields

data.status

The requested Weibo post.

FieldTypeDescription
idstringNumeric Weibo post identifier represented as a string.
midstringWeibo message ID represented as a string.
bidstringShort alphanumeric identifier for the Weibo post.
created_atstringPost publication time in the original Weibo timestamp format.
textstringPost body as returned by Weibo. It may contain HTML markup.
raw_textstringPlain-text post body when Weibo provides it separately.
textLengthintegerPost text length as reported by Weibo.
sourcestringSource label displayed for the post, when available.
status_titlestringTitle text displayed for the post.
isLongTextbooleanWhether Weibo marks this post as long-form text.
region_namestringRegion label displayed for the post.
Engagement10 fields

data.status

FieldTypeDescription
reposts_countintegerRepost count reported by Weibo.
comments_countintegerComment count reported by Weibo.
attitudes_countintegerReaction count reported by Weibo.
favorites_countintegerFavorite count reported by Weibo.
pending_approval_countintegerNumber of comments shown as pending approval.
multi_attitudearrayBreakdown of reactions by type, when provided.
multi_attitude[]objectReaction-count entry for one type.
multi_attitude[].typeintegerNumeric code for the reaction type.
multi_attitude[].countintegerCount of reactions of that type.
most_attitude_typeintegerNumeric type of the most common reaction reported by Weibo.
Author20 fields

data.status.user

Public author information attached to the post.

FieldTypeDescription
idintegerNumeric Weibo user ID.
screen_namestringDisplayed Weibo account name.
descriptionstringPublic profile description.
profile_image_urlstringProfile avatar URL.
avatar_hdstringHigh-resolution avatar URL.
profile_urlstringProfile link returned by Weibo.
cover_image_phonestringProfile cover image URL for the mobile view.
verifiedbooleanWhether Weibo marks the account as verified.
verified_typeintegerNumeric account verification type recorded by Weibo.
verified_type_extintegerAdditional numeric account verification classification.
verified_reasonstringVerification description displayed for the account.
statuses_countintegerPost count reported for the account.
follow_countintegerNumber of accounts this account follows, as reported by Weibo.
followers_countstringFollower count returned as text. It may use an abbreviated display format.
followers_count_strstringFollower-count text provided for display.
followingbooleanWhether the viewing account is marked as following this author.
follow_mebooleanWhether the author is marked as following the viewing account.
genderstringGender code recorded on the public profile.
mbrankintegerMembership rank reported by Weibo.
urankintegerAccount rank reported by Weibo.
Pictures30 fields

data.status

FieldTypeDescription
pic_numintegerPicture count reported for the post.
pic_idsarrayIDs of pictures attached to the post. The list may be empty.
pic_ids[]stringWeibo picture ID.
thumbnail_picstringURL of the first picture at thumbnail size, when supplied.
bmiddle_picstringURL of the first picture at medium size, when supplied.
original_picstringURL in Weibo's original picture field, when supplied.
picsarrayDetails about attached pictures when Weibo includes them.
pics[]objectA picture attached to the post.
pics[].pidstringWeibo picture ID.
pics[].sizestringSize label for this picture representation.
pics[].urlstringURL of this picture representation.
pics[].geoobjectDimensions and crop indicator for the picture.
pics[].geo.widthintegerPicture width in pixels.
pics[].geo.heightintegerPicture height in pixels.
pics[].geo.cropedbooleanWhether Weibo marks this picture as cropped.
pics[].largeobjectLarger picture representation, when provided.
pics[].large.urlstringURL of the larger picture representation.
pics[].large.sizestringSize label for this picture representation.
pics[].large.geoobjectDimensions and crop indicator for the picture.
pics[].large.geo.widthstringPicture width in pixels, represented as text.
pics[].large.geo.heightstringPicture height in pixels, represented as text.
pics[].large.geo.cropedbooleanWhether Weibo marks this picture as cropped.
pic_focus_pointarrayPicture focal-area entries when provided.
pic_focus_point[]objectA focal area linked to one picture.
pic_focus_point[].pic_idstringWeibo picture ID.
pic_focus_point[].focus_pointobjectFocal area coordinates and size supplied by Weibo.
pic_focus_point[].focus_point.leftintegerLeft coordinate of the focal area.
pic_focus_point[].focus_point.topintegerTop coordinate of the focal area.
pic_focus_point[].focus_point.widthintegerWidth of the focal area.
pic_focus_point[].focus_point.heightnumberHeight of the focal area.
Content cards and video21 fields

data.status.page_info

Attached content card, such as a topic or a native video, when provided.

FieldTypeDescription
typestringWeibo card type label.
object_typeintegerNumeric content object type recorded by Weibo.
object_idstringWeibo content object ID associated with the card.
page_titlestringTitle displayed for the content card.
titlestringTitle field returned with the content card. It may be empty.
content1stringFirst text line returned for the content card.
content2stringSecond text line returned for the content card.
page_picobjectImage information for the content card.
page_pic.pidstringWeibo picture ID.
page_pic.urlstringURL of the content-card image.
page_pic.widthstringPicture width in pixels, represented as text.
page_pic.heightstringPicture height in pixels, represented as text.
video_orientationstringVideo orientation label supplied by Weibo.
play_countstringPlayback count as display text. It can be abbreviated.
media_infoobjectNative video playback metadata when supplied.
media_info.durationnumberVideo duration reported by the playback metadata.
media_info.stream_urlstringVideo stream URL returned by Weibo.
media_info.stream_url_hdstringHigh-definition video stream URL returned by Weibo.
urlsobjectAvailable video URLs keyed by format.
urls.mp4_hd_mp4stringHigh-definition MP4 URL when supplied.
urls.mp4_ld_mp4stringLower-definition MP4 URL when supplied.
Visibility and comments13 fields

data.status

FieldTypeDescription
is_paidbooleanWhether Weibo marks this post as paid content.
ad_markedbooleanWhether Weibo marks the post as advertising.
can_editbooleanWhether editing is available in the response context.
favoritedbooleanWhether the post is marked as favorited in the response context.
visibleobjectVisibility settings returned with this post.
visible.typeintegerNumeric visibility code reported by Weibo.
visible.list_idintegerNumeric ID of the associated visibility list.
comment_manage_infoobjectComment settings reported for this post.
comment_manage_info.comment_permission_typeintegerNumeric comment permission setting.
comment_manage_info.approval_comment_typeintegerNumeric comment approval setting.
comment_manage_info.comment_sort_typeintegerNumeric comment sorting setting.
comment_manage_info.comment_anon_typeintegerNumeric anonymous commenting setting.
forbid_bullet_screensbooleanWhether bullet comments are marked as disabled.
Original post10 fields

data.status.retweeted_status

The original post included with a repost, when available. Its author information can be null.

FieldTypeDescription
idstringNumeric Weibo post identifier represented as a string.
midstringWeibo message ID represented as a string.
bidstringShort alphanumeric identifier for the Weibo post.
created_atstringPost publication time in the original Weibo timestamp format.
textstringPost body as returned by Weibo. It may contain HTML markup.
textLengthintegerPost text length as reported by Weibo.
sourcestringSource label displayed for the post, when available.
isLongTextbooleanWhether Weibo marks this post as long-form text.
titleobjectTitle information attached to this post.
title.textstringDisplayed title text.
Original author20 fields

data.status.retweeted_status.user

Public author information attached to the post.

FieldTypeDescription
idintegerNumeric Weibo user ID.
screen_namestringDisplayed Weibo account name.
descriptionstringPublic profile description.
profile_image_urlstringProfile avatar URL.
avatar_hdstringHigh-resolution avatar URL.
profile_urlstringProfile link returned by Weibo.
cover_image_phonestringProfile cover image URL for the mobile view.
verifiedbooleanWhether Weibo marks the account as verified.
verified_typeintegerNumeric account verification type recorded by Weibo.
verified_type_extintegerAdditional numeric account verification classification.
verified_reasonstringVerification description displayed for the account.
statuses_countintegerPost count reported for the account.
follow_countintegerNumber of accounts this account follows, as reported by Weibo.
followers_countstringFollower count returned as text. It may use an abbreviated display format.
followers_count_strstringFollower-count text provided for display.
followingbooleanWhether the viewing account is marked as following this author.
follow_mebooleanWhether the author is marked as following the viewing account.
genderstringGender code recorded on the public profile.
mbrankintegerMembership rank reported by Weibo.
urankintegerAccount rank reported by Weibo.
Original attachments and video24 fields

data.status.retweeted_status

FieldTypeDescription
pic_numintegerPicture count reported for the post.
pic_idsarrayIDs of pictures attached to the post. The list may be empty.
page_infoobjectAttached content card, such as a topic or a native video, when provided.
page_info.typestringWeibo card type label.
page_info.object_typeintegerNumeric content object type recorded by Weibo.
page_info.object_idstringWeibo content object ID associated with the card.
page_info.page_titlestringTitle displayed for the content card.
page_info.titlestringTitle field returned with the content card. It may be empty.
page_info.content1stringFirst text line returned for the content card.
page_info.content2stringSecond text line returned for the content card.
page_info.page_picobjectImage information for the content card.
page_info.page_pic.pidstringWeibo picture ID.
page_info.page_pic.urlstringURL of the content-card image.
page_info.page_pic.widthstringPicture width in pixels, represented as text.
page_info.page_pic.heightstringPicture height in pixels, represented as text.
page_info.video_orientationstringVideo orientation label supplied by Weibo.
page_info.play_countstringPlayback count as display text. It can be abbreviated.
page_info.media_infoobjectNative video playback metadata when supplied.
page_info.media_info.durationnumberVideo duration reported by the playback metadata.
page_info.media_info.stream_urlstringVideo stream URL returned by Weibo.
page_info.media_info.stream_url_hdstringHigh-definition video stream URL returned by Weibo.
page_info.urlsobjectAvailable video URLs keyed by format.
page_info.urls.mp4_hd_mp4stringHigh-definition MP4 URL when supplied.
page_info.urls.mp4_ld_mp4stringLower-definition MP4 URL when supplied.
Original engagement and visibility18 fields

data.status.retweeted_status

FieldTypeDescription
is_paidbooleanWhether Weibo marks this post as paid content.
ad_markedbooleanWhether Weibo marks the post as advertising.
can_editbooleanWhether editing is available in the response context.
favoritedbooleanWhether the post is marked as favorited in the response context.
visibleobjectVisibility settings returned with this post.
visible.typeintegerNumeric visibility code reported by Weibo.
visible.list_idintegerNumeric ID of the associated visibility list.
visible.list_idstrstringID of the associated visibility list, represented as text.
reposts_countintegerRepost count reported by Weibo.
comments_countintegerComment count reported by Weibo.
attitudes_countintegerReaction count reported by Weibo.
favorites_countintegerFavorite count reported by Weibo.
pending_approval_countintegerNumber of comments shown as pending approval.
comment_manage_infoobjectComment settings reported for this post.
comment_manage_info.comment_permission_typeintegerNumeric comment permission setting.
comment_manage_info.approval_comment_typeintegerNumeric comment approval setting.
comment_manage_info.comment_sort_typeintegerNumeric comment sorting setting.
comment_manage_info.comment_anon_typeintegerNumeric anonymous commenting setting.
Response information1 field

data

Weibo post details. This value can be null when a post is unavailable.

FieldTypeDescription
canonicalstringCanonical link element supplied for the post, returned as HTML text.

Response Example ​

Loading the response example...