InstagramComment translationsAPI
POST
APIの稼働状況
- 24時間の稼働状況
- 正常
- 良好/正常
- 利用可能
- 制限あり
- ほぼ停止
正常
過去24時間
過去30日間
Translate up to 10 comments on one Instagram post, from the post url and comment_ids, into target_language (default en). One row per comment found; one call is billed once.
POST https://api.everyinfra.com/api/v1/socialを送信し、platformにinstagram、actionにcomment_translationsを指定します。 料金は1,000リクエストあたり$6.39(1回あたり$0.006389)です。失敗した呼び出しと空の結果には課金されません。 同期処理です。時間のかかるジョブでは、ボディに"mode": "async"を追加し、job_idを取得してポーリングしてください。
AIプロンプト
#EveryInfraのInstagram Comment translationsエンドポイント(instagram/comment_translations)を使ったデータ収集スクリプトの作成を手伝ってください。
エンドポイントの仕組み:
- リクエスト:ヘッダーにAuthorization: Bearer <API key>を指定して、https://api.everyinfra.com/api/v1/socialにPOSTします。APIキーは環境変数EVERYINFRA_API_KEYから読み込み、ハードコードしないでください。
- リクエストボディでplatformにinstagram、actionにcomment_translationsを指定し、パラメータはparamsの中に入れます。
- 必須パラメータ:
- url: The post or Reel the comments are on, as a link such as https://www.instagram.com/p/<shortcode>/ or https://www.instagram.com/reel/<shortcode>/.
- comment_ids: The comments to translate, as an array of 1 to 10 IDs with no repeats, from the id in comments or comment_replies results. Only about the first 150 comments on the post are searched; comments not found have no row.
- 任意パラメータ:
- target_language: The language to translate into, as a language code such as en, zh-CN, zh-TW, ja, ko, es, pt-BR, fr or de. Defaults to en.
- レコードのリストを返します。各レコードの主なフィールド: comment_id((comment_translations) The numeric comm…)、text、translation(The machine translation)、source_language(The detected language code of the origi…)、target_language(The language code translated into: the…)、author_username、posted_at、url、post_url(投稿のリンク).
- リクエストボディの例:
{
"platform": "instagram",
"action": "comment_translations",
"params": {
"url": "https://www.instagram.com/p/DbiL3SDoJzV/",
"comment_ids": [
"18012025586749566"
]
}
}
- 料金:1,000リクエストあたり$6.39。失敗時および結果が空の場合は課金されません。
- 対象が数十〜数百件ある場合は、ボディに"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 | はい | instagram | プラットフォームの識別子です。値は固定です。 |
action | body | string | はい | comment_translations | 機能の識別子です。値は固定です。 |
url | body.params | string | はい | - | The post or Reel the comments are on, as a link such as https://www.instagram.com/p/<shortcode>/ or https://www.instagram.com/reel/<shortcode>/. |
comment_ids | body.params | array | はい | - | The comments to translate, as an array of 1 to 10 IDs with no repeats, from the id in comments or comment_replies results. Only about the first 150 comments on the post are searched; comments not found have no row. |
target_language | body.params | string | いいえ | - | The language to translate into, as a language code such as en, zh-CN, zh-TW, ja, ko, es, pt-BR, fr or de. Defaults to en. |
コードサンプル
#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": "instagram",
"action": "comment_translations",
"params": {
"url": "https://www.instagram.com/p/DbiL3SDoJzV/",
"comment_ids": [
"18012025586749566"
]
}
}'OpenAPI定義(JSON)サンプルは環境変数EVERYINFRA_API_KEYからAPIキーを読み込みます。コピーしたコードにAPIキーが含まれることはありません。
レスポンス例
#November 21, 2026 at 08:10(UTC)に、上のコードサンプルのパラメータでこのAPIを呼び出して取得しました。resultsとcountはその呼び出しの実際のレスポンスから個人情報(名前、ハンドル、アバター、プロフィールリンク、連絡先)を削除したものです。id、billing、quotaは呼び出しごとに異なるため、構造のみを示しています。
json
{ "id": "req_…", "platform": "instagram", "action": "comment_translations", "results": [ { "comment_id": "•••", "text": "El equilibrio y la fuerza de zona media de ese pibe es increíble", "translation": "That kid's balance and core strength are incredible", "source_language": "es", "target_language": "en", "author_username": "p•••l", "posted_at": "2026-08-30T21:47:16+00:00", "url": "https://www.instagram.com/reel/DbiL3SDoJzV/c/18012025586749566/", "post_url": "https://www.instagram.com/reel/DbiL3SDoJzV/", "platform": "instagram" } ], "count": 1, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
レスポンスフィールド
#業務データはresultsに含まれます。この表はレコードに含まれうるフィールドの一覧です。プラットフォームに表示されない値を作り出すことはありません。
| フィールド | 意味 |
|---|---|
comment_id | (comment_translations) The numeric comment ID, one of the comment_ids you passed. |
text | HTMLを除去した本文です。省略されることなく全文が返されます(一部のプラットフォームでは一覧結果自体に抜粋しか含まれません。その場合は各プラットフォームのフィールドの注記に記載しています)。 |
translation | The machine translation. Absent when the post has no caption. |
source_language | The detected language code of the original text, such as en; und when it cannot be detected. |
target_language | The language code translated into: the target_language you passed, or en. |
author_username | 投稿者のユーザー名(@ハンドル)で、通常はURLに使用できます。 |
posted_at | 投稿日時です。ISO 8601形式のUTCで返されます(例:2026-08-07T12:34:56+00:00)。プラットフォームから非標準の文字列が返された場合はそのまま渡されるため、パース処理は堅牢に実装してください。nullはプラットフォームが公開していないことを示します。 |
url | プラットフォーム上のレコードへのリンクです。 |
post_url | 投稿のリンク。 |
platform | 取得元プラットフォームの識別子で、リクエストのplatformと同じです(例:xiaohongshu、tiktok)。 |
エラーと課金
#- 401
- キーが未指定か無効です。
- 402
- 残高が不足しています。先にチャージしてください。
- 422
- パラメータ名または値が無効です。エラーに含まれる候補を参考に修正してください。課金はされません。
- 429
- 1分あたりのリクエスト上限に達しました。Retry-Afterの指定に従って待ってから再試行してください。
- 503
- 処理を完了できませんでした。保留中の請求額は残高に戻されます。結果が不明な場合は、再試行する前に確認してください。
- 200(空)
- データがありません。課金はされません。