コメントブースト(返信)スクリプト設定
このページでは、タスク作成で使用する 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_urls | string | はい | "" | トップコメントを操作する対象の投稿 URL。複数の URL は改行(\n)で区切ります。 |
| enable_like_comment | boolean | はい* | false | 各投稿のトップコメントにいいねします。 |
| enable_reply_comment | boolean | はい* | false | 各投稿のトップコメントに返信します。 |
| reply_contents | string | enable_reply_comment が true の場合は必須 | "" | 返信テキスト。複数の返信候補は改行(\n)で区切り、reply_order に従ってタスクごとに 1 つ選択されます。 |
| reply_order | string | いいえ | "random" | reply_contents からの返信の選び方:random(ランダム)または sequential(順番)。 |
| insert_emoji | boolean | いいえ | false | 返信にランダムな絵文字を挿入します。 |
| username | string | いいえ | "" | 実行前にこのアカウントに切り替えます。省略した場合、デバイスで現在アクティブなアカウントを使用します。 |
少なくとも 1 つのアクションを有効にする必要があります:enable_like_comment および/または enable_reply_comment を true に設定してください。enable_reply_comment が true の場合、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/
comment と boost_comment の違い
comment | boost_comment | |
|---|---|---|
| 動作 | 新しいトップレベルのコメントを投稿 | 既存のコメントにいいね/返信 |
| 主な入力 | target_post_url(s) + comment_content | target_comment_urls + reply_contents |
| タスクの分割 | URL ごとに 1 タスク | デバイス/アカウントごとに 1 タスク(すべての URL を 1 回で処理) |
| ドキュメント | コメントスクリプト | このページ |
ベストプラクティス
- 返信に変化を持たせる:
reply_contentsに複数行を用意し、アカウント間で返信が同一にならないようにします。 - アカウント間で順番モードを使う:
sequential順を複数のデバイス/アカウントと組み合わせて、異なる返信を分散させます。 - 絵文字の挿入を有効にする:
insert_emoji: trueを設定して返信をより自然にします。 - プラットフォームの制限を尊重する:返信が過度に積極的だとレート制限が発生する可能性があります。タスクを時間的に分散させてください。
エラーコード
| コード | 説明 |
|---|---|
| 40001 | target_comment_urls の欠落、アクションが未有効、または enable_reply_comment が true で reply_contents が空 |
| 40003 | スクリプトは API 経由ではサポートされていません |
| 40301 | API アクセスには Pro+ プランが必要です |
関連項目
- コメントスクリプト設定 - 投稿に新しいコメントを投稿
- いいねスクリプト設定 - 投稿にいいね
- タスク管理 API - タスクの作成、一覧、管理
- ローカル API 概要 - API の概要とクイックスタート