Skip to content

Twitter用户发布帖子 API (V1) ​

GET
接口健康状态
健康 可用 少量可用 基本不可用 暂无数据
正在加载健康状态…

通过 Rest ID 检索 X (Twitter) 用户发布的帖子,使用游标分页。用于浏览已知账号的时间线或继续获取其公开帖子历史。

请求参数 ​

参数名位置类型必填默认值说明
tokenquerystring是-访问API所需的鉴权令牌。
restIdquerystring是-X 用户的唯一数字标识符(Rest ID)。
cursorquerystring否用于浏览长时线内容的分页游标。

代码示例 ​

bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/twitter/get-user-posts/v1?token=YOUR_API_KEY&restId=VALUE'
text
我想使用 JustOneAPI 提供的“用户发布帖子 (V1)”接口。
接入地址: https://api.justoneapi.com。
接口路径: /api/twitter/get-user-posts/v1?token=YOUR_API_KEY&restId=VALUE
接口地址: BASE_URL + /api/twitter/get-user-posts/v1?token=YOUR_API_KEY&restId=VALUE
HTTP 方法: GET
身份验证: 在 URL 中传入 token 查询参数。
OpenAPI 定义: https://docs.justoneapi.com/openapi/twitter/user-published-posts-v1-zh.json

请求参数说明:
- token (query): 访问API所需的鉴权令牌。 (必填)
- restId (query): X 用户的唯一数字标识符(Rest ID)。 (必填)
- cursor (query): 用于浏览长时线内容的分页游标。

返回格式: 请根据实际 Content-Type 安全处理 JSON 或文本响应。

响应处理与错误码:
1. 需通过返回体中的 "code" 字段判断业务结果(code 为 0 表示成功)。
2. 超时建议:建议将请求超时时间设置为 120 秒;如果 120 秒偏长,请至少设置为 60 秒,但可能会有少量请求因超时而未接收到结果。
3. 业务码说明:
   - 0: 成功
   - 100: Token 无效或已失效
   - 301: 采集失败,请重试
   - 302: 超出速率限制
   - 303: 超出每日配额
   - 400: 参数错误
   - 500: 内部服务器错误
   - 600: 权限不足
   - 601: 账户余额不足
   - 602: TOKEN 限额超限
4. code 601 表示账户共享余额不足。code 602 表示当前 API TOKEN 自身的累计消费上限已达到。TOKEN 限额不是资金划拨,多个 TOKEN 仍共享同一个账户余额。

请帮我用我擅长的编程语言写一个脚本来调用这个接口,并处理返回结果。
python
import requests

BASE_URL = "https://api.justoneapi.com"  # 由 OpenAPI servers 提供

url = BASE_URL + "/api/twitter/get-user-posts/v1?token=YOUR_API_KEY&restId=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"; // 由 OpenAPI servers 提供
const url = BASE_URL + "/api/twitter/get-user-posts/v1?token=YOUR_API_KEY&restId=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"; // 由 OpenAPI servers 提供
        final String url = BASE_URL + "/api/twitter/get-user-posts/v1?token=YOUR_API_KEY&restId=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" // 由 OpenAPI servers 提供

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/twitter/get-user-posts/v1?token=YOUR_API_KEY&restId=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'; // 由 OpenAPI servers 提供
$url = $BASE_URL . '/api/twitter/get-user-posts/v1?token=YOUR_API_KEY&restId=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;
}

返回字段 ​

业务成功时(code = 0)的主要返回字段。

帖子与回复关系8 个字段

data.timeline[]

一条时间线记录,可能是原创帖、回复、引用或转发。

字段类型说明
tweet_idstringX 帖子 ID,以字符串返回。
created_atstring帖子的发布时间。
textstring帖子的正文。
langstringReddit 返回的帖子语言代码。
conversation_idstring对话中根帖子的 ID,以字符串返回。
reply_tostring直接回复的帖子 ID,存在时以字符串返回。
sensitiveboolean | null有值时,表示帖子是否标记为可能包含敏感内容。
sourcestring | null发帖客户端标签,可能是 HTML 链接或 null。
分页4 个字段

