> ## 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.

# v3 Audience Wave Counts Query

> Returns sample for waves.



## OpenAPI

````yaml post /v3/query/audience_wave_counts
openapi: 3.0.0
info:
  title: Audience Wave Counts Query v3
  description: Query to show audience across waves.
  version: 2.0.0
servers:
  - url: https://api.globalwebindex.com
security: []
paths:
  /v3/query/audience_wave_counts:
    post:
      tags:
        - Query
      summary: v3 Audience Wave Counts Query
      description: Returns sample for waves.
      operationId: AudienceWaveCountsV3
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AudienceWaveCountsQuery'
        description: Returns sample for waves.
        required: true
      responses:
        '200':
          description: Correct results for given expression.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudienceWaveCountsResults'
        '400':
          description: Invalid query in request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Auth bearer doesn't have permissions to access this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '403':
          description: >-
            Auth bearer doesn't have permissions to access some codes in
            requested query.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '500':
          description: Server is not able to give correct response.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AudienceWaveCountsQuery:
      type: object
      description: Query containing audience expression.
      title: Query
      required:
        - expression
      properties:
        expression:
          type: object
          description: Audience expression used to get wave counts.
          items:
            $ref: '#/components/schemas/Expression'
        locations:
          type: array
          description: List of location codes to filter.
          items:
            type: string
          example:
            - s2_1
            - s2_44
        waves:
          type: array
          description: List of wave codes to filter.
          items:
            type: string
          example:
            - q1_2019
            - q2_2019
            - q3_2019
            - q4_2019
    AudienceWaveCountsResults:
      type: object
      title: AudienceWaveCountsResults
      properties:
        base_size:
          type: integer
          description: Final weighted universe of total audience.
        base_sample:
          type: integer
          description: Final count of responses of total audience.
        audience_sample:
          type: integer
          description: Final count of responses of the audience.
        audience_size:
          type: integer
          description: Final weighted universe of the audience.
        audience_percentage:
          type: number
          description: Ratio between audience size and base size.
        per_wave_count:
          type: array
          description: Collection of results for each wave.
          items:
            $ref: '#/components/schemas/PerWaveResult'
    BadRequestError:
      type: object
      description: Something is wrong with request content.
      title: Error
      required:
        - error
        - error_type
        - code
      properties:
        error:
          type: string
          description: Description of error.
          example: some_error
        error_type:
          type: string
          example: empty_expression
          description: Machine readable representation of error.
        code:
          type: integer
          description: Numeric representation of error.
          example: 400
        message:
          type: string
          description: Human readable error message
          example: Message readable by customer.
    ForbiddenError:
      type: object
      description: Some content is not permitted.
      title: Error
      required:
        - error
        - error_type
        - code
      properties:
        error:
          type: string
          description: Description of error.
          example: some_error
        error_type:
          type: string
          example: empty_expression
          description: Machine readable representation of error.
        code:
          type: integer
          description: Numeric representation of error.
          example: 403
        meta:
          $ref: '#/components/schemas/ForbiddenErrorMeta'
    Expression:
      type: object
      description: Flexible expression of audience scope.
      title: Expression
      properties:
        and:
          type: array
          description: List of sub-expressions to apply intersection of their scopes.
          items:
            $ref: '#/components/schemas/Expression'
        or:
          type: array
          description: List of sub-expressions to apply union of their scopes.
          items:
            $ref: '#/components/schemas/Expression'
        not:
          type: boolean
          description: To use negation of the expression.
        question:
          type: string
          description: Question code to define datapoint scope.
          example: q2
        datapoints:
          type: array
          description: Datapoint codes to limit scopes of interest.
          items:
            type: string
          example:
            - q2_1
            - q2_2
        suffixes:
          type: array
          description: Suffixes to extend datapoint codes for more detailed responses.
          items:
            type: string
          example:
            - '1'
            - '2'
            - '3'
        min_count:
          type: integer
          description: Minimal count of positive datapoints in one response.
          example: 1
      example:
        and:
          - question: q2
            datapoints:
              - q2_1
              - q2_2
            min_count: 1
            not: false
          - question: q20
            datapoints:
              - q20_2
            min_count: 1
            suffixes:
              - '1'
              - '2'
              - '3'
            not: false
    PerWaveResult:
      type: object
      title: PerWaveResult
      properties:
        code:
          type: string
          description: Wave code.
          example: q2_2019
        name:
          type: string
          description: Wave name.
          example: Q2 2019
        sample:
          type: integer
          description: Final count of responses of the wave.
          example: 10
        percentage:
          type: number
          description: Ratio between audience sample and sample of the wave.
          example: 0.3
    ForbiddenErrorMeta:
      type: object
      description: Additional metadata to aid message/error strings
      properties:
        forbidden_codes:
          type: object
          properties:
            questions:
              type: array
              items:
                $ref: '#/components/schemas/PermissionsQuestion'
            locations:
              type: array
              items:
                type: string
              example:
                - s2_44
            waves:
              type: array
              items:
                type: string
              example:
                - q1_2019
    PermissionsQuestion:
      type: object
      properties:
        code:
          type: string
          example: q2
        datapoints:
          type: array
          items:
            type: string
          example:
            - q1_1
        origin:
          type: string
          example: question
          enum:
            - question
            - audience
            - splitter

````