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

# Get analytics

> Two blocks. `overview` is the portal's landing page, all-time figures that no period narrows. `analytics` is the Analytics Dashboard (how ChatGPT, Gemini and Google's AI answers speak of you), under the period and engines asked.

Two blocks:

* **`overview`** is the portal's landing page. Its figures are all-time: no period narrows them.
* **`analytics`** is the Dashboard of the Analytics screen, how ChatGPT, Gemini and Google's AI answers speak of you, under the period and the engines asked.

```bash theme={null}
curl -s "https://app.tryhellosearch.com/api/v1/analytics?period=7d&engine=chatgpt" \
  -H "Authorization: Bearer $HELLOSEARCH_KEY"
```

## Overview

* `progress`: the five figures of the Progress band. `in_progress` counts the placements being delivered (an accepted opportunity being written or published), not the propositions awaiting your answer.
* `todo`: how many to-dos wait on you (`waiting_on_you`) and on us (`on_our_side`).
* `budget.plan`: your plan as the Budget page names it, `null` with none on file.
* `ai_visibility`: the landing page's line, always over the last 30 days; `null` when those 30 days hold no answer to measure (none read yet, or none since your prompts stopped).

## Analytics

* `engines`: the engines asked, in a fixed order (`chatgpt`, `gemini`, `ai_overview`, `google_ai_mode`) whatever the order you gave; an empty list means none was named, so every engine.
* `state`: `ok`, or why there is nothing to measure yet: `no_prompt` (no prompt set up), `no_reading` (no answer read yet), `nothing_in_period` (none in this period).
* `metrics`: the four tiles, in order.

  * `visibility`: the share of the answers that name you.
  * `share_of_voice`: your share of the brand mentions, your competitors included.
  * `position`: your average place in the answers that name you; 1 is first.
  * `sentiment`: 0 to 100, 50 is neutral. `breakdown` gives the positive, neutral and negative shares.

  `change` compares with the period of the same length just before, `null` when that period holds no answer. `daily` is the tile's chart, one point a day, oldest first; `null` is a day nothing was read, a gap and not a zero. Today's point may still move until the night's readings are in.
* `our_mentions`: what your live mentions bring to the AI answers, with daily counts. `live` is `false` while none is live; the tiles are then no figures, and their `daily` is an empty list.
* `by_engine`, `brands`, `topics`: the screen's tables. Rates are percentages rounded to one decimal, `null` where they cannot be computed. `brands` lists you (`is_you`) and your competitors. A topic whose `id` is `null` holds the prompts filed under no topic.


## OpenAPI

````yaml GET /analytics
openapi: 3.1.0
info:
  title: HelloSearch API
  version: '1'
  description: >-
    Your HelloSearch figures and opportunities, as your portal shows them. Every
    route reads the same data as the portal.
servers:
  - url: https://app.tryhellosearch.com/api/v1
security:
  - accessKey: []