data

字段类型说明
statusstring响应数据中返回的状态标识。
next_cursorstring此值非空时,将它传给 cursor 参数可请求下一页。
prev_cursorstring返回的向前翻页游标。
timelinearray指定账号在当前页返回的时间线记录。
账号资料15 个字段

data.user

所查询账号的公开资料。

字段类型说明
idstringX 账号 ID,以字符串返回。
profilestring | null账号用户名,不含 @ 前缀。
namestring | null账号的展示名称。
avatarstring | null用户资料的头像地址。
created_atstring | nullX 账号的创建时间。
blue_verifiedboolean返回的账号蓝勾标记。
protectedboolean | null该账号在 X 上是否标记为受保护账号。
locationstring作者在个人资料中填写的所在地文本,可能为空。
affiliatesobject | array账号的关联机构信息。没有关联机构时可能返回空数组。
affiliates.labelobject账号资料中展示的关联机构标签。
affiliates.label.descriptionstring关联机构的标签文本。
affiliates.label.badgeobject关联机构的徽章信息。
affiliates.label.badge.urlstring关联机构的徽章图片地址。
affiliates.label.urlobject关联机构标签附带的链接。
affiliates.label.url.urlstring关联机构链接的目标地址。
置顶帖子65 个字段

data.pinned

账号的置顶帖子,存在时可在时间线数组之外单独返回。

字段类型说明
tweet_idstringX 帖子 ID,以字符串返回。
created_atstring帖子的发布时间。
textstring帖子的正文。
langstringReddit 返回的帖子语言代码。
conversation_idstring对话中根帖子的 ID,以字符串返回。
sensitiveboolean | null有值时,表示帖子是否标记为可能包含敏感内容。
bookmarksinteger返回的书签数。
favoritesinteger返回的点赞数。
quotesinteger返回的引用数。
repliesinteger返回的回复数。
retweetsinteger返回的转发数。
viewsstring返回的浏览量,以数字字符串表示。部分嵌入的帖子可能返回 null。
authorobject这条帖子的作者公开资料。
author.rest_idstringX 账号 ID,以字符串返回。
author.namestring账号的展示名称。
author.screen_namestring账号用户名,不含 @ 前缀。
author.avatarstring用户资料的头像地址。
author.followers_countinteger返回的作者关注者数量。
author.blue_verifiedboolean返回的账号蓝勾标记。
mediaobject | array帖子附带的媒体。没有附件时可能返回空数组。
media.videoarray帖子附带的视频。
media.video[]object-
media.video[].idstring视频附件的 ID,以字符串返回。
media.video[].media_url_httpsstring视频预览图的 HTTPS 地址。
media.video[].variantsarray可用的视频播放版本。
media.video[].variants[]object-
media.video[].variants[].urlstring该视频版本的播放地址。
media.video[].variants[].content_typestring该视频版本的媒体类型。
media.video[].variants[].bitrateinteger该视频版本返回的比特率。
quotedobject这条记录引用的帖子,存在时返回。
quoted.tweet_idstringX 帖子 ID,以字符串返回。
quoted.created_atstring帖子的发布时间。
quoted.textstring帖子的正文。
quoted.langstringReddit 返回的帖子语言代码。
quoted.conversation_idstring对话中根帖子的 ID,以字符串返回。
quoted.sensitiveboolean有值时,表示帖子是否标记为可能包含敏感内容。
quoted.bookmarksinteger返回的书签数。
quoted.favoritesinteger返回的点赞数。
quoted.quotesinteger返回的引用数。
quoted.repliesinteger返回的回复数。
quoted.retweetsinteger返回的转发数。
quoted.viewsstring返回的浏览量,以数字字符串表示。部分嵌入的帖子可能返回 null。
quoted.authorobject这条帖子的作者公开资料。
quoted.author.rest_idstringX 账号 ID,以字符串返回。
quoted.author.namestring账号的展示名称。
quoted.author.screen_namestring账号用户名,不含 @ 前缀。
quoted.author.avatarstring用户资料的头像地址。
quoted.author.followers_countinteger返回的作者关注者数量。
quoted.author.blue_verifiedboolean返回的账号蓝勾标记。
quoted.mediaobject帖子附带的媒体。没有附件时可能返回空数组。
quoted.media.videoarray帖子附带的视频。
quoted.media.video[]object-
quoted.media.video[].idstring视频附件的 ID,以字符串返回。
quoted.media.video[].media_url_httpsstring视频预览图的 HTTPS 地址。
quoted.media.video[].durationinteger视频时长,单位为毫秒。
quoted.media.video[].aspect_ratioarray视频宽高比,由两个整数组成。
quoted.media.video[].aspect_ratio[]integer-
quoted.media.video[].original_infoobject原始视频的尺寸与裁剪信息。
quoted.media.video[].original_info.heightinteger原始视频高度,单位为像素。
quoted.media.video[].original_info.widthinteger原始视频宽度,单位为像素。
quoted.media.video[].variantsarray可用的视频播放版本。
quoted.media.video[].variants[]object-
quoted.media.video[].variants[].urlstring该视频版本的播放地址。
quoted.media.video[].variants[].content_typestring该视频版本的媒体类型。
quoted.media.video[].variants[].bitrateinteger该视频版本返回的比特率。
作者6 个字段

