TikTokPhoto post imagesAPI

POST

APIの稼働状況

24時間の稼働状況
正常
  • 良好/正常
  • 利用可能
正常

過去24時間

過去30日間

Get every image of a TikTok photo post (photo mode or carousel) from its url, in the post's order: images with each image's url, width and height in pixels, plus image_urls, the same links as a list. The row also carries the post's text, posted_at, counts, author fields and background music fields. Image links expire, so download the ones you keep soon. A video, a missing post or a deleted post returns 503 and is not charged; use video for videos.

POST https://api.everyinfra.com/api/v1/socialを送信し、platformにtiktok、actionにphotosを指定します。 料金は1,000リクエストあたり$0.56(1回あたり$0.000556)です。失敗した呼び出しと空の結果には課金されません。 同期処理です。時間のかかるジョブでは、ボディに"mode": "async"を追加し、job_idを取得してポーリングしてください。

AIプロンプト

#
EveryInfraのTikTok Photo post imagesエンドポイント(tiktok/photos)を使ったデータ収集スクリプトの作成を手伝ってください。

エンドポイントの仕組み:
- リクエスト:ヘッダーにAuthorization: Bearer <API key>を指定して、https://api.everyinfra.com/api/v1/socialにPOSTします。APIキーは環境変数EVERYINFRA_API_KEYから読み込み、ハードコードしないでください。
- リクエストボディでplatformにtiktok、actionにphotosを指定し、パラメータはparamsの中に入れます。
- 必須パラメータ:
  - url: A TikTok photo post link with the post ID, such as https://www.tiktok.com/@<user>/photo/<ID> (the /video/<ID> form works too), or the 15 to 21 digit post ID.
- 1つのオブジェクトを返します。主なフィールド: id、url、images(Every image of a photo post (photos), i…)、image_urls(Link to each image in a photo (carousel…)、posted_at、text、language、location、media_type(Post type (photos): always photo)、author_username、author_name、author_bio(投稿者のプロフィール紹介文です)。フィールドは全部で59個です。一覧はhttps://api.everyinfra.com/api/v1/social/catalog?platform=tiktokを参照してください。.
- リクエストボディの例:
{
  "platform": "tiktok",
  "action": "photos",
  "params": {
    "url": "https://www.tiktok.com/@tiktok/photo/7701866987609197837"
  }
}
- 料金:1,000リクエストあたり$0.56。失敗時および結果が空の場合は課金されません。
- 対象が数十〜数百件ある場合は、ボディに"mode": "async"を追加します。すぐにjob_idが返されるので、GET https://api.everyinfra.com/api/v1/jobs/{job_id}をポーリングして結果を取得します。
- 422の場合は、エラーに含まれる推奨パラメータ名と指定可能な値を使ってリクエストを修正します。429または503の場合は、Retry-Afterの指定に従って待ってから再試行します。

コードを書く前に、必要な対象とその件数、必要なフィールド、希望する出力形式を私に質問してください。そのうえで、計画と概算費用を私に確認してください。

リクエストパラメータ

#
名前場所型必須デフォルト説明
Authorizationheaderstringはい-Bearerの後にAPIキーを続けます。APIキーはコンソールで作成してください。URLやコードリポジトリには絶対に含めないでください。
platformbodystringはいtiktokプラットフォームの識別子です。値は固定です。
actionbodystringはいphotos機能の識別子です。値は固定です。
urlbody.paramsstringはい-A TikTok photo post link with the post ID, such as https://www.tiktok.com/@<user>/photo/<ID> (the /video/<ID> form works too), or the 15 to 21 digit post ID. Short links such as vm.tiktok.com are not recognized, and a value in the wrong form is rejected (422) before you are charged.

コードサンプル

#
bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "tiktok",
  "action": "photos",
  "params": {
    "url": "https://www.tiktok.com/@tiktok/photo/7701866987609197837"
  }
}'

OpenAPI定義(JSON)サンプルは環境変数EVERYINFRA_API_KEYからAPIキーを読み込みます。コピーしたコードにAPIキーが含まれることはありません。

