List of available tags
Returns a list of existing tags available to the user.
Request syntax
https://api-metrika.yandex.net/management/v1/counters
? [callback=<string>]
& [counter_ids=<list>]
& [favorite=<boolean>]
& [field=<string>]
& [label_id=<integer>]
& [offset=<int>]
& [per_page=<int>]
& [permission=<string>]
& [reverse=<boolean>]
& [robots=<boolean>]
& [search_string=<string>]
& [sort=<counters_sort>]
& [status=<counter_status>]
& [type=<counter_type>]
callback | Callback function that processes the API response. |
counter_ids | List of IDs of tags you want to get. |
favorite | Filter by tags that were added to Favorites. Default value: 0 |
field | One or several additional parameters of a returned object. The names of the additional parameters are specified in any order, separated by commas, without spaces. For example: |
label_id | Filter by tag. |
offset | Serial number of the tag to start the list of tags. The first tag has the number 1. Default value: 1 |
per_page | Number of tags that you want to receive. Default value: 1000 |
permission | Filter by level of access to the tag. Parameter can contain several values, separated by commas. Acceptable values:
|
reverse | Display tags in ascending or descending order. Default value: true |
robots | Whether to include robot sessions The default value is true. |
search_string | Filter by string. You can specify:
The response will include tags that have the specified substring in their name, site, or mirrors. When filtering by ID, specify the full ID. |
sort | Sorting. Default value: Default Acceptable values:
|
status | Filter by tag status. Enabled by default. Default value: Active Acceptable values:
|
type | Filter by tag type. Acceptable values:
|
callback | Callback function that processes the API response. |
counter_ids | List of IDs of tags you want to get. |
favorite | Filter by tags that were added to Favorites. Default value: 0 |
field | One or several additional parameters of a returned object. The names of the additional parameters are specified in any order, separated by commas, without spaces. For example: |
label_id | Filter by tag. |
offset | Serial number of the tag to start the list of tags. The first tag has the number 1. Default value: 1 |
per_page | Number of tags that you want to receive. Default value: 1000 |
permission | Filter by level of access to the tag. Parameter can contain several values, separated by commas. Acceptable values:
|
reverse | Display tags in ascending or descending order. Default value: true |
robots | Whether to include robot sessions The default value is true. |
search_string | Filter by string. You can specify:
The response will include tags that have the specified substring in their name, site, or mirrors. When filtering by ID, specify the full ID. |
sort | Sorting. Default value: Default Acceptable values:
|
status | Filter by tag status. Enabled by default. Default value: Active Acceptable values:
|
type | Filter by tag type. Acceptable values:
|
Sample request
https://api-metrika.yandex.net/management/v1/counters
Response format
{
"rows" : < int > ,
"counters" : [ {
"id" : < int > ,
"status" : < counter_status > ,
"owner_login" : < string > ,
"code_status" : < string > ,
"activity_status" : < counter_activity_status > ,
"name" : < string > ,
"site2" : {
"site" : < string >
},
"type" : < counter_type > ,
"favorite" : < boolean > ,
"gdpr_agreement_accepted" : < boolean > ,
"permission" : < counter_permission > ,
"mirrors2" : [ {
"site" : < string >
}, ... ],
"goals" : [ < goal > , ... ],
"filters" : [ {
"id" : < int > ,
"attr" : < filter_attribute > ,
"type" : < filter_type > ,
"value" : < string > ,
"action" : < filter_action > ,
"status" : < filter_status > ,
"start_ip" : < string > ,
"end_ip" : < string > ,
"with_subdomains" : < boolean >
}, ... ],
"operations" : [ {
"id" : < int > ,
"action" : < operation_type > ,
"attr" : < operation_attribute > ,
"value" : < string > ,
"status" : < operation_status >
}, ... ],
"grants" : [ {
"user_login" : < string > ,
"user_uid" : < long > ,
"perm" : < grant_type > ,
"created_at" : < date > ,
"comment" : < string > ,
"partner_data_access" : < boolean >
}, ... ],
"labels" : [ {
"id" : < int > ,
"name" : < string >
}, ... ],
"webvisor" : {
"urls" : < string > ,
"arch_enabled" : < boolean > ,
"arch_type" : < webvisor_arch_type > ,
"load_player_type" : < webvisor_load_player_type > ,
"wv_version" : < integer > ,
"wv_forms" : < boolean >
},
"code_options" : {
"async" : < boolean > ,
"informer" : {
"enabled" : < boolean > ,
"type" : < informer_type > ,
"size" : < integer > ,
"indicator" : < informer_metric > ,
"color_start" : < string > ,
"color_end" : < string > ,
"color_text" : < integer > ,
"color_arrow" : < integer >
},
"visor" : < boolean > ,
"track_hash" : < boolean > ,
"xml_site" : < boolean > ,
"clickmap" : < boolean > ,
"in_one_line" : < boolean > ,
"ecommerce" : < boolean > ,
"alternative_cdn" : < boolean >
},
"create_time" : < date > ,
"time_zone_name" : < string > ,
"time_zone_offset" : < int > ,
"source" : < counter_source >
}, ... ]
}
Parameters | Description |
---|---|
rows | Number of tags that match the request, excluding the offset and per_page parameters. |
counters | List of tags. |
counters | |
id | Tag ID. |
status | Tag status. Possible values:
|
owner_login | Login of the tag owner. |
code_status | Code snippet installation status. Attention. The parameter is deprecated, don't use it when working with data. The value returned is always CS_ERR_UNKNOWN (unknown error). In the future, code_status will be deleted. |
activity_status | Tag traffic. |
name | Tag name. |
site2 | Full site domain. |
type | Counter type. Possible values:
|
favorite | Whether the tag is added to favorites. Possible values:
|
gdpr_agreement_accepted | Acceptance of the “Yandex Metrica” Data Processing Agreement. Possible values:
|
permission | Level of access to the tag. Possible values:
|
mirrors2 | List of site mirrors (domains). |
goals | List of structures with information on tag goals. |
filters | List of structures with information on tag filters. |
operations | List of structures with information on tag actions. |
grants | List of structures with information on access rights to the tag. |
labels | List of structures with information on tags. |
session replay | Structure with information on Session Replay settings. |
code_options | Code snippet settings. |
create_time | Date and time when the tag was created. |
time_zone_name | Time zone for calculating statistics. |
time_zone_offset | Current time zone offset from Greenwich, minutes. |
source | Tag type. |
site2 | |
site | Full site domain. |
mirrors2 | |
site | Full site domain. |
filters | |
id | Filter ID. Specify this parameter when changing a tag filter |
attr | Type of data to apply the filter to. Possible values:
|
type | Filter type or action for filter. Possible values:
|
value | Filter value. |
action | Filter type. Possible values:
|
status | Filter status. Possible values:
|
start_ip | First IP address in the range. |
end_ip | Last IP address in the range. |
with_subdomains | Filter by subdomains. |
operations | |
id | Action ID (needs to be specified while changing a tag action). |
action | Action type. Possible values:
|
attr | Field for filtering. Possible values:
|
value | Value for replacement. |
status | Action status. Possible values:
|
grants | |
user_login | Login of a user with tag management rights. This parameter contains an empty string if tag statistics are in public access ( |
user_uid | uid of a user with tag management rights. Parameter is 0 if tag statistics are in public access ( |
perm | Permission level. Possible values:
|
created_at | Date when the permission was granted in YYYY-MM-DD'T'hh:mm:ssZ format. |
comment | Arbitrary comment. The maximum number of characters is 255. |
partner_data_access | Access to the Monetization report group. The user can view reports and add dimensions and metrics from the Monetization group to other reports. If the user has edit rights, reports from the Monetization group are already available to them. Possible values:
|
labels | |
id | Label ID. |
name | Label name. |
webvisor | |
urls | List of pages for saving. |
arch_enabled | Saving site pages. Possible values:
|
arch_type | Recording page content. Possible values:
|
load_player_type | Loading pages in the player. Possible values:
|
wv_version | Session Replay version. |
wv_forms | Records the content of fields and forms. Possible values:
|
code_options | |
async | Asynchronous code snippet. Possible values:
|
informer | Informer settings. |
visor | Record and analysis of site user behavior. Possible values:
|
track_hash | Hash tracking in the browser address bar. The option applies to AJAX sites. Possible values:
|
xml_site | For XML sites. The "noscript" element cannot be used in XML documents. Possible values:
|
clickmap | Gathering statistics for the Click Map report. Possible values:
|
in_one_line | Print code snippet as a single string. Possible values:
|
ecommerce | Collecting E-commerce data. Possible values:
|
alternative_cdn | Allows you to correctly register sessions from regions in which access to Yandex resources is restricted. It might take longer to load the tag code when using this option. Possible values:
|
informer | |
enabled | Permission to display the informer. Possible values:
|
type | Informer type. Possible values:
|
size | Informer size. Possible values:
|
indicator | Parameter to be displayed on the informer. Possible values:
|
color_start | Beginning (top) color of the informer in RRGGBBAA format. RR, GG, BB are saturated red, green, and blue colors. The level of saturation for every color is set with a value ranging from 00 to FF. AA is transparency from 00 (transparent) to FF (opaque). |
color_end | Ending (bottom) color of the informer in RRGGBBAA format. The parameter is intended for creating background gradient. Color saturation and transparency are set the same way as with the "color_start" parameter. |
color_text | Color of the text in the informer. Possible values:
|
color_arrow | Color of the arrow in the informer. Possible values:
|
Parameters | Description |
---|---|
rows | Number of tags that match the request, excluding the offset and per_page parameters. |
counters | List of tags. |
counters | |
id | Tag ID. |
status | Tag status. Possible values:
|
owner_login | Login of the tag owner. |
code_status | Code snippet installation status. Attention. The parameter is deprecated, don't use it when working with data. The value returned is always CS_ERR_UNKNOWN (unknown error). In the future, code_status will be deleted. |
activity_status | Tag traffic. |
name | Tag name. |
site2 | Full site domain. |
type | Counter type. Possible values:
|
favorite | Whether the tag is added to favorites. Possible values:
|
gdpr_agreement_accepted | Acceptance of the “Yandex Metrica” Data Processing Agreement. Possible values:
|
permission | Level of access to the tag. Possible values:
|
mirrors2 | List of site mirrors (domains). |
goals | List of structures with information on tag goals. |
filters | List of structures with information on tag filters. |
operations | List of structures with information on tag actions. |
grants | List of structures with information on access rights to the tag. |
labels | List of structures with information on tags. |
session replay | Structure with information on Session Replay settings. |
code_options | Code snippet settings. |
create_time | Date and time when the tag was created. |
time_zone_name | Time zone for calculating statistics. |
time_zone_offset | Current time zone offset from Greenwich, minutes. |
source | Tag type. |
site2 | |
site | Full site domain. |
mirrors2 | |
site | Full site domain. |
filters | |
id | Filter ID. Specify this parameter when changing a tag filter |
attr | Type of data to apply the filter to. Possible values:
|
type | Filter type or action for filter. Possible values:
|
value | Filter value. |
action | Filter type. Possible values:
|
status | Filter status. Possible values:
|
start_ip | First IP address in the range. |
end_ip | Last IP address in the range. |
with_subdomains | Filter by subdomains. |
operations | |
id | Action ID (needs to be specified while changing a tag action). |
action | Action type. Possible values:
|
attr | Field for filtering. Possible values:
|
value | Value for replacement. |
status | Action status. Possible values:
|
grants | |
user_login | Login of a user with tag management rights. This parameter contains an empty string if tag statistics are in public access ( |
user_uid | uid of a user with tag management rights. Parameter is 0 if tag statistics are in public access ( |
perm | Permission level. Possible values:
|
created_at | Date when the permission was granted in YYYY-MM-DD'T'hh:mm:ssZ format. |
comment | Arbitrary comment. The maximum number of characters is 255. |
partner_data_access | Access to the Monetization report group. The user can view reports and add dimensions and metrics from the Monetization group to other reports. If the user has edit rights, reports from the Monetization group are already available to them. Possible values:
|
labels | |
id | Label ID. |
name | Label name. |
webvisor | |
urls | List of pages for saving. |
arch_enabled | Saving site pages. Possible values:
|
arch_type | Recording page content. Possible values:
|
load_player_type | Loading pages in the player. Possible values:
|
wv_version | Session Replay version. |
wv_forms | Records the content of fields and forms. Possible values:
|
code_options | |
async | Asynchronous code snippet. Possible values:
|
informer | Informer settings. |
visor | Record and analysis of site user behavior. Possible values:
|
track_hash | Hash tracking in the browser address bar. The option applies to AJAX sites. Possible values:
|
xml_site | For XML sites. The "noscript" element cannot be used in XML documents. Possible values:
|
clickmap | Gathering statistics for the Click Map report. Possible values:
|
in_one_line | Print code snippet as a single string. Possible values:
|
ecommerce | Collecting E-commerce data. Possible values:
|
alternative_cdn | Allows you to correctly register sessions from regions in which access to Yandex resources is restricted. It might take longer to load the tag code when using this option. Possible values:
|
informer | |
enabled | Permission to display the informer. Possible values:
|
type | Informer type. Possible values:
|
size | Informer size. Possible values:
|
indicator | Parameter to be displayed on the informer. Possible values:
|
color_start | Beginning (top) color of the informer in RRGGBBAA format. RR, GG, BB are saturated red, green, and blue colors. The level of saturation for every color is set with a value ranging from 00 to FF. AA is transparency from 00 (transparent) to FF (opaque). |
color_end | Ending (bottom) color of the informer in RRGGBBAA format. The parameter is intended for creating background gradient. Color saturation and transparency are set the same way as with the "color_start" parameter. |
color_text | Color of the text in the informer. Possible values:
|
color_arrow | Color of the arrow in the informer. Possible values:
|