このエンドポイントが役立つこと
レスポンスには、投稿 の公開データと、次の API リクエストに必要なコンテキストが含まれます。
使用に適した場面
識別子または入力パラメーターがわかっていて、1 つの予測可能な API 結果が必要な場合にこのメソッドを使用します。
まず結果と一般的なワークフローを確認し、次にパラメーターと動作するリクエスト例に進んでください。
レスポンスには、投稿 の公開データと、次の API リクエストに必要なコンテキストが含まれます。
識別子または入力パラメーターがわかっていて、1 つの予測可能な API 結果が必要な場合にこのメソッドを使用します。
より大きなコレクションを読み込むことなく、必要なオブジェクトだけを要求します。
レコード、ワークフロー、社内ツールを Threads API の結果で補完します。
レスポンスを関連するメソッドや複数ステップのワークフローの入力として使用します。
どちらのバージョンも同じタスクを解決し、同じパラメーターを受け付けます。切り替えを使ってレスポンス構造を比較し、クライアントが想定するバージョンを選んでください。
このページでバージョンを切り替えると、同じドキュメント URL でレスポンス構造を比較できます。
認証、必須パラメーター、リクエストの形は V1 と V2 で同じです。実際には、エンドポイントのパスを組み立てるときとレスポンスを読み取るときにバージョンを選びます。
主な違いはレスポンスのエンベロープです。新しい連携では V2 を使用し、既存のクライアント契約との互換性が必要な場合にのみ V1 を残してください。
どちらのバージョンでも、同じ API キーのヘッダーと同じクエリパラメーターを使用します。このドキュメントでは、まず共通のパラメーターを示し、次に各バージョンのパスとコードスニペットを示します。
| パラメーター | 必須 | 型 | 例 | 説明 |
|---|---|---|---|---|
media_id |
はい | str |
3141592653589793238 |
データを取得したい Instagram 投稿の数値 ID。 |
エンドポイントの正確なパス、URL の例、コードスニペットをコピーするときにバージョンを選んでください。上のパラメーター一覧は変わりません。
GET /api/v2/threads.net/posts/related-by-media-idcurl --request GET \
--url "https://www.scrapestorm.net/api/v2/threads.net/posts/related-by-media-id" \
--header "X-API-Key: 00000000-0000-4000-8000-000000000000" \
--get --data-urlencode 'media_id=3141592653589793238'
from urllib.parse import urljoin
import requests
BASE_URL = "https://www.scrapestorm.net"
ENDPOINT = "/api/v2/threads.net/posts/related-by-media-id"
HEADERS = {"Accept": "application/json", "X-API-Key": "00000000-0000-4000-8000-000000000000"}
params = {
"media_id": "3141592653589793238",
}
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/related-by-media-id";
const params = new URLSearchParams({
media_id: "3141592653589793238",
});
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 = {
media_id: "3141592653589793238",
};
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 = [
"media_id" => "3141592653589793238",
];
try {
$response = $client->request("GET", "/api/v2/threads.net/posts/related-by-media-id", [
'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/related-by-media-id"
params := url.Values{}
params.Set("media_id", "3141592653589793238")
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/related-by-media-idcurl --request GET \
--url "https://www.scrapestorm.net/api/v1/threads.net/posts/related-by-media-id" \
--header "X-API-Key: 00000000-0000-4000-8000-000000000000" \
--get --data-urlencode 'media_id=3141592653589793238'
from urllib.parse import urljoin
import requests
BASE_URL = "https://www.scrapestorm.net"
ENDPOINT = "/api/v1/threads.net/posts/related-by-media-id"
HEADERS = {"Accept": "application/json", "X-API-Key": "00000000-0000-4000-8000-000000000000"}
params = {
"media_id": "3141592653589793238",
}
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/related-by-media-id";
const params = new URLSearchParams({
media_id: "3141592653589793238",
});
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 = {
media_id: "3141592653589793238",
};
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 = [
"media_id" => "3141592653589793238",
];
try {
$response = $client->request("GET", "/api/v1/threads.net/posts/related-by-media-id", [
'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/related-by-media-id"
params := url.Values{}
params.Set("media_id", "3141592653589793238")
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": {
"media_id": "3930411590831195931"
},
"data": {
"count": 4,
"items": [
{
"owner": {
"user_id": "63488872694",
"username": "stanleywangg",
"name": "Stanley Wang",
"is_verified": true,
"avatar_url": null
},
"media_id": "3964776860202319774_63488872694",
"created_at": "2026-08-16T05:30:54Z",
"type": null,
"media_type": 19,
"shortcode": "DcFt4xODD-e",
"caption": "Stop watching tutorials.\nStop buying courses.\n\nBuild one Excel report.\nWrite one SQL query.",
"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": 2,
"repost_count": 1,
"quote_count": 2,
"reshare_count": 1,
"view_count": null
},
"assets": []
},
{
"owner": {
"user_id": "63442423947",
"username": "authorkatymichele",
"name": "Katy Michele",
"is_verified": false,
"avatar_url": null
},
"media_id": "3965058354414750399_63442423947",
"created_at": "2026-08-16T14:50:11Z",
"type": null,
"media_type": 19,
"shortcode": "DcGt5DIlgq_",
"caption": "I always thought reaching 10k on Instagram was a silly little goal that I would never actually reach—and now I’m less than 100 followers away and might actually have THAT many f…",
"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": 1,
"repost_count": 2,
"quote_count": 0,
"reshare_count": null,
"view_count": null
},
"assets": []
},
{
"_more_items": 2
}
]
}
}
このコンパクトな JSON の例は、V1 の直近の成功した検証実行から取得したものです。
{
"success": true,
"status": "ok",
"search_context": {
"media_id": "3930411590831195931"
},
"data": {
"data": {
"relatedPosts": {
"threads": [
{
"id": "3964779355067179382",
"header": null,
"thread_items": [
"…"
],
"thread_type": "thread"
},
{
"id": "3964756362160674966",
"header": null,
"thread_items": [
"…"
],
"thread_type": "thread"
},
{
"_more_items": 3
}
],
"trending_threads": null
}
},
"extensions": {
"is_final": true,
"server_metadata": {
"request_start_time_ms": 1786905435979,
"time_at_flush_ms": 1786905437544
}
},
"status": "ok"
}
}
このドキュメントを最初の判断材料とし、継続的な利用のためにエンドポイントを接続する前に、料金、プラットフォームのカバー範囲、連携ルールを確認してください。
これらの回答を参考に、この API メソッドがワークフロー、バージョンの選択、導入計画に合うかどうかを判断してください。
このメソッドは 投稿 に対して「投稿 ID による関連投稿」を実行します。以下のコンパクトなレスポンス例で、フィールドの正確な構造を確認できます。
新しい連携では、正規化された構造を提供する V2 を選んでください。V1 は、既にプラットフォーム固有の形式を処理しているクライアントとの互換性のためにのみ使用してください。
API キーを作成し、リクエストヘッダーで送信し、表の必須パラメーターを指定してください。コード例には、正しいパスとリクエスト構造が既に含まれています。