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

# Get audit

> `status`: queued, running, batched (narrative queued in the batch API), done or failed. `include=facts` adds the measured facts the report is built from.



## OpenAPI

````yaml openapi.json GET /audits/{id}
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:
  /audits/{id}:
    get:
      tags:
        - Audits
      summary: >-
        Get one App Audit by id - poll this after POST /v1/apps/{app}/audit
        answered 202 (free).
      description: >-
        `status`: queued, running, batched (narrative queued in the batch API),
        done or failed. `include=facts` adds the measured facts the report is
        built from.
      operationId: getAudit
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            example: aud_3fK9aQ2mXc81LpRt
        - name: include
          in: query
          schema:
            type: string
            enum:
              - facts
      responses:
        '200':
          description: The audit.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - properties:
                      data:
                        $ref: '#/components/schemas/Audit'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Envelope:
      type: object
      required:
        - data
        - meta
      properties:
        data: {}
        meta:
          $ref: '#/components/schemas/Meta'
    Audit:
      type: object
      properties:
        id:
          type: string
          example: aud_3fK9aQ2mXc81LpRt
        slug:
          type: string
        url:
          type: string
          format: uri
          description: Shareable report page (not indexed by search engines).
        status:
          type: string
          enum:
            - queued
            - running
            - batched
            - done
            - failed
        store:
          $ref: '#/components/schemas/Store'
        app_id:
          type: string
        country:
          type: string
        mode:
          type: string
          enum:
            - full
            - lite
        title:
          type:
            - string
            - 'null'
        icon_url:
          type:
            - string
            - 'null'
        score:
          type:
            - integer
            - 'null'
        white_label:
          type: boolean
          description: The report page carries your branding.
        branding:
          oneOf:
            - $ref: '#/components/schemas/ReportBranding'
            - type: 'null'
        label:
          type:
            - string
            - 'null'
        report:
          oneOf:
            - $ref: '#/components/schemas/AuditReport'
            - type: 'null'
        findings:
          type: array
          items:
            $ref: '#/components/schemas/Finding'
          description: Available as soon as the facts are gathered.
        facts:
          type: object
          description: >-
            Only with include=facts: listing, ratings, reviews, keywords
            (probe), competitors, localization, changes, gaps.
        credits_charged:
          type: integer
        free:
          type: boolean
          description: This was the organization's free first audit.
        error:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        finished_at:
          type:
            - string
            - 'null'
          format: date-time
    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.
    Store:
      type: string
      enum:
        - apple
        - play
    ReportBranding:
      type: object
      properties:
        brand_name:
          type:
            - string
            - 'null'
        logo_url:
          type:
            - string
            - 'null'
          format: uri
        accent_color:
          type:
            - string
            - 'null'
          example: '#1f6feb'
        cta_url:
          type:
            - string
            - 'null'
        cta_text:
          type:
            - string
            - 'null'
        footer:
          type:
            - string
            - 'null'
        powered_by:
          type: boolean
          description: Shows "Powered by AppGoat".
    AuditReport:
      type: object
      properties:
        score:
          type: integer
          minimum: 0
          maximum: 100
        headline:
          type: string
        summary:
          type: string
        sections:
          type: array
          items:
            type: object
            properties:
              section:
                type: string
              title:
                type: string
              body:
                type: string
              finding_ids:
                type: array
                items:
                  type: string
        actions:
          type: array
          description: Prioritised, most impactful first.
          items:
            type: object
            properties:
              title:
                type: string
              why:
                type: string
              how:
                type: string
              impact:
                type: string
                enum:
                  - high
                  - medium
                  - low
              effort:
                type: string
                enum:
                  - low
                  - medium
                  - high
              finding_ids:
                type: array
                items:
                  type: string
              playbook:
                type:
                  - string
                  - 'null'
        metadata:
          type: array
          description: Listing rewrites within the store character limits.
          items:
            type: object
            properties:
              field:
                type: string
                enum:
                  - title
                  - subtitle
                  - short_description
                  - keywords
                  - description_first_line
              current:
                type:
                  - string
                  - 'null'
              suggested:
                type: string
              chars:
                type: integer
              limit:
                type: integer
              rationale:
                type: string
        findings:
          type: array
          items:
            $ref: '#/components/schemas/Finding'
        narrative:
          type: string
          enum:
            - opus
            - deterministic
          description: deterministic = findings only (the AI step was unavailable).
        model:
          type:
            - string
            - 'null'
        generated_at:
          type: string
          format: date-time
    Finding:
      type: object
      description: A deterministic check over the measured facts.
      properties:
        id:
          type: string
        type:
          type: string
          example: striking_distance
        section:
          type: string
          enum:
            - metadata
            - keywords
            - reviews
            - ratings
            - localization
            - competitors
            - creative
            - maintenance
        severity:
          type: string
          enum:
            - high
            - medium
            - low
        title:
          type: string
          example: '#14 for "habit tracker adhd" (not in the title or subtitle)'
        evidence:
          type: object
          additionalProperties: true
          description: The numbers the finding rests on.
        fix:
          type: string
        playbook:
          type:
            - string
            - 'null'
          description: >-
            Playbook that automates the fix:
            https://appgoat.ai/playbooks/{playbook}
    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:
    NotFound:
      description: Not found.
      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.