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

# Get the daily trend

> Daily visibility for your brand, the leader and the two brands just above you, with markers on the days something changed.



## OpenAPI

````yaml /api-reference/openapi.json get /projects/{projectId}/trend
openapi: 3.1.0
info:
  title: Citino API
  version: v1
  description: >-
    Read how AI engines answer your market's questions, and keep your prompts,
    competitors, segments and engines in step from code. Every number carries
    its band and sample size.
servers:
  - url: https://api.citino.ai/v1
security:
  - bearerAuth: []
tags:
  - name: Brand and competitors
  - name: Definitions
  - name: Engines
  - name: Projects
  - name: Alerts
  - name: Attribution
  - name: Claims
  - name: Crawlability
  - name: Crawler activity
  - name: Metrics
  - name: Experiments
  - name: Prompts
  - name: Objections
  - name: Monthly reports
  - name: Reports
  - name: Runs
  - name: Searches
  - name: Sources
  - name: Work items
  - name: Settings
paths:
  /projects/{projectId}/trend:
    get:
      tags:
        - Metrics
      summary: Get the daily trend
      description: >-
        Daily visibility for your brand, the leader and the two brands just
        above you, with markers on the days something changed.
      operationId: getProjectsByProjectIdTrend
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
        - name: window
          in: query
          required: false
          description: >-
            A named window ending today in the project's market, or custom with
            from and to. Default 30d.
          schema:
            description: >-
              A named window ending today in the project's market, or custom
              with from and to. Default 30d.
            type: string
            enum:
              - 7d
              - 30d
              - 90d
              - 180d
              - 365d
              - custom
        - name: from
          in: query
          required: false
          description: First day, inclusive. Required with window=custom.
          schema:
            description: First day, inclusive. Required with window=custom.
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: to
          in: query
          required: false
          description: Last day, inclusive. Required with window=custom.
          schema:
            description: Last day, inclusive. Required with window=custom.
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: segments
          in: query
          required: false
          description: >-
            One value: your-segments (the default, the segments you claimed),
            all-segments, or one segment id.
          schema:
            description: >-
              One value: your-segments (the default, the segments you claimed),
              all-segments, or one segment id.
            type: string
            minLength: 1
            maxLength: 120
        - name: engines
          in: query
          required: false
          description: Comma-separated engine keys, narrowing the project's own engines.
          schema:
            description: Comma-separated engine keys, narrowing the project's own engines.
            type: string
            minLength: 1
            maxLength: 200
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  project_id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    description: The project asked about.
                  scope:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                    description: >-
                      What the numbers cover: the window and its dates, the
                      engines, the segments, the prompts and answers counted,
                      and a sentence saying so. Shown beside every figure.
                  state:
                    type: string
                    enum:
                      - empty
                      - populated
                    description: 'empty: no prompts in scope and no answers in the window.'
                  trend:
                    anyOf:
                      - type: object
                        properties:
                          start:
                            anyOf:
                              - type: string
                                pattern: ^\d{4}-\d{2}-\d{2}$
                              - type: 'null'
                          interval:
                            anyOf:
                              - type: string
                                const: day
                              - type: 'null'
                          unit:
                            anyOf:
                              - type: string
                                const: percent
                              - type: 'null'
                          series:
                            type: array
                            items:
                              type: object
                              properties:
                                label:
                                  type:
                                    - string
                                    - 'null'
                                brand_id:
                                  type:
                                    - string
                                    - 'null'
                                own:
                                  type: boolean
                                values:
                                  type: array
                                  items:
                                    type:
                                      - number
                                      - 'null'
                                  description: >-
                                    One per day from start; null on a day with
                                    no answers.
                                trailing_7d:
                                  type: array
                                  items:
                                    type:
                                      - number
                                      - 'null'
                                  description: >-
                                    Visibility over the seven days ending each
                                    day.
                              required:
                                - label
                                - brand_id
                                - own
                                - values
                                - trailing_7d
                              additionalProperties: false
                          markers:
                            type: array
                            items:
                              type: object
                              properties:
                                date:
                                  anyOf:
                                    - type: string
                                      pattern: ^\d{4}-\d{2}-\d{2}$
                                    - type: 'null'
                                kind:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - drift
                                        - publish
                                        - set_change
                                    - type: 'null'
                                  description: >-
                                    drift: the whole market moved; publish: you
                                    published a change; set_change: the prompts
                                    measured changed.
                              required:
                                - date
                                - kind
                              additionalProperties: false
                        required:
                          - start
                          - interval
                          - unit
                          - series
                          - markers
                        additionalProperties: false
                      - type: 'null'
                required:
                  - project_id
                  - scope
                  - state
                  - trend
                additionalProperties: false
              example:
                project_id: 00000000-0000-4000-8000-000000000001
                scope:
                  window: 30d
                  from: '2026-10-09'
                  to: '2026-11-07'
                  engines:
                    - chatgpt
                    - google-ai-overview
                    - perplexity
                  segmentScope: claimed
                  segments:
                    - wms
                  promptScope: category
                  promptsInScope: 0
                  answers: 0
                  subtitle: >-
                    0 prompts in your segments · 0 answers in 30 days · branded
                    prompts reported separately
                  customPromptsExcluded: true
                state: empty
                trend: null
        '400':
          description: The request is invalid; `error.field` names the parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'No live API key in an `Authorization: Bearer` header.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key lacks the scope named in the message, or cannot write.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such resource in this key's projects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Over the key's or the workspace's rate limit; see `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Busy or timed out; retry after `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: bash
          label: curl
          source: |-
            curl "https://api.citino.ai/v1/projects/{projectId}/trend" \
              -H "Authorization: Bearer $CITINO_API_KEY"
        - lang: python
          label: Python
          source: |-
            import os
            import requests

            res = requests.get(
                "https://api.citino.ai/v1/projects/{projectId}/trend",
                headers={"Authorization": f"Bearer {os.environ['CITINO_API_KEY']}"},
            )
            print(res.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const res = await
            fetch("https://api.citino.ai/v1/projects/{projectId}/trend", {
              headers: {
                Authorization: `Bearer ${process.env.CITINO_API_KEY}`,
              },
            });

            console.log(await res.json());
components:
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: >-
                validation, unauthorized, forbidden, not_found, conflict,
                plan_limit, rate_limited, busy, query_timeout
            message:
              type: string
            field:
              type: string
            detail:
              type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key from Workspace settings → API keys, sent as `Authorization:
        Bearer <key>`.

````

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