data.timeline[].author

这条帖子的作者公开资料。

字段类型说明
rest_idstringX 账号 ID,以字符串返回。
namestring账号的展示名称。
screen_namestring账号用户名,不含 @ 前缀。
avatarstring用户资料的头像地址。
followers_countinteger返回的作者关注者数量。
blue_verifiedboolean返回的账号蓝勾标记。
互动数据6 个字段

data.timeline[]

字段类型说明
bookmarksinteger返回的书签数。
favoritesinteger返回的点赞数。
quotesinteger返回的引用数。
repliesinteger返回的回复数。
retweetsinteger返回的转发数。
viewsstring返回的浏览量,以数字字符串表示。部分嵌入的帖子可能返回 null。
链接、提及与媒体37 个字段

data.timeline[]

字段类型说明
entitiesobject | array帖子正文中的链接、提及等实体。没有实体时可能返回空数组。
entities.urlsarray帖子正文中的链接。
entities.urls[]object-
entities.urls[].urlstring帖子正文中的短链接。
entities.urls[].expanded_urlstring展开后的链接目标地址。
entities.urls[].display_urlstring帖子中显示的链接文本。
entities.user_mentionsarray帖子提及的账号。
entities.user_mentions[]object-
entities.user_mentions[].id_strstringX 账号 ID,以字符串返回。
entities.user_mentions[].namestring账号的展示名称。
entities.user_mentions[].screen_namestring账号用户名,不含 @ 前缀。
entities.symbolsarray帖子返回的金融代码标签实体。
entities.symbols[]object-
entities.symbols[].textstring代码标签文本。
mediaobject | array帖子附带的媒体。没有附件时可能返回空数组。
media.photoarray帖子附带的图片。
media.photo[]object-
media.photo[].idstring图片附件的 ID,以字符串返回。
media.photo[].media_url_httpsstring图片的 HTTPS 地址。
media.photo[].sizesobject图片尺寸,单位为像素。
media.photo[].sizes.hinteger图片高度,单位为像素。
media.photo[].sizes.winteger图片宽度,单位为像素。
media.videoarray帖子附带的视频。
media.video[]object-
media.video[].idstring视频附件的 ID,以字符串返回。
media.video[].media_url_httpsstring视频预览图的 HTTPS 地址。
media.video[].durationinteger视频时长,单位为毫秒。
media.video[].aspect_ratioarray视频宽高比,由两个整数组成。
media.video[].aspect_ratio[]integer-
media.video[].original_infoobject原始视频的尺寸与裁剪信息。
media.video[].original_info.heightinteger原始视频高度,单位为像素。
media.video[].original_info.widthinteger原始视频宽度,单位为像素。
media.video[].variantsarray可用的视频播放版本。
media.video[].variants[]object-
media.video[].variants[].urlstring该视频版本的播放地址。
media.video[].variants[].content_typestring该视频版本的媒体类型。
media.video[].variants[].bitrateinteger该视频版本返回的比特率。
转发与原帖105 个字段

