このエンドポイントが役立つこと
レスポンスは、選択した API 形式で、カウンターと主要な指標を含むすぐに使える プロフィール の概要を提供します。
使用に適した場面
指標のコンパクトなスナップショットが必要なダッシュボード、評価、定期レポートで「ユーザー ID による投稿の指標」を使用します。
まず結果と一般的なワークフローを確認し、次にパラメーターと動作するリクエスト例に進んでください。
レスポンスは、選択した API 形式で、カウンターと主要な指標を含むすぐに使える プロフィール の概要を提供します。
指標のコンパクトなスナップショットが必要なダッシュボード、評価、定期レポートで「ユーザー ID による投稿の指標」を使用します。
コレクション全体を読み込んで処理することなく、X/Twitter の主要な指標を表示します。
定期的なスナップショットを保存し、指標の推移を比較します。
集計指標をランキングや社内ルールの入力として使用します。
どちらのバージョンも同じタスクを解決し、同じパラメーターを受け付けます。切り替えを使ってレスポンス構造を比較し、クライアントが想定するバージョンを選んでください。
このページでバージョンを切り替えると、同じドキュメント URL でレスポンス構造を比較できます。
認証、必須パラメーター、リクエストの形は V1 と V2 で同じです。実際には、エンドポイントのパスを組み立てるときとレスポンスを読み取るときにバージョンを選びます。
主な違いはレスポンスのエンベロープです。新しい連携では V2 を使用し、既存のクライアント契約との互換性が必要な場合にのみ V1 を残してください。
どちらのバージョンでも、同じ API キーのヘッダーと同じクエリパラメーターを使用します。このドキュメントでは、まず共通のパラメーターを示し、次に各バージョンのパスとコードスニペットを示します。
| パラメーター | 必須 | 型 | 例 | 説明 |
|---|---|---|---|---|
user_id |
はい | str |
44196397 |
選択したプラットフォームにおけるユーザーの数値 ID。 |
エンドポイントの正確なパス、URL の例、コードスニペットをコピーするときにバージョンを選んでください。上のパラメーター一覧は変わりません。
GET /api/v2/twitter.com/profile/tweets-metrics-by-user-idcurl --request GET \
--url "https://www.scrapestorm.net/api/v2/twitter.com/profile/tweets-metrics-by-user-id" \
--header "X-API-Key: 00000000-0000-4000-8000-000000000000" \
--get --data-urlencode 'user_id=44196397'
from urllib.parse import urljoin
import requests
BASE_URL = "https://www.scrapestorm.net"
ENDPOINT = "/api/v2/twitter.com/profile/tweets-metrics-by-user-id"
HEADERS = {"Accept": "application/json", "X-API-Key": "00000000-0000-4000-8000-000000000000"}
params = {
"user_id": "44196397",
}
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/twitter.com/profile/tweets-metrics-by-user-id";
const params = new URLSearchParams({
user_id: "44196397",
});
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 = {
user_id: "44196397",
};
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 = [
"user_id" => "44196397",
];
try {
$response = $client->request("GET", "/api/v2/twitter.com/profile/tweets-metrics-by-user-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/twitter.com/profile/tweets-metrics-by-user-id"
params := url.Values{}
params.Set("user_id", "44196397")
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": {
"user_id": "44196397"
},
"data": {
"user": {
"url": "https://x.com/elonmusk",
"user_id": "44196397",
"username": "elonmusk",
"display_name": "Elon Musk",
"description": "Starmind",
"emails": [],
"external_links": [],
"location": null,
"created_at": "2009-06-02T20:12:29Z",
"is_verified": false,
"is_blue_verified": true,
"is_protected": false,
"possibly_sensitive": false,
"default_profile": false,
"default_profile_image": false,
"followers_count": 240944559,
"following_count": 1370,
"tweet_count": 105744,
"media_count": 4625,
"listed_count": 170041,
"like_count": 239681,
"professional_type": "Creator",
"professional_category_name": null,
"affiliated_account": {
"label": "X",
"url": "https://x.com/X",
"badge_url": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg",
"label_type": "BusinessLabel"
},
"_more_fields": "5 more fields"
},
"analytics": {
"all_posts": {
"analyzed_posts_count": 20,
"last_post_date": "2026-07-19T20:29:24+00:00",
"total_engagement": 334625,
"avg_engagement_rate_per_post": 0.006944,
"peak_engagement_rate_per_post": 0.061896,
"avg_weighted_engagement_score": 19461.975,
"total_engagement_rate": 0.13888,
"median_engagement_per_post": 9020.5,
"max_engagement_per_post": 149134,
"avg_caption_length": 78,
"avg_posts_per_week": 7,
"avg_posts_per_month": 30,
"posts_count_last_7_days": 20,
"posts_count_last_30_days": 20,
"total_likes": 225663,
"total_replies": 28011,
"total_retweets": 61382,
"total_quotes": 3798,
"total_bookmarks": 15771,
"total_views": 35787056,
"avg_likes_per_post": 11283,
"avg_replies_per_post": 1401,
"avg_retweets_per_post": 3069,
"avg_quotes_per_post": 190,
"_more_fields": "15 more fields"
},
"sponsored_posts": {
"analyzed_posts_count": 0,
"total_engagement": 0,
"avg_engagement_rate_per_post": 0.0,
"peak_engagement_rate_per_post": 0.0,
"avg_weighted_engagement_score": 0.0,
"total_engagement_rate": 0.0,
"median_engagement_per_post": 0.0,
"max_engagement_per_post": 0,
"avg_caption_length": 0,
"avg_posts_per_week": 0,
"avg_posts_per_month": 0,
"posts_count_last_7_days": 0,
"posts_count_last_30_days": 0
},
"organic_posts": {
"analyzed_posts_count": 20,
"last_post_date": "2026-07-19T20:29:24+00:00",
"total_engagement": 334625,
"avg_engagement_rate_per_post": 0.006944,
"peak_engagement_rate_per_post": 0.061896,
"avg_weighted_engagement_score": 19461.975,
"total_engagement_rate": 0.13888,
"median_engagement_per_post": 9020.5,
"max_engagement_per_post": 149134,
"avg_caption_length": 78,
"avg_posts_per_week": 7,
"avg_posts_per_month": 30,
"posts_count_last_7_days": 20,
"posts_count_last_30_days": 20,
"total_likes": 225663,
"total_replies": 28011,
"total_retweets": 61382,
"total_quotes": 3798,
"total_bookmarks": 15771,
"total_views": 35787056,
"avg_likes_per_post": 11283,
"avg_replies_per_post": 1401,
"avg_retweets_per_post": 3069,
"avg_quotes_per_post": 190,
"_more_fields": "15 more fields"
},
"segment_comparison": {
"sponsored_content_share": 0.0,
"organic_content_share": 100.0,
"organic_vs_sponsored_engagement_rate_gap": 0.0069,
"sponsored_to_organic_avg_engagement_ratio": 0.0
}
},
"feed": {
"count": 20,
"items": [
{
"url": "https://x.com/elonmusk/status/2078940289226482120",
"tweet_id": "2078940289226482120",
"text": "RT @PeterDiamandis: The first phone call across the Atlantic, in 1927, cost about seventy five dollars for three minutes, more than a thous…",
"created_at": "2026-07-19T20:29:24Z",
"language": "en",
"source": "Twitter for iPhone",
"author": {
"url": "https://x.com/elonmusk",
"user_id": "44196397",
"username": "elonmusk",
"display_name": "Elon Musk",
"description": "Starmind",
"created_at": "2009-06-02T20:12:29Z",
"is_verified": false,
"is_blue_verified": true,
"is_protected": false,
"possibly_sensitive": false,
"default_profile": false,
"default_profile_image": false,
"followers_count": 240944559,
"following_count": 1370,
"tweet_count": 105744,
"media_count": 4625,
"listed_count": 170041,
"like_count": 239681,
"professional_type": "Creator",
"affiliated_account": {
"label": "X",
"url": "https://x.com/X",
"badge_url": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg",
"label_type": "BusinessLabel"
},
"avatar_url": "https://example.com/image.jpg",
"banner_url": "https://pbs.twimg.com/profile_banners/44196397/1774145451"
},
"user_mentions": [
{
"user_id": "14710129",
"username": "PeterDiamandis",
"display_name": "Peter H. Diamandis, MD",
"start_index": 3,
"end_index": 18
}
],
"is_reply": false,
"is_quote": false,
"is_retweet": true,
"retweeted_tweet_id": "2078903115248460118",
"reply_count": 0,
"retweet_count": 296,
"quote_count": 0,
"like_count": 0,
"bookmark_count": 0,
"view_count": 462054,
"edit_control": {
"is_editable": false,
"editable_until": "2026-07-19T21:29:24.451000Z",
"edits_remaining": 5
},
"is_sponsored": false,
"sponsored_detection_source": null,
"sponsored_detection_confidence": null
},
{
"url": "https://x.com/elonmusk/status/2078939898870903135",
"tweet_id": "2078939898870903135",
"text": "RT @PeterDiamandis: SpaceX's newest satellites carry about 1,024 gigabits of bandwidth each. The generation before carried 96. That is a te…",
"created_at": "2026-07-19T20:27:51Z",
"language": "en",
"source": "Twitter for iPhone",
"author": {
"url": "https://x.com/elonmusk",
"user_id": "44196397",
"username": "elonmusk",
"display_name": "Elon Musk",
"description": "Starmind",
"created_at": "2009-06-02T20:12:29Z",
"is_verified": false,
"is_blue_verified": true,
"is_protected": false,
"possibly_sensitive": false,
"default_profile": false,
"default_profile_image": false,
"followers_count": 240944559,
"following_count": 1370,
"tweet_count": 105744,
"media_count": 4625,
"listed_count": 170041,
"like_count": 239681,
"professional_type": "Creator",
"affiliated_account": {
"label": "X",
"url": "https://x.com/X",
"badge_url": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg",
"label_type": "BusinessLabel"
},
"avatar_url": "https://example.com/image.jpg",
"banner_url": "https://pbs.twimg.com/profile_banners/44196397/1774145451"
},
"user_mentions": [
{
"user_id": "14710129",
"username": "PeterDiamandis",
"display_name": "Peter H. Diamandis, MD",
"start_index": 3,
"end_index": 18
}
],
"is_reply": false,
"is_quote": false,
"is_retweet": true,
"retweeted_tweet_id": "2078933283539148891",
"reply_count": 0,
"retweet_count": 233,
"quote_count": 0,
"like_count": 0,
"bookmark_count": 0,
"view_count": 450028,
"edit_control": {
"is_editable": false,
"editable_until": "2026-07-19T21:27:51.383000Z",
"edits_remaining": 5
},
"is_sponsored": false,
"sponsored_detection_source": null,
"sponsored_detection_confidence": null
},
{
"_more_items": 18
}
]
}
}
}
このドキュメントを最初の判断材料とし、継続的な利用のためにエンドポイントを接続する前に、料金、プラットフォームのカバー範囲、連携ルールを確認してください。
これらの回答を参考に、この API メソッドがワークフロー、バージョンの選択、導入計画に合うかどうかを判断してください。
このメソッドは プロフィール に対して「ユーザー ID による投稿の指標」を実行します。以下のコンパクトなレスポンス例で、フィールドの正確な構造を確認できます。
新しい連携では、正規化された構造を提供する V2 を選んでください。V1 は、既にプラットフォーム固有の形式を処理しているクライアントとの互換性のためにのみ使用してください。
API キーを作成し、リクエストヘッダーで送信し、表の必須パラメーターを指定してください。コード例には、正しいパスとリクエスト構造が既に含まれています。