paths:
  /analytics:
    get:
      summary: Get analytics
      description: >-
        Two blocks. `overview` is the portal's landing page, all-time figures
        that no period narrows. `analytics` is the Analytics Dashboard (how
        ChatGPT, Gemini and Google's AI answers speak of you), under the period
        and engines asked.
      operationId: getAnalytics
      parameters:
        - name: period
          in: query
          description: >-
            The period, `30d` when neither it nor `from` and `to` is given. Use
            either `period`, or `from` and `to`, never both.
          schema:
            type: string
            enum:
              - 7d
              - 30d
              - 3m
        - name: from
          in: query
          description: >-
            First day of a custom period, `YYYY-MM-DD`. With `to`, instead of
            `period`; 366 days at most.
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: Last day of a custom period, `YYYY-MM-DD`, not before `from`.
          schema:
            type: string
            format: date
        - name: engine
          in: query
          description: >-
            Comma-separated, among `chatgpt`, `gemini`, `ai_overview` and
            `google_ai_mode`. Every engine when left out.
          schema:
            type: string
            example: chatgpt,gemini
      responses:
        '200':
          description: The figures.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Analytics'
        '400':
          $ref: '#/components/responses/InvalidParameter'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Analytics:
      type: object
      required:
        - overview
        - analytics
      properties:
        overview:
          type: object
          properties:
            progress:
              type: array
              description: The five figures of the landing page's Progress band.
              items:
                type: object
                properties:
                  key:
                    type: string
                    enum:
                      - sources_identified
                      - sources_contacted
                      - sources_replied
                      - in_progress
                      - placed
                  label:
                    type: string
                    example: Sources found
                  value:
                    type: integer
            todo:
              type: object
              properties:
                waiting_on_you:
                  type: integer
                on_our_side:
                  type: integer
            budget:
              type: object
              properties:
                spent:
                  $ref: '#/components/schemas/Money'
                plan:
                  type:
                    - string
                    - 'null'
                  example: Recurring $2,000/mo
            ai_visibility:
              type:
                - object
                - 'null'
              description: >-
                Always over the last 30 days; `null` when those 30 days hold no
                answer to measure.
              properties:
                value:
                  type: string
                  example: 32%
                window:
                  type: string
                  example: over the last 30 days
                change:
                  $ref: '#/components/schemas/Change'
        analytics:
          type: object
          properties:
            period:
              type: object
              properties:
                preset:
                  type:
                    - string
                    - 'null'
                  enum:
                    - 7d
                    - 30d
                    - 3m
                    - null
                label:
                  type: string
                  example: Last 7 days
                from:
                  type: string
                  format: date
                to:
                  type: string
                  format: date
            engines:
              type: array
              items:
                $ref: '#/components/schemas/Engine'
            state:
              type: string
              enum:
                - ok
                - no_prompt
                - no_reading
                - nothing_in_period
              description: >-
                `ok`, or why there is nothing to measure yet: no prompt set up,
                no answer ever read, none in this period.
            metrics:
              type: array
              items:
                $ref: '#/components/schemas/Metric'
            our_mentions:
              type: object
              properties:
                live:
                  type: boolean
                metrics:
                  type: array
                  items:
                    $ref: '#/components/schemas/Metric'
            by_engine:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/Measures'
                  - type: object
                    properties:
                      engine:
                        $ref: '#/components/schemas/Engine'
                      label:
                        type: string
                        example: ChatGPT
                      answers:
                        type: integer
            brands:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/Measures'
                  - type: object
                    properties:
                      name:
                        type: string
                      is_you:
                        type: boolean
                      mentions:
                        type: integer
            topics:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/Measures'
                  - type: object
                    properties:
                      id:
                        type:
                          - string
                          - 'null'
                        description: '`null` for the prompts filed under no topic.'
                      name:
                        type: string
                      prompts:
                        type: integer
    Money:
      type: object
      required:
        - amount
        - currency
        - display
      properties:
        amount:
          type: integer
          description: Whole US dollars.
          example: 300
        currency:
          type: string
          enum:
            - USD
        display:
          type: string
          example: $300
    Change:
      type:
        - object
        - 'null'
      properties:
        label:
          type: string
          example: +4 pts
        direction:
          type: string
          enum:
            - up
            - down
            - flat
    Engine:
      type: string
      enum:
        - chatgpt
        - gemini
        - ai_overview
        - google_ai_mode
    Metric:
      type: object
      properties:
        key:
          type: string
          enum:
            - visibility
            - share_of_voice
            - position
            - sentiment
            - contributed_mentions
            - source_retrievals
          description: >-
            The four tiles of `metrics` use the first four keys;
            `our_mentions.metrics` uses `contributed_mentions` and
            `source_retrievals`.
        label:
          type: string
          example: Visibility
        value:
          type: string
          description: As the tile prints it.
          example: 32%
        description:
          type:
            - string
            - 'null'
          example: Named in 38 of 120 answers
        change:
          type:
            - object
            - 'null'
          description: Against the period of the same length just before.
          properties:
            label:
              type: string
              example: +4 pts
            direction:
              type: string
              enum:
                - up
                - down
        breakdown:
          type:
            - array
            - 'null'
          description: For `sentiment`, its positive, neutral and negative shares.
          items:
            type: object
            properties:
              label:
                type: string
              value:
                type: string
        daily:
          type: array
          description: >-
            One point a day of the period, oldest first. `null` for a day
            nothing was read (a gap, not a zero). Empty for
            `our_mentions.metrics` while none of your mentions is live.
          items:
            type: object
            properties:
              day:
                type: string
                format: date
              value:
                type:
                  - number
                  - 'null'
    Measures:
      type: object
      properties:
        visibility_percent:
          type:
            - number
            - 'null'
        share_of_voice_percent:
          type:
            - number
            - 'null'
        average_position:
          type:
            - number
            - 'null'
          description: 1 is first.
        sentiment_index:
          type:
            - integer
            - 'null'
          description: 0 to 100, 50 is neutral.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - invalid_body
                - invalid_parameter
                - not_found
                - not_awaiting_decision
              description: Stable, meant for a program.
            message:
              type: string
              description: Meant for a person; may change.
  responses:
    InvalidParameter:
      description: A parameter the route cannot read; the message starts with its name.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_parameter
              message: 'period: give either period, or from and to, not both.'
    Unauthorized:
      description: No valid access key.
      headers:
        WWW-Authenticate:
          schema:
            type: string
            example: Bearer realm="HelloSearch API"
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: A valid access key is required. …
  securitySchemes:
    accessKey:
      type: http
      scheme: bearer
      description: >-
        An access key from your portal, under Settings > Access keys. It starts
        with `hs_live_`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.