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

# List tracked keywords



## OpenAPI

````yaml /api-reference/openapi.json get /v1/tracked-keywords
openapi: 3.0.0
info:
  title: Amazonomics API
  version: 0.0.1
  description: The Amazonomics REST API. All endpoints need an API key.
servers:
  - url: https://api.amazonomics.com
security:
  - bearerAuth: []
paths:
  /v1/tracked-keywords:
    get:
      tags:
        - TrackedKeywords
      summary: List tracked keywords
      parameters:
        - schema:
            type: string
            pattern: ^\d{2}-\d{4}$
          required: false
          name: period
          in: query
        - schema:
            type: string
          required: false
          name: query
          in: query
      responses:
        '200':
          description: >-
            List tracked keywords for the active (user, org). The optional
            `period` query (MM-YYYY) selects which monthly snapshot to return;
            defaults to the latest. The optional `query` filters to tracked
            keywords that match the given search via the same Postgres full-text
            search used by /search/keywords.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TrackedKeyword'
                  error:
                    type: object
                    nullable: true
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                      docs:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - data
                  - error
        '400':
          description: Missing organization context.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    nullable: true
                  error:
                    type: object
                    nullable: true
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                      docs:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - data
                  - error
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    nullable: true
                  error:
                    type: object
                    nullable: true
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                      docs:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - data
                  - error
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    nullable: true
                  error:
                    type: object
                    nullable: true
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                      docs:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - data
                  - error
components:
  schemas:
    TrackedKeyword:
      type: object
      properties:
        id:
          type: string
          format: uuid
        created_at:
          type: string
        updated_at:
          type: string
        notes:
          type: string
          nullable: true
        is_active:
          type: boolean
        priority_enabled:
          type: boolean
        priority_rule:
          $ref: '#/components/schemas/PriorityRule'
        search_term:
          type: object
          properties:
            id:
              type: integer
            original_term:
              type: string
          required:
            - id
            - original_term
        snapshot:
          type: object
          nullable: true
          properties:
            latest_period:
              type: string
              nullable: true
            latest_rank:
              type: integer
              nullable: true
            previous_rank:
              type: integer
              nullable: true
            rank_change:
              type: integer
              nullable: true
            best_rank:
              type: integer
              nullable: true
            worst_rank:
              type: integer
              nullable: true
            avg_rank:
              type: number
              nullable: true
            total_periods:
              type: integer
              nullable: true
            history:
              type: array
              items:
                type: object
                properties:
                  period:
                    type: string
                  rank:
                    type: integer
                    nullable: true
                required:
                  - period
                  - rank
              default: []
          required:
            - latest_period
            - latest_rank
            - previous_rank
            - rank_change
            - best_rank
            - worst_rank
            - avg_rank
            - total_periods
      required:
        - id
        - created_at
        - updated_at
        - notes
        - is_active
        - priority_enabled
        - priority_rule
        - search_term
        - snapshot
    PriorityRule:
      type: object
      nullable: true
      properties:
        field:
          $ref: '#/components/schemas/PriorityRuleField'
        operator:
          $ref: '#/components/schemas/PriorityRuleOperator'
        value:
          type: integer
      required:
        - field
        - operator
        - value
    PriorityRuleField:
      type: string
      enum:
        - latest_rank
        - rank_change
    PriorityRuleOperator:
      type: string
      enum:
        - <
        - <=
        - '='
        - '>='
        - '>'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````