Link Page to Competitor
sonar_ad_spy_linkWRITE tool — confirm which Facebook page or TikTok account belongs to a competitor. Only call it after the user picked the candidate (the mapping is shared by every Sonar account). Accepts only candidates this account's own scans or searches returned in the last 2 days. Spends no lookup; then use sonar_ad_spy_refresh to fetch the ads. Requires an Indie or Agency plan (a trial counts) and an authorized Sonar account or an API key with the write scope.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"competitor_id": "<competitor_id>",
"channel": "<channel>"
},
"name": "sonar_ad_spy_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | "meta" links a Facebook page, "tiktok" a TikTok account. | |
| page_id | No | Channel meta: `page_id` of a candidate from sonar_ad_spy_scan or sonar_ad_spy_search_pages. | |
| user_id | No | Channel tiktok: `user_id` of a candidate from sonar_ad_spy_scan. | |
| account_id | No | Channel tiktok: an account already linked elsewhere in this account (alternative to user_id). | |
| advertiser_id | No | Channel meta: a page this account already sees (alternative to page_id). | |
| competitor_id | Yes | Sonar app id of a tracked competitor (an `app_id` from sonar_ad_spy_competitors), or its store id. |