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

# Get insight details

> Returns an insight with its metadata and the statistics for each answer.



## OpenAPI

````yaml get /v2/spark-api/insights/{id}
openapi: 3.1.0
info:
  title: GWI Spark API v2
  version: 2.0.0
  description: >
    The Spark API gives programmatic access to GWI audience insights: datasets,
    location and timeframe filters, audiences, insights, survey questions, and
    workflow guidance.


    ## Authentication


    Send your API token in the `Authorization` header with every request.


    ## Typical workflow


    1. `GET /datasets` lists the datasets available to your account.

    2. `POST /global-filters` resolves the locations and timeframes in a prompt
    into `location_codes` and `wave_codes`.

    3. `POST /audiences/search` or `POST /audiences/generate` returns audience
    IDs. Use `POST /audiences/join` when you need an intersection or union of
    two or more existing audiences.

    4. `POST /insights/generate` generates insights, with the audience IDs as
    `enforced_audiences` and the codes from step 2.

    5. `GET /insights/{id}` returns the details and statistics of an insight.


    ## Requests


    Request bodies are JSON objects. Required fields must be present, values
    must have the documented type, and fields that are not documented are
    rejected. The maximum request body size is 4 MiB.


    ## Errors


    Errors are returned as problem details as defined in [RFC
    9457](https://www.rfc-editor.org/rfc/rfc9457), with `Content-Type:
    application/problem+json`. Use `type` to identify the error:


    | type | status | meaning |

    |---|---|---|

    | `https://api.globalwebindex.com/docs/spark-api/problems/invalid-request` |
    400 | The request body is not valid JSON. |

    | `https://api.globalwebindex.com/docs/spark-api/problems/invalid-params` |
    422 | The request does not match the request schema (a required field is
    missing, a value has the wrong type, or an unknown field is present), or a
    value is not accepted. |

    | `https://api.globalwebindex.com/docs/spark-api/problems/not-found` | 404 |
    The requested insight, audience, dataset or skill does not exist. |

    | `https://api.globalwebindex.com/docs/spark-api/problems/access-denied` |
    403 | Your account does not have access to the requested dataset or
    audience. |

    | `https://api.globalwebindex.com/docs/spark-api/problems/unprocessable` |
    422 | The request is valid but cannot be processed, for example because the
    datasets, audiences, locations or waves are not compatible. |

    | `https://api.globalwebindex.com/docs/spark-api/problems/timeout` | 504 |
    The request took too long to complete. Retry later. |

    | `https://api.globalwebindex.com/docs/spark-api/problems/cancelled` | 499 |
    The client cancelled the request. |

    | `https://api.globalwebindex.com/docs/spark-api/problems/internal` | 500 |
    An unexpected error occurred. `detail` contains a generic message. |


    A missing or invalid token (401), an unknown path (404) and a request body
    over 4 MiB (413) return a JSON object with a `message` field instead.


    Some endpoints report partial failures within a successful response, for
    example `results[].error` in `POST /insights/generate` and
    `failed_audiences` in `POST /audiences/generate`. These are not returned as
    HTTP errors.


    ## Workflow skills


    `GET /skills` and `GET /skills/{key}` return workflow guides intended for AI
    assistants that use this API. The guides refer to operations by name, and
    use the same field names as the requests and responses documented here. The
    endpoint for each name:


    | Name used in skills | Endpoint |

    |---|---|

    | `list_datasets` | `GET /v2/spark-api/datasets` |

    | `explore_datasets` | `POST /v2/spark-api/datasets/explore` |

    | `global_filters` | `POST /v2/spark-api/global-filters` |

    | `search_audiences` | `POST /v2/spark-api/audiences/search` |

    | `audience_generation` | `POST /v2/spark-api/audiences/generate` |

    | `join_audiences` | `POST /v2/spark-api/audiences/join` |

    | `generate_insights` | `POST /v2/spark-api/insights/generate` |

    | `explore_insight` | `GET /v2/spark-api/insights/{id}` |

    | `explore_taxonomy` | `POST /v2/spark-api/taxonomy/explore` |

    | `list_skills` | `GET /v2/spark-api/skills` |

    | `get_skills` | `GET /v2/spark-api/skills/{key}` |
servers:
  - url: https://api.globalwebindex.com
security: []
tags:
  - name: Datasets
    description: Datasets available to your account.
  - name: Filters
    description: Location and timeframe filters.
  - name: Audiences
    description: Searching and generating audiences.
  - name: Insights
    description: Generating insights and retrieving their details.
  - name: Taxonomy
    description: Survey questions and attributes.
  - name: Skills
    description: Workflow guidance for AI assistants.
paths:
  /v2/spark-api/insights/{id}:
    get:
      tags:
        - Insights
      summary: Get insight details
      description: Returns an insight with its metadata and the statistics for each answer.
      operationId: v2ExploreInsight
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            Insight ID returned by `POST /insights/generate` in
            `results[].insights[].id`.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExploreInsightResponse'
              example:
                id: 381d7b8b-d657-47c6-983f-8e64f7b2847e
                title: GWI Insight
                text: >-
                  16% of Gen Z car owners and future purchasers say an electric
                  vehicle enhances their style and status, making them 167% more
                  likely to cite this advantage than the average car owner or
                  future purchaser.
                is_simulated: false
                metadata:
                  timeframe_groups:
                    - group: 2025 (Q1)
                      details:
                        description: 2025 (Q1)
                        timeframes:
                          - id: q1_2025
                            name: Q1 2025
                  audiences:
                    - id: 259f6394-436c-4801-b83b-bbc926e8b4b9
                      title: 'Generation: Gen Z'
                      description: >-
                        This audience consists of individuals who are part of
                        Gen Z.
                      is_simulated: false
                  location_groups:
                    - group: Europe
                      details:
                        description: Europe
                        locations:
                          - id: s2_44
                            name: UK
                  datasets:
                    - id: ds-core
                      title: GWI Core
                      description: >-
                        Our primary data set on the attitudes and behaviors of
                        digital consumers
                      url: >-
                        https://help.globalwebindex.com/en/collections/11937099-gwi-core
                      is_simulated: false
                    - id: ds-gwi-automotive
                      title: GWI Automotive
                      description: >-
                        Our data set focused on car attitudes, influences and
                        the car purchase journey, among car owners and future
                        purchasers.
                      url: >-
                        https://help.globalwebindex.com/en/articles/10725979-understanding-gwi-automotive
                      is_simulated: false
                  attributes:
                    - question: >-
                        What do you think are the main advantages of owning an
                        electric vehicle? Please select up to three options that
                        most apply
                      answer: >-
                        I believe that owning an electric vehicle is
                        advantageous because it is more
                        environmentally-friendly.
                      percentage: 45
                      sample: 96
                      universe_size: 3589066
                      index: 110.5
                      is_simulated: false
                    - question: >-
                        What do you think are the main advantages of owning an
                        electric vehicle? Please select up to three options that
                        most apply
                      answer: >-
                        I believe owning an electric vehicle enhances my style
                        and status.
                      percentage: 15.800000190734863
                      sample: 28
                      universe_size: 1261097
                      index: 266.6000061035156
                      is_simulated: false
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '500':
          $ref: '#/components/responses/Internal'
        '504':
          $ref: '#/components/responses/Timeout'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ExploreInsightResponse:
      type: object
      properties:
        id:
          type: string
          description: Insight UUID
        title:
          type: string
          description: Insight title
        text:
          type: string
          description: Insight text
        url:
          type: string
          description: >-
            Insight URL on the GWI platform, when your account has access to
            insight links
        is_simulated:
          type: boolean
          description: True when this insight is based on simulated data
        metadata:
          type:
            - 'null'
            - object
          properties:
            timeframe_groups:
              type: array
              items:
                type: object
                properties:
                  group:
                    type: string
                    description: Timeframe group label
                  details:
                    type:
                      - 'null'
                      - object
                    properties:
                      description:
                        type: string
                        description: Group description
                      timeframes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Wave code
                            name:
                              type: string
                              description: Wave name
                          required:
                            - id
                            - name
                          additionalProperties: false
                        description: Waves or periods
                    description: Waves in the group
                    required:
                      - description
                      - timeframes
                    additionalProperties: false
                required:
                  - group
                additionalProperties: false
              description: Survey waves or quarters
            audiences:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: Audience UUID
                  title:
                    type: string
                    description: Audience name
                  description:
                    type: string
                    description: Audience description
                  is_simulated:
                    type: boolean
                    description: True when this audience is based on simulated data
                required:
                  - id
                  - title
                  - description
                  - is_simulated
                additionalProperties: false
              description: Audiences the insight is based on
            location_groups:
              type: array
              items:
                type: object
                properties:
                  group:
                    type: string
                    description: Location group label
                  details:
                    type:
                      - 'null'
                      - object
                    properties:
                      description:
                        type: string
                        description: Group description
                      locations:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Location code
                            name:
                              type: string
                              description: Location name
                          required:
                            - id
                            - name
                          additionalProperties: false
                        description: Locations
                    description: Locations in the group
                    required:
                      - description
                      - locations
                    additionalProperties: false
                required:
                  - group
                additionalProperties: false
              description: Locations the question was asked in
            datasets:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: Dataset code
                  title:
                    type: string
                    description: Dataset name
                  description:
                    type: string
                    description: Dataset description
                  url:
                    type: string
                    description: Dataset help URL
                  is_simulated:
                    type: boolean
                    description: True when this dataset is based on simulated data
                required:
                  - id
                  - title
                  - description
                  - is_simulated
                additionalProperties: false
              description: Datasets the insight draws from
            attributes:
              type: array
              items:
                type: object
                properties:
                  question:
                    type: string
                    description: Survey question
                  answer:
                    type: string
                    description: Answer option
                  percentage:
                    type: number
                    description: Share of the audience that gave this answer
                  sample:
                    type: integer
                    description: Number of respondents
                    minimum: -2147483648
                    maximum: 2147483647
                  universe_size:
                    type: integer
                    description: >-
                      Estimated number of internet users in the audience who
                      gave this answer
                    minimum: -2147483648
                    maximum: 2147483647
                  index:
                    type: number
                    description: >-
                      Likelihood compared with all internet users; 100 is
                      average
                  is_simulated:
                    type: boolean
                    description: True when this answer is based on simulated data
                required:
                  - question
                  - answer
                  - percentage
                  - sample
                  - universe_size
                  - index
                  - is_simulated
                additionalProperties: false
              description: Per-answer statistics for the survey question
          description: Sources and the statistics for each answer
          additionalProperties: false
      required:
        - id
        - title
        - text
        - is_simulated
      additionalProperties: false
    Problem:
      type: object
      description: >-
        Problem details as defined in RFC 9457. Use `type` to identify the
        error; `title` summarises it and `detail` describes this occurrence.
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
          description: Identifier of the problem type.
        title:
          type: string
          description: Short summary of the problem type.
        status:
          type: integer
          description: HTTP status code.
        detail:
          type: string
          description: Description of this occurrence of the problem.
        instance:
          type: string
          description: Path of the request that produced the problem.
  responses:
    Unauthorized:
      description: The API token is missing or invalid.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthorized
    NotFound:
      description: The requested resource does not exist (`not-found`).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://api.globalwebindex.com/docs/spark-api/problems/not-found
            title: Resource not found
            status: 404
            detail: insight not found
            instance: /v2/spark-api/insights/32c56b1d-3b42-4b68-a356-ab71360f6a0e
    Unprocessable:
      description: >-
        The request is invalid (`invalid-params`) or cannot be processed
        (`unprocessable`).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: >-
              https://api.globalwebindex.com/docs/spark-api/problems/invalid-params
            title: Invalid parameters
            status: 422
            detail: 'could not validate input: prompt should be a non empty string'
            instance: /v2/spark-api/global-filters
    Internal:
      description: An unexpected error occurred (`internal`).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://api.globalwebindex.com/docs/spark-api/problems/internal
            title: Internal server error
            status: 500
            detail: >-
              There was an error processing your request. Please try again
              later.
            instance: /v2/spark-api/insights/generate
    Timeout:
      description: The request took too long to complete (`timeout`).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://api.globalwebindex.com/docs/spark-api/problems/timeout
            title: Request timeout
            status: 504
            detail: >-
              service is taking longer than usual to respond: please try again
              in a few moments
            instance: /v2/spark-api/insights/generate
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````