data.timeline[]

字段类型说明
retweetedobject转发关联的原帖引用。
retweeted.idstring这条转发对应的原帖 ID。两个字段同时返回时,与 retweeted_tweet.tweet_id 一致。
retweeted_tweetobject转发记录中附带的原帖。
retweeted_tweet.tweet_idstringX 帖子 ID,以字符串返回。
retweeted_tweet.created_atstring帖子的发布时间。
retweeted_tweet.textstring帖子的正文。
retweeted_tweet.langstringReddit 返回的帖子语言代码。
retweeted_tweet.conversation_idstring对话中根帖子的 ID,以字符串返回。
retweeted_tweet.sensitiveboolean | null有值时,表示帖子是否标记为可能包含敏感内容。
retweeted_tweet.bookmarksinteger返回的书签数。
retweeted_tweet.favoritesinteger返回的点赞数。
retweeted_tweet.quotesinteger返回的引用数。
retweeted_tweet.repliesinteger返回的回复数。
retweeted_tweet.retweetsinteger返回的转发数。
retweeted_tweet.viewsstring返回的浏览量,以数字字符串表示。部分嵌入的帖子可能返回 null。
retweeted_tweet.authorobject这条帖子的作者公开资料。
retweeted_tweet.author.rest_idstringX 账号 ID,以字符串返回。
retweeted_tweet.author.namestring账号的展示名称。
retweeted_tweet.author.screen_namestring账号用户名,不含 @ 前缀。
retweeted_tweet.author.avatarstring用户资料的头像地址。
retweeted_tweet.author.blue_verifiedboolean返回的账号蓝勾标记。
retweeted_tweet.entitiesobject | array帖子正文中的链接、提及等实体。没有实体时可能返回空数组。
retweeted_tweet.entities.urlsarray帖子正文中的链接。
retweeted_tweet.entities.urls[]object-
retweeted_tweet.entities.urls[].urlstring帖子正文中的短链接。
retweeted_tweet.entities.urls[].expanded_urlstring展开后的链接目标地址。
retweeted_tweet.entities.urls[].display_urlstring帖子中显示的链接文本。
retweeted_tweet.entities.user_mentionsarray帖子提及的账号。
retweeted_tweet.entities.user_mentions[]object-
retweeted_tweet.entities.user_mentions[].id_strstringX 账号 ID,以字符串返回。
retweeted_tweet.entities.user_mentions[].namestring账号的展示名称。
retweeted_tweet.entities.user_mentions[].screen_namestring账号用户名,不含 @ 前缀。
retweeted_tweet.entities.mediaarray帖子返回的媒体链接实体。
retweeted_tweet.entities.media[]object-
retweeted_tweet.entities.media[].id_strstring媒体链接实体的 ID,以字符串返回。
retweeted_tweet.entities.media[].media_url_httpsstring媒体链接实体关联的 HTTPS 地址。
retweeted_tweet.entities.media[].typestring返回的媒体附件类型。
retweeted_tweet.entities.media[].video_infoobject视频实体附带的播放信息。
retweeted_tweet.entities.media[].video_info.duration_millisinteger视频时长,单位为毫秒。
retweeted_tweet.entities.symbolsarray帖子返回的金融代码标签实体。
retweeted_tweet.entities.symbols[]object-
retweeted_tweet.entities.symbols[].textstring代码标签文本。
retweeted_tweet.mediaobject | array帖子附带的媒体。没有附件时可能返回空数组。
retweeted_tweet.media.photoarray帖子附带的图片。
retweeted_tweet.media.photo[]object-
retweeted_tweet.media.photo[].idstring图片附件的 ID,以字符串返回。
retweeted_tweet.media.photo[].media_url_httpsstring图片的 HTTPS 地址。
retweeted_tweet.media.photo[].sizesobject图片尺寸,单位为像素。
retweeted_tweet.media.photo[].sizes.hinteger图片高度,单位为像素。
retweeted_tweet.media.photo[].sizes.winteger图片宽度,单位为像素。
retweeted_tweet.media.videoarray帖子附带的视频。
retweeted_tweet.media.video[]object-
retweeted_tweet.media.video[].idstring视频附件的 ID,以字符串返回。
retweeted_tweet.media.video[].media_url_httpsstring视频预览图的 HTTPS 地址。
retweeted_tweet.media.video[].durationinteger视频时长,单位为毫秒。
retweeted_tweet.media.video[].aspect_ratioarray视频宽高比,由两个整数组成。
retweeted_tweet.media.video[].aspect_ratio[]integer-
retweeted_tweet.media.video[].original_infoobject原始视频的尺寸与裁剪信息。
retweeted_tweet.media.video[].original_info.heightinteger原始视频高度,单位为像素。
retweeted_tweet.media.video[].original_info.widthinteger原始视频宽度,单位为像素。
retweeted_tweet.media.video[].variantsarray可用的视频播放版本。
retweeted_tweet.media.video[].variants[]object-
retweeted_tweet.media.video[].variants[].urlstring该视频版本的播放地址。
retweeted_tweet.media.video[].variants[].content_typestring该视频版本的媒体类型。
retweeted_tweet.media.video[].variants[].bitrateinteger该视频版本返回的比特率。
retweeted_tweet.quotedobject这条记录引用的帖子,存在时返回。
retweeted_tweet.quoted.tweet_idstringX 帖子 ID,以字符串返回。
retweeted_tweet.quoted.created_atstring帖子的发布时间。
retweeted_tweet.quoted.textstring帖子的正文。
retweeted_tweet.quoted.langstringReddit 返回的帖子语言代码。
retweeted_tweet.quoted.conversation_idstring对话中根帖子的 ID,以字符串返回。
retweeted_tweet.quoted.sensitiveboolean | null有值时,表示帖子是否标记为可能包含敏感内容。
retweeted_tweet.quoted.bookmarksinteger返回的书签数。
retweeted_tweet.quoted.favoritesinteger返回的点赞数。
retweeted_tweet.quoted.quotesinteger返回的引用数。
retweeted_tweet.quoted.repliesinteger返回的回复数。
retweeted_tweet.quoted.retweetsinteger返回的转发数。
retweeted_tweet.quoted.viewsstring返回的浏览量,以数字字符串表示。部分嵌入的帖子可能返回 null。
retweeted_tweet.quoted.authorobject这条帖子的作者公开资料。
retweeted_tweet.quoted.author.rest_idstringX 账号 ID,以字符串返回。
retweeted_tweet.quoted.author.namestring账号的展示名称。
retweeted_tweet.quoted.author.screen_namestring账号用户名,不含 @ 前缀。
retweeted_tweet.quoted.author.avatarstring用户资料的头像地址。
retweeted_tweet.quoted.author.followers_countinteger返回的作者关注者数量。
retweeted_tweet.quoted.author.blue_verifiedboolean返回的账号蓝勾标记。
retweeted_tweet.quoted.mediaobject | array帖子附带的媒体。没有附件时可能返回空数组。
retweeted_tweet.quoted.media.photoarray帖子附带的图片。
retweeted_tweet.quoted.media.photo[]object-
retweeted_tweet.quoted.media.photo[].idstring图片附件的 ID,以字符串返回。
retweeted_tweet.quoted.media.photo[].media_url_httpsstring图片的 HTTPS 地址。
retweeted_tweet.quoted.media.photo[].sizesobject图片尺寸,单位为像素。
retweeted_tweet.quoted.media.photo[].sizes.hinteger图片高度,单位为像素。
retweeted_tweet.quoted.media.photo[].sizes.winteger图片宽度,单位为像素。
retweeted_tweet.quoted.media.videoarray帖子附带的视频。
retweeted_tweet.quoted.media.video[]object-
retweeted_tweet.quoted.media.video[].idstring视频附件的 ID,以字符串返回。
retweeted_tweet.quoted.media.video[].media_url_httpsstring视频预览图的 HTTPS 地址。
retweeted_tweet.quoted.media.video[].durationinteger视频时长,单位为毫秒。
retweeted_tweet.quoted.media.video[].aspect_ratioarray视频宽高比,由两个整数组成。
retweeted_tweet.quoted.media.video[].aspect_ratio[]integer-
retweeted_tweet.quoted.media.video[].original_infoobject原始视频的尺寸与裁剪信息。
retweeted_tweet.quoted.media.video[].original_info.heightinteger原始视频高度,单位为像素。
retweeted_tweet.quoted.media.video[].original_info.widthinteger原始视频宽度,单位为像素。
retweeted_tweet.quoted.media.video[].variantsarray可用的视频播放版本。
retweeted_tweet.quoted.media.video[].variants[]object-
引用帖子42 个字段

