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

# Create watch

> Use this when the user wants to be told about changes ("tell me when a competitor updates", "alert me when my
rating drops", "track my ranks for these keywords"). Kinds:
- `app` { app }: new versions, metadata / price changes, featuring, rating drops, review and ratings spikes,
  chart entries for that app.
- `competitor_set` { app?, competitors[] }: the same for every app in the set (your own `app` optional).
- `keyword` { terms[], store, app? }: search-rank moves of `app` for each term (`rank_change`) and new apps in
  the top N (`keyword_entrant`).
Watched apps (competitors included) count against `limits.watches`; keyword watches use one keyword slot per
term × store × country (`limits.keywords`). Exceeding either returns 402 plan_limit and changes nothing.
Watched apps are refreshed daily. Events appear at `GET /v1/events` and go to your webhooks.




## OpenAPI

````yaml openapi.json POST /watches
openapi: 3.1.0
info:
  title: AppGoat API
  version: 1.0.0
  summary: App Store + Google Play data for agents and apps.
  description: >
    Every app and developer in both stores, daily top charts, reviews, change
    feeds, metric history and keyword

    (search-rank) intelligence.


    **Conventions**

    - `{app}` accepts anything that identifies an app: an App Store id
    (`284882215`, `id284882215`), a Play
      package (`com.spotify.music`), an Apple bundle id (`com.spotify.client`), a store URL, `apple:<id>` /
      `play:<id>`, or a name (`spotify` → best match, with a warning in `meta.warnings`). Add `store=apple|play`
      to disambiguate. `data.linked` is the same app in the other store when we know it.
    - Freshness is automatic: app-scoped reads refresh data older than `max_age`
    seconds from the store first
      (1 credit per country fetched, capped at 10). `wait=true` (default) blocks up to ~25 s; on timeout, or with
      `wait=false`, you get the cached data with `meta.freshness.refreshing: true` and a `job_id` to poll at
      `GET /v1/jobs/{id}` (free).
    - `country` defaults to `us`; pass a comma list (paid plans) or `all`
    (Studio).

    - `include=` adds sections, `fields=` keeps only the listed top-level
    fields, lists page with `cursor`
      (pass `meta.next_cursor` back unchanged).
    - Every success is `{ data, meta }`; `meta.credits_used` is what the call
    cost and `meta.credits_remaining`
      what is left. Errors are `{ error: { code, message, hint, docs } }`: read `hint`, it says what to do next.
    - `x-credits` on each operation documents its price.

    - Watches turn store changes into events: `POST /v1/watches`, then poll `GET
    /v1/events` or add a webhook
      (`POST /v1/webhooks`). Watches, events and webhooks are free; only the plan's watched-app and keyword-slot
      limits apply. `/v1/tracked-keywords` is deprecated: use keyword watches.
  contact:
    email: support@appgoat.ai
    url: https://appgoat.ai
servers:
  - url: https://api.appgoat.ai/v1
security:
  - apiKey: []
tags:
  - name: Apps
  - name: Search & charts
  - name: Keywords
  - name: Developers
  - name: Audits
  - name: Watches & events
    description: >-
      Watch apps, competitors and keywords; significant changes become events
      (feed, webhooks, Slack, GitHub, daily email digest).
  - name: Webhooks
  - name: Connections
  - name: Actions
  - name: Jobs
  - name: Account
paths:
  /watches:
    post:
      tags:
        - Watches & events
      summary: >-
        Watch an app, a set of competitors or a set of keywords and get events
        when something significant changes.
      description: >
        Use this when the user wants to be told about changes ("tell me when a
        competitor updates", "alert me when my

        rating drops", "track my ranks for these keywords"). Kinds:

        - `app` { app }: new versions, metadata / price changes, featuring,
        rating drops, review and ratings spikes,
          chart entries for that app.
        - `competitor_set` { app?, competitors[] }: the same for every app in
        the set (your own `app` optional).

        - `keyword` { terms[], store, app? }: search-rank moves of `app` for
        each term (`rank_change`) and new apps in
          the top N (`keyword_entrant`).
        Watched apps (competitors included) count against `limits.watches`;
        keyword watches use one keyword slot per

        term × store × country (`limits.keywords`). Exceeding either returns 402
        plan_limit and changes nothing.

        Watched apps are refreshed daily. Events appear at `GET /v1/events` and
        go to your webhooks.
      operationId: createWatch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WatchInput'
            examples:
              app:
                value:
                  kind: app
                  app: com.spotify.music
                  countries:
                    - us
                    - de
              competitors:
                value:
                  kind: competitor_set
                  app: '284882215'
                  competitors:
                    - '389801252'
                    - com.zhiliaoapp.musically
                  event_types:
                    - new_version
                    - metadata_change
                    - price_change
              keywords:
                value:
                  kind: keyword
                  app: '284882215'
                  terms:
                    - photo editor
                    - collage maker
                  store: apple
                  countries:
                    - us
                    - gb
                  settings:
                    rank_move: 3
      responses:
        '201':
          description: The watch.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - properties:
                      data:
                        $ref: '#/components/schemas/Watch'
        '400':
          $ref: '#/components/responses/InvalidParam'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '404':
          $ref: '#/components/responses/AppNotFound'
components:
  schemas:
    WatchInput:
      type: object
      required:
        - kind
      properties:
        kind:
          $ref: '#/components/schemas/WatchKind'
        name:
          type:
            - string
            - 'null'
        app:
          type: string
          description: >-
            Any `{app}` input. app: required; competitor_set: your own app
            (optional); keyword: the app whose ranks to report (optional).
        competitors:
          type: array
          items:
            type: string
          maxItems: 50
          description: competitor_set only.
        terms:
          type: array
          items:
            type: string
          maxItems: 500
          description: keyword only (or `term`).
        term:
          type: string
        store:
          type: string
          enum:
            - apple
            - play
            - both
          description: >-
            keyword watches without app (default both); also disambiguates app
            inputs.
        countries:
          type: array
          items:
            type: string
          default:
            - us
        event_types:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/EventType'
          description: null = every type of the kind.
        settings:
          $ref: '#/components/schemas/WatchSettings'
        active:
          type: boolean
          default: true
    Envelope:
      type: object
      required:
        - data
        - meta
      properties:
        data: {}
        meta:
          $ref: '#/components/schemas/Meta'
    Watch:
      type: object
      properties:
        id:
          type: integer
        kind:
          $ref: '#/components/schemas/WatchKind'
        name:
          type:
            - string
            - 'null'
        store:
          type:
            - string
            - 'null'
          enum:
            - apple
            - play
            - both
            - null
        app:
          oneOf:
            - $ref: '#/components/schemas/WatchApp'
            - type: 'null'
        competitors:
          type: array
          items:
            $ref: '#/components/schemas/WatchApp'
          description: competitor_set only.
        terms:
          type: array
          items:
            type: string
          description: keyword only.
        keywords:
          type: array
          description: >-
            keyword only: one slot per store × country × term (id = the
            tracked-keyword id).
          items:
            type: object
            properties:
              id:
                type: integer
              term:
                type: string
              store:
                $ref: '#/components/schemas/Store'
              country:
                type: string
              ranked_at:
                type:
                  - string
                  - 'null'
                format: date-time
        countries:
          type: array
          items:
            type: string
        event_types:
          type: array
          items:
            $ref: '#/components/schemas/EventType'
        settings:
          $ref: '#/components/schemas/WatchSettings'
        active:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    WatchKind:
      type: string
      enum:
        - app
        - keyword
        - competitor_set
    EventType:
      type: string
      enum:
        - new_version
        - metadata_change
        - price_change
        - featured
        - in_app_event
        - installs_milestone
        - rating_drop
        - ratings_spike
        - review_spike
        - negative_review_spike
        - chart_enter
        - chart_leave
        - rank_change
        - keyword_entrant
      description: >
        App / competitor_set watches: `new_version` (version + release notes),
        `metadata_change` (title, subtitle,

        description, screenshots, icon, category…; `payload.changes`),
        `price_change` (price or in-app purchases),

        `featured` (Editors' Choice, featuring, badges), `in_app_event`,
        `installs_milestone` (Play install bucket),

        `rating_drop` (7-day drop ≥ settings.rating_drop), `ratings_spike` /
        `review_spike` (day count ≥

        settings.spike_factor × the 14-day average), `negative_review_spike`
        (negative reviews per topic),

        `chart_enter` / `chart_leave` (crossing the top settings.chart_top_n).
        Keyword watches: `rank_change` (the

        watch's app moved ≥ settings.rank_move, or entered / left the ranking),
        `keyword_entrant` (new apps in the

        top settings.keyword_top_n).
    WatchSettings:
      type: object
      properties:
        significance:
          type: number
          minimum: 0
          maximum: 1
          default: 0.5
          description: >-
            Minimum significance for an event: Jev's probability that an analyst
            would want the alert (AI on), or a fixed per-type score.
        rank_move:
          type: integer
          default: 5
        keyword_top_n:
          type: integer
          default: 10
        chart_top_n:
          type: integer
          default: 100
        rating_drop:
          type: number
          default: 0.1
          description: Stars over 7 days.
        spike_factor:
          type: number
          default: 3
        email_digest:
          type: boolean
          default: true
          description: Include in the daily email digest.
        depth:
          type: integer
          description: 'Keyword watches: results kept per ranking (Apple ≤ 250, Play ≤ 30).'
        cadence_minutes:
          type: integer
          description: 'Keyword watches: minutes between re-ranks (360…10080).'
    Meta:
      type: object
      properties:
        credits_used:
          type: integer
        credits_remaining:
          type: integer
          description: Added by the gateway.
        request_id:
          type: string
          description: Added by the gateway.
        freshness:
          $ref: '#/components/schemas/Freshness'
        next_cursor:
          type:
            - string
            - 'null'
        store:
          $ref: '#/components/schemas/Store'
        warnings:
          type: array
          items:
            type: string
          description: Things to know (e.g. "resolved by name"); safe to show to the user.
    WatchApp:
      type: object
      properties:
        store:
          $ref: '#/components/schemas/Store'
        app_id:
          type: string
        title:
          type:
            - string
            - 'null'
        icon_url:
          type:
            - string
            - 'null'
        developer_name:
          type:
            - string
            - 'null'
    Store:
      type: string
      enum:
        - apple
        - play
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - invalid_param
                - invalid_credentials
                - unauthorized
                - forbidden
                - insufficient_credits
                - plan_limit
                - free_audit_used
                - not_found
                - app_not_found
                - developer_not_found
                - job_not_found
                - conflict
                - not_ready
                - rate_limited
                - provider_error
                - internal_error
                - not_configured
            message:
              type: string
            hint:
              type: string
              description: What to do next.
            docs:
              type: string
              format: uri
            param:
              type: string
    Freshness:
      type: object
      properties:
        fetched_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the oldest requested country was last fetched from the store.
        age_seconds:
          type:
            - integer
            - 'null'
        stale:
          type: boolean
          description: Older than max_age (or missing).
        refreshing:
          type: boolean
          description: A store fetch is still running; poll job_id.
        job_id:
          type:
            - string
            - 'null'
  responses:
    InvalidParam:
      description: A parameter is missing or invalid (`error.param` names it).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_param
              message: limit must be ≤ 100
              hint: Fix the parameter and retry.
              docs: https://appgoat.ai/docs/errors#invalid_param
              param: limit
    PaymentRequired:
      description: >-
        `insufficient_credits` (the call costs more than you have left; nothing
        was done) or `plan_limit` (a feature of a higher plan).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    AppNotFound:
      description: Nothing matches `{app}`, or the store does not have it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Create a key at https://dash.appgoat.ai.

````

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