Weiboユーザーの記事API
APIの稼働状況
- 24時間の稼働状況
- 正常
- 良好/正常
- 利用可能
過去24時間
過去30日間
List the posts that carry an article, as you see them under the Articles filter of a Weibo account's Posts tab, by numeric UID. Each row is one post, with article_title, article_url, article_cover_url and article_author, the byline. The article text is not in the row; open article_url. It returns the latest page, about 10 posts, and does not page.
POST https://api.everyinfra.com/api/v1/socialを送信し、platformにweibo、actionにuser_articlesを指定します。 料金は1,000リクエストあたり$0.79(1回あたり$0.000792)です。失敗した呼び出しと空の結果には課金されません。 同期処理です。時間のかかるジョブでは、ボディに"mode": "async"を追加し、job_idを取得してポーリングしてください。
AIプロンプト
#EveryInfraのWeibo ユーザーの記事エンドポイント(weibo/user_articles)を使ったデータ収集スクリプトの作成を手伝ってください。
エンドポイントの仕組み:
- リクエスト:ヘッダーにAuthorization: Bearer <API key>を指定して、https://api.everyinfra.com/api/v1/socialにPOSTします。APIキーは環境変数EVERYINFRA_API_KEYから読み込み、ハードコードしないでください。
- リクエストボディでplatformにweibo、actionにuser_articlesを指定し、パラメータはparamsの中に入れます。
- 必須パラメータ:
- user_id: Numeric UID of the Weibo account, or a profile link that contains /u/<UID>. Nicknames are not accepted and are rejected with 422 before you are charged; look them up first with user_search.
- 任意パラメータ:
- limit: この呼び出しで返す最大行数で、1以上の整数で指定します。省略するとデフォルト値が適用されます。また、返される行数がこれより少なくなる場合があります。
- レコードのリストを返します。各レコードの主なフィールド: type、id、mblogid(The post's mblogid (user_articles, prof…)、url、text、posted_at、edited_at(When the post was edited (user_articles…)、edit_count(How many times the post was edited (use…)、device(投稿に使われたクライアント(iPhoneクライアントなど))、ip_location(返信に表示されるIP所在地(comment_replies))、like_count、like_count_label(Like count as Weibo writes it on the pa…)。フィールドは全部で54個です。一覧はhttps://api.everyinfra.com/api/v1/social/catalog?platform=weiboを参照してください。.
- リクエストボディの例:
{
"platform": "weibo",
"action": "user_articles",
"params": {
"user_id": "1642634100"
}
}
- 料金:1,000リクエストあたり$0.79。失敗時および結果が空の場合は課金されません。
- 対象が数十〜数百件ある場合は、ボディに"mode": "async"を追加します。すぐにjob_idが返されるので、GET https://api.everyinfra.com/api/v1/jobs/{job_id}をポーリングして結果を取得します。
- 422の場合は、エラーに含まれる推奨パラメータ名と指定可能な値を使ってリクエストを修正します。429または503の場合は、Retry-Afterの指定に従って待ってから再試行します。
コードを書く前に、必要な対象とその件数、必要なフィールド、希望する出力形式を私に質問してください。そのうえで、計画と概算費用を私に確認してください。リクエストパラメータ
#| 名前 | 場所 | 型 | 必須 | デフォルト | 説明 |
|---|---|---|---|---|---|
Authorization | header | string | はい | - | Bearerの後にAPIキーを続けます。APIキーはコンソールで作成してください。URLやコードリポジトリには絶対に含めないでください。 |
platform | body | string | はい | weibo | プラットフォームの識別子です。値は固定です。 |
action | body | string | はい | user_articles | 機能の識別子です。値は固定です。 |
user_id | body.params | string | はい | - | Numeric UID of the Weibo account, or a profile link that contains /u/<UID>. Nicknames are not accepted and are rejected with 422 before you are charged; look them up first with user_search. It returns the latest page only, about 10 posts, and does not page. |
limit | body.params | integer (1–) | いいえ | - | この呼び出しで返す最大行数で、1以上の整数で指定します。省略するとデフォルト値が適用されます。また、返される行数がこれより少なくなる場合があります。 |
コードサンプル
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "weibo",
"action": "user_articles",
"params": {
"user_id": "1642634100"
}
}'OpenAPI定義(JSON)サンプルは環境変数EVERYINFRA_API_KEYからAPIキーを読み込みます。コピーしたコードにAPIキーが含まれることはありません。
レスポンス例
#{ "id": "req_…", "platform": "weibo", "action": "user_articles", "results": [ { "type": …, "id": …, "mblogid": …, "url": …, "text": …, "posted_at": …, "edited_at": …, "edit_count": …, "device": …, "ip_location": …, "like_count": …, "like_count_label": …, "comment_count": …, "comment_count_label": …, "repost_count": …, "repost_count_label": …, "view_count": …, "author_id": …, "author_username": …, "author_name": …, "author_avatar_url": …, "author_verified": …, "author_verified_type": …, "author_verified_reason": …, "author_bio": …, "author_follower_count": …, "author_follower_count_label": …, "author_following_count": …, "author_following_count_label": …, "image_urls": …, "image_count": …, "video_id": …, "video_url": …, "duration_sec": …, "duration_seconds": …, "cover_image_url": …, "play_count": …, "play_count_label": …, "hashtags": …, "mentions": …, "links": …, "links_detail": …, "is_long_text": …, "is_truncated": …, "is_pinned": …, "is_repost": …, "is_paid": …, "is_ad": …, "original_post_id": …, "reposted_post": …, "article_title": …, "article_url": …, "article_cover_url": …, "article_author": …, "platform": … } ], "count": …, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
レスポンスフィールド
#業務データはresultsに含まれます。この表はレコードに含まれうるフィールドの一覧です。プラットフォームに表示されない値を作り出すことはありません。
| フィールド | 意味 |
|---|---|
type | レコードの種類です。値は機能によって異なります(例:video / image / text)。 |
id | プラットフォーム上でのレコードの一意なIDです。一意性は1つのプラットフォーム内に限られ、プラットフォームが異なるとIDが重複する場合があります。 |
mblogid | The post's mblogid (user_articles, profile_feed). |
url | プラットフォーム上のレコードへのリンクです。 |
text | HTMLを除去した本文です。省略されることなく全文が返されます(一部のプラットフォームでは一覧結果自体に抜粋しか含まれません。その場合は各プラットフォームのフィールドの注記に記載しています)。 |
posted_at | 投稿日時です。ISO 8601形式のUTCで返されます(例:2026-08-07T12:34:56+00:00)。プラットフォームから非標準の文字列が返された場合はそのまま渡されるため、パース処理は堅牢に実装してください。nullはプラットフォームが公開していないことを示します。 |
edited_at | When the post was edited (user_articles, profile_feed), ISO 8601, UTC. |
edit_count | How many times the post was edited (user_articles, profile_feed). |
device | 投稿に使われたクライアント(iPhoneクライアントなど)。 |
ip_location | 返信に表示されるIP所在地(comment_replies)。広東などです。Weiboに表示がない場合は含まれません。 |
like_count | いいね数です。nullはプラットフォームまたはこの機能が公開していないことを示し、0ではありません。 |
like_count_label | Like count as Weibo writes it on the page, kept as text, for example the Chinese for “1 million+” or “23.798 million” (user_articles, profile_feed). |
comment_count | コメント数です。nullは非公開を示し、0ではありません。 |
comment_count_label | Comment count as Weibo writes it on the page, kept as text, for example the Chinese for “1 million+” or “23.798 million” (user_articles, profile_feed). |
repost_count | リポスト数です(引用投稿とは区別されます)。nullは非公開を示します。 |
repost_count_label | Repost count as Weibo writes it on the page, kept as text, for example the Chinese for “1 million+” or “23.798 million” (user_articles, profile_feed). |
view_count | Weiboが投稿に表示している閲覧数(post_detail)。user_postsの一覧の行には含まれません。 |
author_id | プラットフォーム上での投稿者の一意なIDです。 |
author_username | 投稿者のユーザー名(@ハンドル)で、通常はURLに使用できます。 |
author_name | 投稿者の表示名です。 |
author_avatar_url | 投稿者のアバターのURLです。一部のリクエスト(search)では返されません。 |
author_verified | 投稿者がWeiboの認証(Vバッジ)を受けているかどうかです。一部のリクエスト(search)では返されません。 |
author_verified_type | Verification type of the author (user_articles, profile_feed). |
author_verified_reason | 認証の説明です(会社での役職など)。認証済みアカウントが何を表しているかを判断するのに使います。一部のリクエスト(search、user_posts)では返されません。 |
author_bio | 投稿者の自己紹介です。一部のリクエスト(search、user_posts)では返されません。 |
author_follower_count | 投稿者のフォロワー数。リクエストによっては返りません(search、user_posts)。videoでは、urlが動画リンクまたは1034:形式のIDの場合にのみ返り、概数です。 |
author_follower_count_label | Author's follower count as Weibo writes it on the page, kept as text, for example the Chinese for “1 million+” or “23.798 million” (user_articles, profile_feed). |
author_following_count | 投稿者がフォローしているアカウントの数です。一部のリクエスト(search、user_posts)では返されません。 |
author_following_count_label | Author's following count as Weibo writes it on the page, kept as text, for example the Chinese for “1 million+” or “23.798 million” (user_articles, profile_feed). |
image_urls | 画像リンクの配列で、プラットフォームでの表示順に並びます。画像がない場合は含まれません。 |
image_count | Number of images in the post (user_articles, profile_feed). |
video_id | 動画ID(video、collection_videos)。 |
video_url | 投稿の動画リンク。 |
duration_sec | 動画の長さ(秒)(post_detail / user_postsの動画投稿、およびvideo / collection_videos)。 |
duration_seconds | 再生時間(秒)です。動画または音声ではないコンテンツの場合はnullです。 |
cover_image_url | カバー画像。 |
play_count | 動画の再生数(video、collection_videos)。collection_videosでは正確な値で、videoでも投稿リンクまたはIDで検索した場合は正確です。videoで動画リンクまたは1034:形式のIDを使った場合は、Weiboが丸めた数値を表示するため概数になります。投稿の閲覧数であるview_countとは異なります。 |
play_count_label | Video play count as Weibo writes it on the page, kept as text, for example the Chinese for “1 million+” or “23.798 million” (user_articles, profile_feed). |
hashtags | 本文中のハッシュタグで、出現順に並びます。ない場合はフィールド自体が含まれません。 |
mentions | Accounts mentioned with @ in the post (user_articles, profile_feed). |
links | プロフィールページ上のリンクの配列(user_about)。 |
links_detail | Details of each link in the post (user_articles, profile_feed): [{url, short_url, title}]. |
is_long_text | 投稿が長文投稿かどうか(post_detail / user_posts)。user_postsでは、長文投稿のtextには冒頭部分(約140文字)のみが入ります。 |
is_truncated | Whether text is cut (user_articles, profile_feed): when true, get the full text with post_detail using id. |
is_pinned | Whether the post is pinned (user_articles, profile_feed). |
is_repost | 投稿がリポストかどうか。 |
is_paid | Whether the post is a paid post (user_articles, profile_feed). |
is_ad | Whether the post is an ad (user_articles, profile_feed). |
original_post_id | リポストの場合、元投稿のID(post_detail / user_posts)。元投稿を取得するには、この値をurlとしてpost_detailに渡します。リポストでない投稿には含まれません。 |
reposted_post | The post that was reposted (user_articles, profile_feed): the same shape as a row, and it does not nest another reposted post. |
article_title | Title of the article (user_articles). |
article_url | Link to the article (user_articles); the article text is not in the row, so open this link for it. |
article_cover_url | Link to the article's cover image (user_articles). |
article_author | Byline of the article (user_articles); it need not be the account that posted. |
platform | 取得元プラットフォームの識別子で、リクエストのplatformと同じです(例:xiaohongshu、tiktok)。 |
エラーと課金
#- 401
- キーが未指定か無効です。
- 402
- 残高が不足しています。先にチャージしてください。
- 422
- パラメータ名または値が無効です。エラーに含まれる候補を参考に修正してください。課金はされません。
- 429
- 1分あたりのリクエスト上限に達しました。Retry-Afterの指定に従って待ってから再試行してください。
- 503
- 処理を完了できませんでした。保留中の請求額は残高に戻されます。結果が不明な場合は、再試行する前に確認してください。
- 200(空)
- データがありません。課金はされません。