メインコンテンツまでスキップ

コメントブースト(返信)スクリプト設定

このページでは、タスク作成で使用する boost_comment スクリプトの設定パラメータについて説明します。

どちらのスクリプトが必要ですか?

2 つの異なるコメントスクリプトがあり、動作はそれぞれ異なります。

  • comment — 投稿に新しいトップレベルのコメントを投稿します。コメントスクリプト設定を参照してください。
  • boost_comment(このページ)— 既存のコメントにいいね/返信します。これが "REPLY COMMENT"(コメントへの返信)/「Boost Comments」機能です。

コメントに返信したい場合は、このページが正解です。

概要

boost_comment スクリプトは投稿を開き、そのトップコメントに対して操作します — コメントへのいいね、コメントへの返信、またはその両方が可能です。アプリ内の Boost Comments ダイアログの API 版に相当します。

comment スクリプトとは異なり、boost_comment スクリプトは1 回のタスク実行内ですべての対象 URL を処理します(内部で target_comment_urls を改行で分割し、順番に処理します)。タスクはデバイスごと(シリアルモード)またはアカウントごと(ユーザー名/マルチアカウントモード)に作成され、URL ごとではありません

スクリプト設定 (script_config)

パラメータ

パラメータ必須デフォルト説明
target_comment_urlsstringはい""トップコメントを操作する対象の投稿 URL。複数の URL は改行(\n)で区切ります。
enable_like_commentbooleanはい*false各投稿のトップコメントにいいねします。
enable_reply_commentbooleanはい*false各投稿のトップコメントに返信します。
reply_contentsstringenable_reply_commenttrue の場合は必須""返信テキスト。複数の返信候補は改行(\n)で区切り、reply_order に従ってタスクごとに 1 つ選択されます。
reply_orderstringいいえ"random"reply_contents からの返信の選び方:random(ランダム)または sequential(順番)。
insert_emojibooleanいいえfalse返信にランダムな絵文字を挿入します。
usernamestringいいえ""実行前にこのアカウントに切り替えます。省略した場合、デバイスで現在アクティブなアカウントを使用します。
少なくとも 1 つのアクションが必要です

少なくとも 1 つのアクションを有効にする必要があります:enable_like_comment および/または enable_reply_commenttrue に設定してください。enable_reply_commenttrue の場合、reply_contents は空にできません。そうでない場合、API はエラー 40001 を返します。

どのコメントが操作されますか?

スクリプトは各投稿のトップ(最初の)コメントを操作します。target_comment_urls には投稿 URL を指定してください — 個別コメントへの直接リンクは不要です。

コメントに返信する(最も一般的なケース)

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "boost_comment",
"script_config": {
"target_comment_urls": "https://www.tiktok.com/@username/video/1234567890",
"enable_reply_comment": true,
"reply_contents": "Great point!\nI totally agree!\nThanks for sharing 🙌"
}
}'

返信は reply_contents の 3 行から選択されます(デフォルトはランダム)。

いいねと返信を同時に行う

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "boost_comment",
"script_config": {
"target_comment_urls": "https://www.tiktok.com/@username/video/1234567890",
"enable_like_comment": true,
"enable_reply_comment": true,
"reply_contents": "Couldn'\''t agree more!\nWell said!",
"reply_order": "sequential",
"insert_emoji": true
}
}'

1 つのタスクで複数の投稿のコメントを操作する

URL を改行で区切ります。すべて 1 つのタスク内で処理されます:

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "boost_comment",
"script_config": {
"target_comment_urls": "https://www.tiktok.com/@user1/video/111\nhttps://www.tiktok.com/@user2/video/222\nhttps://www.tiktok.com/@user3/video/333",
"enable_reply_comment": true,
"reply_contents": "Love this!\nAmazing!\nSo true!",
"reply_order": "random"
}
}'

いいねのみ(返信なし)

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "boost_comment",
"script_config": {
"target_comment_urls": "https://www.tiktok.com/@username/video/1234567890",
"enable_like_comment": true
}
}'

特定のアカウントで実行する(ユーザー名モード)

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"usernames": ["@my_account1", "@my_account2"],
"script_name": "boost_comment",
"script_config": {
"target_comment_urls": "https://www.tiktok.com/@target/video/123",
"enable_reply_comment": true,
"reply_contents": "Nice!\nGreat content!"
}
}'

アカウントごとに 1 つのタスクが作成され、それぞれ実行前にそのアカウントに切り替えます。

Instagram の例

同じ API が Instagram の投稿にも使えます:

curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "boost_comment",
"script_config": {
"target_comment_urls": "https://www.instagram.com/p/ABC123/",
"enable_reply_comment": true,
"reply_contents": "Beautiful! 😍\nLove it!"
}
}'

レスポンス

{
"code": 0,
"message": "success",
"data": {
"task_ids": [301],
"created_count": 1
}
}

返信の順序

ランダム順 (random)

  • タスクごとに reply_contents から返信を 1 つランダムに選択します。
  • 返信をより自然に見せるのに適しています。
  • デフォルトの動作です。

順番モード (sequential)

  • タスクのインデックス(job_count)で返信を選択します:最初のタスクは 1 行目、2 番目のタスクは 2 行目、というように進み、末尾に達すると先頭に戻ります。
  • 複数のデバイス/アカウントに異なる返信を分散させるのに適しています。

投稿 URL の形式

TikTok

https://www.tiktok.com/@username/video/1234567890123456
https://vm.tiktok.com/ABCDEFG/

Instagram

https://www.instagram.com/p/ABCDEFGHIJK/
https://www.instagram.com/reel/ABCDEFGHIJK/

commentboost_comment の違い

commentboost_comment
動作新しいトップレベルのコメントを投稿既存のコメントにいいね/返信
主な入力target_post_url(s) + comment_contenttarget_comment_urls + reply_contents
タスクの分割URL ごとに 1 タスクデバイス/アカウントごとに 1 タスク(すべての URL を 1 回で処理)
ドキュメントコメントスクリプトこのページ

ベストプラクティス

  1. 返信に変化を持たせるreply_contents に複数行を用意し、アカウント間で返信が同一にならないようにします。
  2. アカウント間で順番モードを使うsequential 順を複数のデバイス/アカウントと組み合わせて、異なる返信を分散させます。
  3. 絵文字の挿入を有効にするinsert_emoji: true を設定して返信をより自然にします。
  4. プラットフォームの制限を尊重する:返信が過度に積極的だとレート制限が発生する可能性があります。タスクを時間的に分散させてください。

エラーコード

コード説明
40001target_comment_urls の欠落、アクションが未有効、または enable_reply_comment が true で reply_contents が空
40003スクリプトは API 経由ではサポートされていません
40301API アクセスには Pro+ プランが必要です

関連項目