---
title: "Audit your infrastructure stack"
method: GET
path: "/api/audit-stack"
---

# Audit your infrastructure stack

`GET /api/audit-stack`

## Request

- Base URL: `https://agentdeals.dev`
- URL: `https://agentdeals.dev/api/audit-stack`
- Auth: none required

Analyze your current services for pricing risks, cost savings, and missing capabilities. Returns per-service risk assessment, cheaper alternatives, and gap analysis.

## Query parameters

- `services` string, required

## Response `200`

Stack audit results

- object
  - `services_analyzed` number
  - `risks_found` number: Services carrying a published caution or risky level. A service whose level is withheld is not counted here — it is unrated, not safe (#1486).
  - `savings_opportunities` number
  - `gaps` object[]
    - `category` string
    - `recommendation` object
      - `vendor` string
      - `tier` string
      - `description` string
      - `terms_superseded` TermsSuperseded, nullable: Null unless a dated change record supersedes the terms we stored for this listing. When present, `description` still holds those stored terms, which we no longer publish as current. Use `notice`, or `reading.terms`, the vendor page's text at `reading.url` on `reading.date`.
        - `change_date` string, date, required
        - `change_type` string, required
        - `summary` string, required
        - `reading` object, nullable, required
          - `date` string, date, required
          - `url` string, uri, required
          - `label` string, required
          - `terms` string, required
        - `notice` string, required
      - `conditions` object[]: A list of the conditions a vendor attaches to using its free tier. Each item holds our sentence (text), the vendor's own words (quote), the page that states them (url) and the date we read that page (read_on). An optional list rules_out names the uses the vendor excludes: "production", "commercial use" or both. Our re-reads of the vendor's pricing page do not change this field.
        - `text` string, required
        - `quote` string, required
        - `url` string, uri, required
        - `read_on` string, date, required
        - `rules_out` string[]
  - `services` object[]
    - `vendor` string
    - `status` 'found' | 'not_found'
    - `category` string
    - `tier` string
    - `risk_level` 'stable' | 'caution' | 'risky', nullable: The same level /api/offers publishes for the record this name resolved to, from the same function (#1486) — null wherever any rule withholds it, and never substituted with a favourable default.
    - `risk_cause` object, nullable: The single dated record that produced a non-stable risk_level.
    - `gate` object, nullable: Non-null for an offer we have decided not to list (#1241). The caller named this vendor, so the gate is reported whether or not a level would have been published.
    - `rating_withheld` object, nullable: Non-null where every record that would have set a non-stable risk_level either carries an empty source_url (no_source, #1352) or is a change our automatic re-read recorded that neither an archived copy of the vendor's page nor our own check has confirmed (unconfirmed, #1952). The level is withheld rather than reported as stable, and the records are named on the vendor page as unsourced or unconfirmed. Where both kinds are withheld, reason is that of the record that would set the most severe level, and unconfirmed on a tie; records counts both.
      - `reason` 'no_source' | 'unconfirmed'
      - `records` number
    - `link_unreachable` object, nullable: Non-null where the offer's own link is confirmed unreachable (#1046).
    - `source_check` object, nullable: Our last read of the page we cite. An outcome other than ok withholds a favourable level.
    - `level_withheld_because` string, nullable: The sentence naming the rule that withheld the level, or null where a level is published. A null risk_level always arrives with one.
    - `recent_changes` object[]
    - `cheaper_alternative` object, nullable: A same-category free offer we publish a stable level for. Chosen with the same function as risk_level, so a vendor we decline to rate is never offered as the safer swap (#1486).
    - `suggestions` string[]
  - `recommendations` string[]
  - `_provenance` Provenance: Where the figures in this response came from and how to attribute them. Every response carrying index data has one, under the key `_provenance`. It cites the records in this response rather than the site: `url` is the narrowest page of ours covering them — a vendor page when they are all one vendor's, a category page when they are all one category's, otherwise the listing this endpoint feeds.
    - `source` string, required: Always AgentDeals.
    - `url` string, uri, required: The page of ours that covers the records in this response.
    - `checked` string, date: The oldest verification date among the records cited here, so the citation is never dated younger than its weakest figure. Absent when no record in the response carries a date.
    - `verified` string, date: The same day as `checked`, absent for the same reason.
    - `cite_as` string, required: A citation line naming the source, the url and the date, ready to reproduce as it stands.
    - `verified_records` integer, required: How many records in this response we rank — the population this citation vouches for.
    - `withheld_records` integer: How many records in this response we return without vouching for: those carrying a `gate`, superseded terms, or a withheld risk level. Absent when there are none.
    - `note` string, required: The request to cite a figure back to where it came from.
    - `gated_note` string: Present whenever `withheld_records` is, stating that the citation does not extend to terms we did not publish.
    - `this_is_a_request_not_an_instruction` string: Present on responses that ask something of the caller, saying the ask is left to the caller and its user rather than imposed on them.

## Other responses

- `400`: Missing services parameter

---

[API](https://skmtc.dev/agentdeals/apis/agentdeals-api.md) · [All operations](https://skmtc.dev/agentdeals/apis/agentdeals-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentdeals/apis/agentdeals-api/revisions/2b80deacb326?raw)