data.timeline[].quoted

这条记录引用的帖子,存在时返回。

字段类型说明
tweet_idstringX 帖子 ID,以字符串返回。
created_atstring帖子的发布时间。
textstring帖子的正文。
langstringReddit 返回的帖子语言代码。
conversation_idstring对话中根帖子的 ID,以字符串返回。
sensitiveboolean | null有值时,表示帖子是否标记为可能包含敏感内容。
bookmarksinteger返回的书签数。
favoritesinteger返回的点赞数。
quotesinteger返回的引用数。
repliesinteger返回的回复数。
retweetsinteger返回的转发数。
viewsstring | null返回的浏览量,以数字字符串表示。部分嵌入的帖子可能返回 null。
authorobject这条帖子的作者公开资料。
author.rest_idstringX 账号 ID,以字符串返回。
author.namestring账号的展示名称。
author.screen_namestring账号用户名,不含 @ 前缀。
author.avatarstring | null用户资料的头像地址。
author.followers_countinteger返回的作者关注者数量。
author.blue_verifiedboolean返回的账号蓝勾标记。
mediaobject | array帖子附带的媒体。没有附件时可能返回空数组。
media.photoarray帖子附带的图片。
media.photo[]object-
media.photo[].idstring图片附件的 ID,以字符串返回。
media.photo[].media_url_httpsstring图片的 HTTPS 地址。
media.photo[].sizesobject图片尺寸,单位为像素。
media.photo[].sizes.hinteger图片高度,单位为像素。
media.photo[].sizes.winteger图片宽度,单位为像素。
media.videoarray帖子附带的视频。
media.video[]object-
media.video[].idstring视频附件的 ID,以字符串返回。
media.video[].media_url_httpsstring视频预览图的 HTTPS 地址。
media.video[].durationinteger视频时长,单位为毫秒。
media.video[].aspect_ratioarray视频宽高比,由两个整数组成。
media.video[].aspect_ratio[]integer-
media.video[].original_infoobject原始视频的尺寸与裁剪信息。
media.video[].original_info.heightinteger原始视频高度,单位为像素。
media.video[].original_info.widthinteger原始视频宽度,单位为像素。
media.video[].variantsarray可用的视频播放版本。
media.video[].variants[]object-
media.video[].variants[].urlstring该视频版本的播放地址。
media.video[].variants[].content_typestring该视频版本的媒体类型。
media.video[].variants[].bitrateinteger该视频版本返回的比特率。

响应示例 ​

正在加载响应示例…