> ## Documentation Index
> Fetch the complete documentation index at: https://api.globalwebindex.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Guide

## Authorization

Authorization in V2 API is same as in V1 API, i.e. authorization token is used. For more information refer to [Authorization](#section/Quickstart-Guide/Authorization).

In addition, the V1 API [current\_user endpoint](https://gwiapi.docs.apiary.io/#reference/authorization/current-user/current-user) is replaced by [token validation endpoint](#tag/Authorization/operation/TokenValidation).

## Audiences

Work with Audiences in V2 API is similar to [V1 API](https://gwiapi.docs.apiary.io/#reference/audiences). However, there are several changes between V1 and V2 API:

* The V1 API `shared` attribute is discontinued.

* The V1 API `created_at` attribute is discontinued.

* The V1 API `type` attribute is discontinued.

* The V1 API `curated` attribute is discontinued. However, this information is present in the `flags` attribute in V2 API.

* The V1 API `folder` attribute is renamed to `folder_id` in V2 API.

* The V1 API `options` attribute in `expression` attribute is renamed to `datapoints` in V2 API.

Please, for more details on V2 API Audience endpoints refer to [the Audiences chapter](#tag/Audiences)

## Audience Folders

The [V1 Audience Folders endpoint](https://gwiapi.docs.apiary.io/#reference/audience-folders/current-user) is discontinued. In case you are missing this endpoint, please contact your account manager with the use case.

## Questions

[The way how questions are retrieved in V1 API](https://gwiapi.docs.apiary.io/#reference/questions/list) is now discontinued. In V2 API questions must be retrieved in a step by step way by traversing Categories tree as described in section [Basic Calculation Query](#section/Quickstart-Guide/Basic-Calculation-Query).

In addition, list of datapoints and suffixes for an individual question is retrieved separately using one of the below endpoints:

* [v2 Questions Filter](#tag/Questions/operation/v2QuestionsFilter)

* [v2 Question Detail](#tag/Questions/operation/v2QuestionDetail)

Note: the `available_options` attribute from V1 API was renamed to `datapoints` in V2 API.

## Categories

[The way how categories are retrieved in V1 API](https://gwiapi.docs.apiary.io/#reference/categories/list) is now discontinued. In V2 API categories must be retrieved in a step by step way by traversing Categories tree as described in section [Basic Calculation Query](#section/Quickstart-Guide/Basic-Calculation-Query).

## Waves

The legacy V1 API was designed at the time when GWI was offering only 1 syndicated study: GWI Core. Because of that [V1 API Waves endpoint](https://gwiapi.docs.apiary.io/#reference/waves) returns all waves that an API user has access to.

However, now GWI offers several syndicated studies and also custom studies. That's why [the V2 API Waves endpoint](#tag/Waves/operation/v2WavesFilter) is based on [namespaces](#question-namespace).

In general each namespace can have its own unique set of waves. That's why [the V2 API Waves endpoint](#tag/Waves/operation/v2WavesFilter) request contains a list of namespaces an API user wants to receive waves for. In case the list of namespaces in the request filter is empty, all combinations of namespaces and waves will be returned.

For detailed information refer to [the v2 Waves Filter section](#tag/Waves/operation/v2WavesFilter).

## Locations

The legacy V1 API was designed at the time when GWI was offering only 1 syndicated study: GWI Core. Because of that [V1 API Locations endpoint](https://gwiapi.docs.apiary.io/#reference/locations) returns all locations that an API user has access to.

However, now GWI offers several syndicated studies and also custom studies. That's why [the V2 API Locations endpoint](#tag/Locations/operation/v2LocationsFilter) is based on [namespaces](#question-namespace) and [waves](#tag/Waves/operation/v2WavesFilter).

In general each namespace and wave couple can have its own unique set of locations. That's why [the V2 API Locations endpoint](#tag/Locations/operation/v2LocationsFilter) request contains a list of namespace(s) and wave(s) an API user wants to receive locations for. Both the list of waves and list of namespaces are optional parameters. In case the list of waves is empty, all waves and locations combinations will be returned for the provided list of namespaces. In case both the list of namespaces and waves are empty, all combinations of namespaces, waves and locations will be returned.

For detailed information refer to [the v2 Locations Filter section](#tag/Locations/operation/v2LocationsFilter).

## Multipliers a.k.a. Splitters

V1 API multipliers are renamed to splitters in V2 API.

The legacy V1 API was designed at the time when GWI was offering only 1 syndicated study: GWI Core. Because of that [V1 API Multipliers endpoint](https://gwiapi.docs.apiary.io/#reference/multipliers) returns all multipliers that an API user has access to.

However, now GWI offers several syndicated studies and also custom studies. That's why [the V2 API Splitters endpoint](#tag/Splitters/operation/v2SplittersFilter) is based on [namespaces](#question-namespace).

In general each namespace can have its own unique set of splitters. That's why [the V2 API Splitters endpoint](#tag/Splitters/operation/v2SplittersFilter) request contains a list of namespaces an API user wants to receive splitters for. In case the list of namespaces is empty, all combinations of namespaces and splitters will be returned.

For detailed information refer to [the v2 Splitters Filter section](#tag/Splitters/operation/v2SplittersFilter).

## Bookmarks

The [V1 Bookmarks endpoint](https://gwiapi.docs.apiary.io/#reference/bookmarks/current-user) is discontinued. In case you are missing this endpoint, please contact your account manager with the use case.

## Saved Queries

The [V1 Saved Queries endpoint](https://gwiapi.docs.apiary.io/#reference/saved-queries/current-user) is discontinued. In case you are missing this endpoint, please contact your account manager with the use case.

## Query

[V1 API Query](https://gwiapi.docs.apiary.io/#reference/query) is renamed to [Stats Query](#tag/Query/operation/StatsQuery) in V2 API.

[V1 API Query](https://gwiapi.docs.apiary.io/#reference/query) accepts `id` of a [Saved Query](https://gwiapi.docs.apiary.io/#reference/saved-queries). This feature is discontinued. [V2 API Stats Query](#tag/Query/operation/StatsQuery) does not accept `id` of [Saved Query](https://gwiapi.docs.apiary.io/#reference/saved-queries).

Audiences in V1 API Query are represented by audience ID, however, audiences in V2 API Stats Query are represented by [audience expression](#tag/Audiences/operation/v2AudienceCreate).

Some of the V1 API Query attributes are renamed or discontinued in [V2 API Stats Query](#tag/Query/operation/StatsQuery) as described below:

* The `filter.audiences` attribute is `base_audience` attribute in [V2 API Stats Query](#tag/Query/operation/StatsQuery).

* The `filter.locations` attribute is `locations` attribute in [V2 API Stats Query](#tag/Query/operation/StatsQuery).

* The `filter.waves` attribute is `waves` attribute in [V2 API Stats Query](#tag/Query/operation/StatsQuery).

* The `options` attribute is `datapoints` attribute in [V2 API Stats Query](#tag/Query/operation/StatsQuery).

* The `multiplier` attribute is `splitter` attribute in [V2 API Stats Query](#tag/Query/operation/StatsQuery).

* The `split_bases` attribute is `segmented_base` attribute in [V2 API Stats Query](#tag/Query/operation/StatsQuery).

* The `active_options` attribute is discontinued.

* The `metrics` attribute is discontinued.

Some of the V1 API Query Response attributes are renamed or moved in [V2 API Stats Query Response](#tag/Query/operation/StatsQuery) as described below:

* The `data.by_audience`, `data.by_multiplier_segment` and `data.by_audience_and_multiplier_segment` attributes are expressed as the value of the `meta.type` attribute in V2 API Stats Query Response. The `meta.type` attribute can have value: `"DATAPOINTS"`, `"DATAPOINTS-AUDIENCES"`, `"DATAPOINTS-SEGMENTS"` or `"DATAPOINTS-SEGMENTS-AUDIENCES"`.

* All calculation results for V2 API are located in `data` array attribute in `metrics` attribute. In `data` array attribute the `audience`, `datapoint`, `segment`, `suffixes` and `waves` attributes specify the particular `audience/datapoint/segment/suffixes/waves` combination for the calculation results in the `metrics` attribute.

* The calculation results `count` attribute was renamed to `positive_sample`.

* The calculation results `responses_count` attribute was renamed to `positive_sample`.

* The calculation results `horizontal_percentage` attribute was renamed to `datapoint_percentage`.

* The calculation results `percentage` attribute was renamed to `audience_percentage`.

* The calculation results `index` attribute was renamed to `audience_index`.

* The calculation results `weighted_universe_count` attribute was renamed to `positive_size`.

For detailed information refer to [the v2 Stats Query section](#tag/Query/operation/StatsQuery).

Note: V2 API introduced the below calculation queries:

* [Audience Wave Counts Query](#tag/Query/operation/AudienceWaveCounts)

* [Crosstab Query](#tag/Query/operation/AudienceIntersection)

## Fulltext

The [V1 Fulltext endpoint](https://gwiapi.docs.apiary.io/#reference/miscellaneous/fulltext/current-user) is discontinued. In case you are missing this endpoint, please contact your account manager with the use case.