レスポンス例

#
このパラメータのサンプルレスポンスはまだありません。このプレビューはAPI定義に基づくレスポンスの構造とフィールドを示したもので、値は…で表しています。実際の呼び出し結果ではありません。
json
{  "id": "req_…",  "platform": "tiktok",  "action": "photos",  "results": {    "id": …,    "url": …,    "images": …,    "image_urls": …,    "posted_at": …,    "text": …,    "language": …,    "location": …,    "media_type": …,    "author_username": …,    "author_name": …,    "author_bio": …,    "music_title": …,    "music_author": …,    "author_id": …,    "author_sec_uid": …,    "music_id": …,    "author_url": …,    "author_avatar_url": …,    "cover_url": …,    "music_url": …,    "music_cover_url": …,    "image_count": …,    "view_count": …,    "like_count": …,    "comment_count": …,    "share_count": …,    "bookmark_count": …,    "repost_count": …,    "author_follower_count": …,    "author_following_count": …,    "author_like_count": …,    "author_video_count": …,    "duration_sec": …,    "duration_seconds": …,    "music_duration_sec": …,    "category_type": …,    "author_is_verified": …,    "author_is_private": …,    "author_is_seller": …,    "music_is_original": …,    "share_enabled": …,    "view_count_estimated": …,    "like_count_estimated": …,    "comment_count_estimated": …,    "share_count_estimated": …,    "author_follower_count_estimated": …,    "author_following_count_estimated": …,    "author_like_count_estimated": …,    "author_video_count_estimated": …,    "is_ad": …,    "is_private": …,    "is_aigc": …,    "comments_disabled": …,    "duet_enabled": …,    "stitch_enabled": …,    "hashtags": …,    "mentions": …,    "suggested_words": …,    "platform": …  },  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

レスポンスフィールド

#

業務データはresultsに含まれます。この表はレコードに含まれうるフィールドの一覧です。プラットフォームに表示されない値を作り出すことはありません。

フィールド意味
idプラットフォーム上でのレコードの一意なIDです。一意性は1つのプラットフォーム内に限られ、プラットフォームが異なるとIDが重複する場合があります。
urlプラットフォーム上のレコードへのリンクです。
imagesEvery image of a photo post (photos), in the post's order: [{url, width, height}], with width and height in pixels. Image links expire, so download the ones you keep soon.
image_urlsLink to each image in a photo (carousel) post (video_download, photos; in photos the same images as images, in the post's order); links to all of a product's main images (shop_search, shop_category_products, shop_products); on shop_search the first is the same as cover_url.
posted_at投稿日時です。ISO 8601形式のUTCで返されます(例:2026-08-07T12:34:56+00:00)。プラットフォームから非標準の文字列が返された場合はそのまま渡されるため、パース処理は堅牢に実装してください。nullはプラットフォームが公開していないことを示します。
textHTMLを除去した本文です。省略されることなく全文が返されます(一部のプラットフォームでは一覧結果自体に抜粋しか含まれません。その場合は各プラットフォームのフィールドの注記に記載しています)。
languageプラットフォームが判定したコンテンツの言語コードです(例:zh、en)。誤っている場合があります。
location位置情報の説明で、そのまま渡されます。形式はプラットフォームによって異なります。
media_typePost type (photos): always photo.
author_username投稿者のユーザー名(@ハンドル)で、通常はURLに使用できます。
author_name投稿者の表示名です。
author_bio投稿者のプロフィール紹介文です。リクエストによっては返されず、user_videosの結果では含まれない場合があります。
music_titleTitle of the background music (photos).
music_authorName of the background music's author (photos).
author_idプラットフォーム上での投稿者の一意なIDです。
author_sec_uid音楽の作成者アカウントのsecUid(music_detail)です。オリジナルサウンドの場合のみ含まれます。
music_idID of the post's background music (photos).
author_urlプラットフォーム上の投稿者プロフィールへのリンクです。
author_avatar_url投稿者のアバター画像のリンク(ほとんどのプラットフォームで署名付きのため、有効期限があります)。
cover_urlLink to the post's cover image (photos).
music_urlLink to the background music (photos).
music_cover_urlLink to the background music's cover image (photos).
image_countNumber of images in the photo post (photos), the same as the length of images.
view_count閲覧数または再生数です。nullは非公開を示し、0ではありません。
like_countいいね数です。nullはプラットフォームまたはこの機能が公開していないことを示し、0ではありません。
comment_countコメント数です。nullは非公開を示し、0ではありません。
share_countシェア数です。nullは非公開を示し、0ではありません。
bookmark_countNumber of bookmarks (photos).
repost_countリポスト数です(引用投稿とは区別されます)。nullは非公開を示します。
author_follower_count投稿者のフォロワー数です。nullは非公開を示します。
author_following_count投稿者がフォローしているアカウント数です。リクエストによっては返されません。
author_like_count投稿者のプロフィールが受け取った累計いいね数です。リクエストによっては返されません。
author_video_count投稿者が投稿した動画の総数です。リクエストによっては返されません。
duration_sec秒単位の再生時間で、duration_secondsと同じ値です(両方の名前で返されます)。動画の行では動画の長さ、music_search、music_chart、music_detailではサウンドの長さを表します。
duration_seconds再生時間(秒)です。動画または音声ではないコンテンツの場合はnullです。
music_duration_secLength of the background music in seconds (photos).
category_typeThe post's category type (photos).
author_is_verified投稿者が認証バッジを持っているかどうかです。リクエストによっては返されません。
author_is_private投稿者のアカウントが非公開かどうか。
author_is_seller投稿者がTikTok Shopの販売者かどうか。user_videosの結果では通常含まれません。
music_is_originalWhether the background music is an original sound, the creator's own audio (photos).
share_enabledWhether the post can be shared (photos).
view_count_estimatedWhether view_count is an approximate figure (photos): from 10,000 up, TikTok's page shows a rounded count (35.2K is stored as 35200) and this is true.
like_count_estimatedWhether like_count is an approximate figure (photos), by the same rule as view_count_estimated.
comment_count_estimatedWhether comment_count is an approximate figure (photos), by the same rule as view_count_estimated.
share_count_estimatedWhether share_count is an approximate figure (photos), by the same rule as view_count_estimated.
author_follower_count_estimatedWhether author_follower_count is an approximate figure (photos), by the same rule as view_count_estimated.
author_following_count_estimatedWhether author_following_count is an approximate figure (photos), by the same rule as view_count_estimated.
author_like_count_estimatedWhether author_like_count is an approximate figure (photos), by the same rule as view_count_estimated.
author_video_count_estimatedWhether author_video_count is an approximate figure (photos), by the same rule as view_count_estimated.
is_ad動画が広告かどうか。検索結果では通常含まれず、user_videosの結果では含まれない場合があります。
is_privateアカウントが非公開かどうか。
is_aigcWhether the post is AI-generated content (photos).
comments_disabledWhether comments are turned off on the post (photos).
duet_enabledWhether Duet is allowed on the post (photos).
stitch_enabledWhether Stitch is allowed on the post (photos).
hashtags本文中のハッシュタグで、出現順に並びます。ない場合はフィールド自体が含まれません。
mentionsAccounts mentioned with @ in the post (photos).
suggested_wordsSuggested words on the post (photos).
platform取得元プラットフォームの識別子で、リクエストのplatformと同じです(例:xiaohongshu、tiktok)。

エラーと課金

#
401
キーが未指定か無効です。
402
残高が不足しています。先にチャージしてください。
422
パラメータ名または値が無効です。エラーに含まれる候補を参考に修正してください。課金はされません。
429
1分あたりのリクエスト上限に達しました。Retry-Afterの指定に従って待ってから再試行してください。
503
処理を完了できませんでした。保留中の請求額は残高に戻されます。結果が不明な場合は、再試行する前に確認してください。
200(空)
データがありません。課金はされません。

エラー

Google Analyticsは同意が必要 プライバシー