此端点可以帮助您
响应以规范化的 V2 格式或平台原生的 V1 格式提供可用的帖子字段。
何时使用
当对象已知、您的产品需要其当前公开上下文时,请使用“按短代码获取网页详情”。
先查看结果和常见工作流,然后再了解参数和可运行的请求示例。
响应以规范化的 V2 格式或平台原生的 V1 格式提供可用的帖子字段。
当对象已知、您的产品需要其当前公开上下文时,请使用“按短代码获取网页详情”。
将公开的 Threads 字段附加到已知的产品对象上。
在后续处理之前验证标识符和当前的公开上下文。
将对象详情用作报告、评分和相关请求的输入。
两个版本完成相同的任务,接受相同的参数。使用切换按钮比较响应结构,并选择您的客户端所需的版本。
在本页面切换版本,即可在同一文档 URL 下比较响应结构。
V1 和 V2 的身份验证、必填参数和请求结构均相同。实际上,您只需在构建端点路径和解析响应时选择版本。
主要区别在于响应结构。新集成请使用 V2;仅在需要兼容现有客户端契约时保留 V1。
两个版本使用相同的 API 密钥请求头和相同的查询参数。本文档先展示共享的参数集合,然后展示各版本特定的端点路径和代码片段。
| 参数 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
shortcode |
是 | str |
Cx123AbCdEf |
帖子公开 URL 中的短代码。 |
复制确切的端点路径、示例 URL 和代码片段时请选择版本。上方的参数列表保持不变。
GET /api/v2/threads.net/posts/web-details-by-shortcodecurl --request GET \
--url "https://www.scrapestorm.net/api/v2/threads.net/posts/web-details-by-shortcode" \
--header "X-API-Key: 00000000-0000-4000-8000-000000000000" \
--get --data-urlencode 'shortcode=Cx123AbCdEf'
from urllib.parse import urljoin
import requests
BASE_URL = "https://www.scrapestorm.net"
ENDPOINT = "/api/v2/threads.net/posts/web-details-by-shortcode"
HEADERS = {"Accept": "application/json", "X-API-Key": "00000000-0000-4000-8000-000000000000"}
params = {
"shortcode": "Cx123AbCdEf",
}
with requests.Session() as session:
response = session.request(
method="GET",
url=urljoin(BASE_URL, ENDPOINT),
headers=HEADERS,
params=params,
timeout=30,
)
response.raise_for_status()
payload = response.json()
print(payload)
const BASE_URL = "https://www.scrapestorm.net";
const endpoint = "/api/v2/threads.net/posts/web-details-by-shortcode";
const params = new URLSearchParams({
shortcode: "Cx123AbCdEf",
});
const response = await fetch(`${BASE_URL}${endpoint}?${params.toString()}`, {
method: "GET",
headers: {
Accept: "application/json",
"X-API-Key": "00000000-0000-4000-8000-000000000000",
},
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status} ${response.statusText}`);
}
const payload = await response.json();
console.log(payload);
import axios from "axios";
const client = axios.create({
baseURL: "https://www.scrapestorm.net",
timeout: 30000,
headers: {
Accept: "application/json",
"X-API-Key": "00000000-0000-4000-8000-000000000000",
},
});
const params = {
shortcode: "Cx123AbCdEf",
};
const { data: payload } = await client.request({
method: "GET",
url: endpoint,
params,
});
console.log(payload);
<?php
declare(strict_types=1);
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
$client = new Client([
'base_uri' => "https://www.scrapestorm.net",
'timeout' => 30.0,
'headers' => [
'Accept' => 'application/json',
'X-API-Key' => "00000000-0000-4000-8000-000000000000",
],
]);
$query = [
"shortcode" => "Cx123AbCdEf",
];
try {
$response = $client->request("GET", "/api/v2/threads.net/posts/web-details-by-shortcode", [
'query' => $query,
]);
$payload = json_decode(
(string) $response->getBody(),
true,
512,
JSON_THROW_ON_ERROR
);
var_dump($payload);
} catch (GuzzleException $e) {
throw $e;
}
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"time"
)
func main() {
baseURL := "https://www.scrapestorm.net"
endpoint := "/api/v2/threads.net/posts/web-details-by-shortcode"
params := url.Values{}
params.Set("shortcode", "Cx123AbCdEf")
req, err := http.NewRequest(
"GET",
fmt.Sprintf("%s%s?%s", baseURL, endpoint, params.Encode()),
nil,
)
if err != nil {
panic(err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("X-API-Key", "00000000-0000-4000-8000-000000000000")
client := &http.Client{Timeout: 30 * time.Second}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var payload any
if err := json.NewDecoder(resp.Body).Decode(&payload); err != nil {
panic(err)
}
fmt.Printf("%+v\n", payload)
}
复制确切的端点路径、示例 URL 和代码片段时请选择版本。上方的参数列表保持不变。
GET /api/v1/threads.net/posts/web-details-by-shortcodecurl --request GET \
--url "https://www.scrapestorm.net/api/v1/threads.net/posts/web-details-by-shortcode" \
--header "X-API-Key: 00000000-0000-4000-8000-000000000000" \
--get --data-urlencode 'shortcode=Cx123AbCdEf'
from urllib.parse import urljoin
import requests
BASE_URL = "https://www.scrapestorm.net"
ENDPOINT = "/api/v1/threads.net/posts/web-details-by-shortcode"
HEADERS = {"Accept": "application/json", "X-API-Key": "00000000-0000-4000-8000-000000000000"}
params = {
"shortcode": "Cx123AbCdEf",
}
with requests.Session() as session:
response = session.request(
method="GET",
url=urljoin(BASE_URL, ENDPOINT),
headers=HEADERS,
params=params,
timeout=30,
)
response.raise_for_status()
payload = response.json()
print(payload)
const BASE_URL = "https://www.scrapestorm.net";
const endpoint = "/api/v1/threads.net/posts/web-details-by-shortcode";
const params = new URLSearchParams({
shortcode: "Cx123AbCdEf",
});
const response = await fetch(`${BASE_URL}${endpoint}?${params.toString()}`, {
method: "GET",
headers: {
Accept: "application/json",
"X-API-Key": "00000000-0000-4000-8000-000000000000",
},
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status} ${response.statusText}`);
}
const payload = await response.json();
console.log(payload);
import axios from "axios";
const client = axios.create({
baseURL: "https://www.scrapestorm.net",
timeout: 30000,
headers: {
Accept: "application/json",
"X-API-Key": "00000000-0000-4000-8000-000000000000",
},
});
const params = {
shortcode: "Cx123AbCdEf",
};
const { data: payload } = await client.request({
method: "GET",
url: endpoint,
params,
});
console.log(payload);
<?php
declare(strict_types=1);
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
$client = new Client([
'base_uri' => "https://www.scrapestorm.net",
'timeout' => 30.0,
'headers' => [
'Accept' => 'application/json',
'X-API-Key' => "00000000-0000-4000-8000-000000000000",
],
]);
$query = [
"shortcode" => "Cx123AbCdEf",
];
try {
$response = $client->request("GET", "/api/v1/threads.net/posts/web-details-by-shortcode", [
'query' => $query,
]);
$payload = json_decode(
(string) $response->getBody(),
true,
512,
JSON_THROW_ON_ERROR
);
var_dump($payload);
} catch (GuzzleException $e) {
throw $e;
}
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"time"
)
func main() {
baseURL := "https://www.scrapestorm.net"
endpoint := "/api/v1/threads.net/posts/web-details-by-shortcode"
params := url.Values{}
params.Set("shortcode", "Cx123AbCdEf")
req, err := http.NewRequest(
"GET",
fmt.Sprintf("%s%s?%s", baseURL, endpoint, params.Encode()),
nil,
)
if err != nil {
panic(err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("X-API-Key", "00000000-0000-4000-8000-000000000000")
client := &http.Client{Timeout: 30 * time.Second}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var payload any
if err := json.NewDecoder(resp.Body).Decode(&payload); err != nil {
panic(err)
}
fmt.Printf("%+v\n", payload)
}
预览保留了关键字段和集合中的前几项,便于您快速浏览响应结构。切换版本会改变 JSON 格式。
此简明 JSON 示例来自 V2 最近一次成功的验证运行。
{
"success": true,
"status": "ok",
"search_context": {
"shortcode": "DaLoISEkkcb"
},
"data": {
"content_item": {
"owner": {
"user_id": "63404918397",
"username": "instagram",
"name": "Instagram",
"is_verified": true,
"avatar_url": null
},
"media_id": "3930411590831195931_63404918397",
"created_at": "2026-06-29T19:33:34Z",
"type": "video",
"media_type": 2,
"shortcode": "DaLoISEkkcb",
"caption": "fashion meets architecture 🏠✨\n\n🎥: Jasmine Archie",
"hashtags": [],
"emails": [],
"is_reply": false,
"is_sponsored": null,
"sponsored_detection_source": null,
"sponsored_detection_confidence": null,
"is_post_unavailable": false,
"engagement": {
"likes_count": null,
"comment_count": 25,
"repost_count": 17,
"quote_count": 0,
"reshare_count": 12,
"view_count": null
},
"assets": [
{
"id": "3930411590831195931_63404918397",
"type": "video",
"url": "https://scontent-cdg6-1.cdninstagram.com/o1/v/t16/f2/m84/AQOEhvKMSx3zF3q00u9Gsy-tmkRYyI3HPmElokt56eSpEywg3LgfHyWuPux6c_C-i4yjOmXSa6OtnImSlhqe4MVW2C8be2VtO_NoUH8.mp4?_nc_cat=103&…",
"height": 1280,
"width": 720,
"accessibility_caption": null
}
]
}
}
}
此简明 JSON 示例来自 V1 最近一次成功的验证运行。
{
"success": true,
"status": "ok",
"search_context": {
"shortcode": "DaLoISEkkcb"
},
"data": {
"data": {
"media": {
"pk": "3930411590831195931",
"user": {
"profile_pic_url": "https://example.com/image.jpg",
"id": "63404918397",
"pk": "63404918397",
"friendship_status": null,
"username": "instagram",
"interop_messaging_user_fbid": "17901558963118398",
"full_name": "Instagram",
"transparency_label": null,
"transparency_product": null,
"transparency_product_enabled": false,
"is_verified": true,
"has_onboarded_to_text_post_app": true,
"text_post_app_is_private": false
},
"id": "3930411590831195931_63404918397",
"text_post_app_info": {
"ghost_post_exp_time_ms": null,
"is_ghost_post": false,
"reply_approval_info": {
"hidden_reply_reason": null,
"pending_reply_status": null,
"pending_reply_count": null,
"ignored_reply_count": null
},
"hush_info": null,
"id": "XDTTextPostAppMediaInfo:18109869665287962",
"show_header_follow": false,
"self_thread_info": null,
"is_spoiler_media": false,
"is_markup": false,
"ghost_post_approximate_like_count_str": null,
"ghost_post_reply_type": null,
"ghost_post_approximate_reply_count_str": null,
"direct_reply_count": 25,
"repost_count": 17,
"quote_count": 0,
"reshare_count": 12,
"attachment_tombstone_info": null,
"custom_feed_preview_info": null,
"platform_podcast_episode_info": null,
"platform_podcast_info": null,
"link_preview_attachment": null,
"link_preview_response": null,
"linked_inline_media": null,
"snippet_attachment_info": null,
"_more_fields": "26 more fields"
},
"logging_info_token": null,
"is_paid_partnership": null,
"audio": null,
"caption": {
"text": "fashion meets architecture 🏠✨\n\n🎥: Jasmine Archie",
"has_translation": null,
"pk": "18109869701287962",
"text_translation": null
},
"caption_is_edited": false,
"transcription_data": null,
"carousel_media": null,
"code": "DaLoISEkkcb",
"image_versions2": {
"candidates": [
{
"height": 1136,
"url": "https://scontent-cdg4-2.cdninstagram.com/v/t51.71878-15/729616172_2151813525365009_2050943461404179245_n.jpg?stp=dst-jpg_e15_tt6&_nc_cat=109&ig_cache_key=MzkzMDQxMTU5MDgzMTE5NTkzMQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkZFRUQueHBpZHMuNjQwLnNkci52aWRlb19kZWZhdWx0X2NvdmVyX2ZyYW1lLkMzIn0%3D&_nc_ohc=DCNPPaNXntsQ7kNvwEn8PKj&_nc_oc=AdoFrwJtKQlmiTilnO5Ltfm5zxj52uwri-A772E-qY36bmnCGCwU4lqQTYim1uReKHU&_nc_ad=z-m&_nc_cid=0&_nc_zt=23&_nc_ht=scontent-cdg4-2.cdninstagram.com&_nc_gid=4rOUcsriCBZ1egspBkzR5g&_nc_ss=7a22e&oh=00_AQHe1zrS6hGYVXtk7VRHzk3-EB79q9DYUG73JsOCtiA7sA&oe=6A87CCF1",
"width": 640
},
{
"height": 852,
"url": "https://scontent-cdg4-2.cdninstagram.com/v/t51.71878-15/729616172_2151813525365009_2050943461404179245_n.jpg?stp=dst-jpg_e15_p480x480_tt6&_nc_cat=109&ig_cache_key=MzkzMDQxMTU5MDgzMTE5NTkzMQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkZFRUQueHBpZHMuNjQwLnNkci52aWRlb19kZWZhdWx0X2NvdmVyX2ZyYW1lLkMzIn0%3D&_nc_ohc=DCNPPaNXntsQ7kNvwEn8PKj&_nc_oc=AdoFrwJtKQlmiTilnO5Ltfm5zxj52uwri-A772E-qY36bmnCGCwU4lqQTYim1uReKHU&_nc_ad=z-m&_nc_cid=0&_nc_zt=23&_nc_ht=scontent-cdg4-2.cdninstagram.com&_nc_gid=4rOUcsriCBZ1egspBkzR5g&_nc_ss=7a22e&oh=00_AQEweaWiklmPFVqLz7kfPqqowZw9TrnO4jlkyRXMaBTLNA&oe=6A87CCF1",
"width": 480
},
{
"_more_items": 9
}
]
},
"original_height": 1280,
"original_width": 720,
"accessibility_caption": null,
"usertags": null,
"video_versions": [
{
"type": 101,
"url": "https://scontent-cdg6-1.cdninstagram.com/o1/v/t16/f2/m84/AQOEhvKMSx3zF3q00u9Gsy-tmkRYyI3HPmElokt56eSpEywg3LgfHyWuPux6c_C-i4yjOmXSa6OtnImSlhqe4MVW2C8be2VtO_NoUH8.mp4?_nc_cat=103&…"
},
{
"type": 102,
"url": "https://scontent-cdg6-1.cdninstagram.com/o1/v/t16/f2/m84/AQOEhvKMSx3zF3q00u9Gsy-tmkRYyI3HPmElokt56eSpEywg3LgfHyWuPux6c_C-i4yjOmXSa6OtnImSlhqe4MVW2C8be2VtO_NoUH8.mp4?_nc_cat=103&…"
},
{
"_more_items": 1
}
],
"has_audio": true,
"media_type": 2,
"caption_add_on": null,
"text_app_music_info": null,
"fbid": "18109869665287962",
"like_count": 511,
"_more_fields": "19 more fields"
}
}
}
}
将本文档作为第一个决策点,然后在将端点接入常规使用之前,继续了解价格、平台覆盖范围和集成规则。
借助这些解答,判断此 API 方法是否适合您的工作流、版本选择和上线计划。
该方法针对帖子执行“按短代码获取网页详情”操作。下方的简明响应示例展示了确切的字段结构。
新集成请选择 V2,因为它提供规范化的结构。仅在兼容已使用平台原生格式的客户端时使用 V1。
创建 API 密钥,在请求头中发送它,并提供表格中的必填参数。代码示例中已包含正确的路径和请求结构。