project_id | string or SelectItem | Yes | - | The Rank Tracker project (numeric ID from the Ahrefs project URL). Use ahrefs_list_projects to find it. |
action | string or SelectableOption | No | add | ’add’ (default) starts tracking the keywords in the given country/location/language; ‘remove’ stops tracking them; ‘add_tags’ appends tags to the keywords; ‘replace_tags’ overwrites their tags; ‘remove_tags’ removes the given tags from them. |
keywords | array of string or string | Yes | - | Keywords to act on. Accepts a list or a newline/comma-separated string. |
country | string or SelectableOption | No | us | Two-letter country code the keywords are (or will be) tracked in. Defaults to us. |
location_id | integer | No | - | Track at city or region level instead of the whole country: a location ID from ahrefs_get_locations. Leave empty for the country. |
language | string | No | - | Language code (e.g. en, de) from ahrefs_get_locations. Leave empty for the project’s default. |
tags | string or array of string | No | - | Tags: assigned to the keywords on ‘add’, and required for the tag actions. Accepts a list or a comma-separated string. |