PerfDelta Budgets API

Performance budgets and CI checks.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

GET /budgets.php Budget status of a scan or URL, or the budgets of a project (paid plans) #
POST /budgets.php Create, change or delete a budget (paid plans) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/perfdelta:perfdelta-budgets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

perfdelta-budgets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PerfDelta REST Budgets API
  version: 1.0.0
  summary: PageSpeed and Core Web Vitals scans, reports, projects and performance budgets.
  description: 'Start PageSpeed scans, read real-user Core Web Vitals (Chrome UX Report) and Lighthouse lab data, prioritised fixes, history, projects, competitors and performance budgets.


    Authentication: `Authorization: Bearer `. Create keys at https://perfdelta.com/api-keys. A free account can call the read endpoints and start one scan every 24 hours (30 requests per minute); paid plans get 60 requests per minute and a monthly PageSpeed test budget. Scans cost one test per URL and device, all other calls are free of charge.


    Responses are JSON (`application/json; charset=utf-8`). Errors are flat objects with an `error` code and usually a `message`. There is no pagination. The same functions are available to AI agents through the MCP server at https://perfdelta.com/api/mcp.php.


    Human-readable reference: https://perfdelta.com/api-docs'
  termsOfService: https://perfdelta.com/terms
  contact:
    name: PerfDelta
    url: https://perfdelta.com/contact
    email: info@perfdelta.com
  x-logo:
    url: https://perfdelta.com/assets/img/apple-touch-icon.png
servers:
- url: https://perfdelta.com/api/v1
security:
- bearerAuth: []
tags:
- name: Budgets
  description: Performance budgets and CI checks.
paths:
  /budgets.php:
    get:
      operationId: getBudgets
      tags:
      - Budgets
      summary: Budget status of a scan or URL, or the budgets of a project (paid plans)
      description: 'With scan_id or url_id: pass or fail per budget, for CI gates. With fail_status=1 a failed check answers 409. With only project_id: the stored budgets and the ratchet log.'
      parameters:
      - name: scan_id
        in: query
        required: false
        description: Check this scan.
        schema:
          type: string
      - name: url_id
        in: query
        required: false
        description: Check the latest scan of this URL.
        schema:
          type: integer
      - name: project_id
        in: query
        required: false
        description: List budgets of this project.
        schema:
          type: integer
      - name: url
        in: query
        required: false
        description: Limit the check to one URL of the scan.
        schema:
          type: string
      - name: fail_status
        in: query
        required: false
        description: Answer 409 when a budget is over.
        schema:
          type: integer
          enum:
          - 1
      responses:
        '200':
          description: Budget status, or the budget list with project_id.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/BudgetStatus'
                - $ref: '#/components/schemas/BudgetList'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: fail_status=1 and at least one budget is over.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BudgetStatus'
        '422':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
    post:
      operationId: setBudget
      tags:
      - Budgets
      summary: Create, change or delete a budget (paid plans)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  type: integer
                url_id:
                  type: integer
                  description: Budget for one URL instead of the whole project.
                metric:
                  type: string
                  enum:
                  - total_kb
                  - script_kb
                  - image_kb
                  - stylesheet_kb
                  - font_kb
                  - third_party_kb
                  - third_party_count
                  - request_count
                  - perf_score
                  - lab_lcp_ms
                  - tbt_ms
                  - lab_cls
                  - fcp_ms
                  - ttfb_ms
                  - field_lcp_ms
                  - field_inp_ms
                  - field_cls
                  - field_fcp_ms
                  - field_ttfb_ms
                  description: field_* metrics only for mobile.
                device:
                  type: string
                  enum:
                  - mobile
                  - desktop
                  default: mobile
                limit:
                  oneOf:
                  - type: number
                  - type: string
                  description: Number in the metric unit or a string with unit such as "1.5 MB" or "2.5 s".
                goal:
                  oneOf:
                  - type: number
                  - type: string
                ratchet:
                  type: boolean
                ratchet_step:
                  oneOf:
                  - type: string
                    enum:
                    - round
                  - type: integer
                    minimum: 1
                    maximum: 50
                delete:
                  type: boolean
              required:
              - project_id
              - metric
      responses:
        '200':
          description: Saved budget, or deleted.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/Budget'
                - type: object
                  properties:
                    deleted:
                      type: boolean
                  required:
                  - deleted
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    Budget:
      type: object
      properties:
        project_id:
          type: integer
        url_id:
          anyOf:
          - type: integer
          - type: 'null'
        metric:
          type: string
        device:
          type: string
        unit:
          type: string
        limit:
          type: number
        goal:
          anyOf:
          - type: number
          - type: 'null'
        ratchet:
          type: object
          properties:
            enabled:
              type: boolean
            step:
              oneOf:
              - type: string
              - type: integer
            next_check:
              anyOf:
              - type: string
              - type: 'null'
    Meta:
      type: object
      properties:
        upgrade:
          type: object
          properties:
            reason:
              type: string
            required_plan:
              type: string
            unlocks:
              type: string
            url:
              type: string
    BudgetList:
      type: object
      properties:
        project_id:
          type: integer
        budgets:
          type: array
          items:
            type: object
            additionalProperties: true
        ratchet_log:
          type: array
          maxItems: 50
          items:
            type: object
            additionalProperties: true
        metrics:
          type: array
          items:
            type: string
      required:
      - project_id
      - budgets
    Error:
      type: object
      description: 'Errors are flat: a code, usually a message, and further detail fields on the same level.'
      properties:
        error:
          type: string
        message:
          type: string
        required_plan:
          type: string
        upgrade_url:
          type: string
        retry_after:
          type: integer
        next_scan_at:
          anyOf:
          - type: string
          - type: 'null'
        _meta:
          $ref: '#/components/schemas/Meta'
      required:
      - error
      additionalProperties: true
    BudgetStatus:
      type: object
      properties:
        message:
          type: string
        scan_id:
          anyOf:
          - type: string
          - type: 'null'
        measured_at:
          anyOf:
          - type: string
          - type: 'null'
        report_url:
          anyOf:
          - type: string
          - type: 'null'
        status:
          type: string
          enum:
          - done
          - running
          - no_budgets
        passed:
          type:
          - boolean
          - 'null'
        summary:
          type: object
          properties:
            over:
              type: integer
            ok:
              type: integer
            warn:
              type: integer
            no_data:
              type: integer
        urls:
          type: array
          items:
            type: object
            additionalProperties: true
      required:
      - status
  responses:
    TooManyRequests:
      description: 'rate_limited (Retry-After: 60), too_many_failed_attempts, quota_exhausted (free scan window, with next_scan_at) or throttled.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: email_unverified, plan_required (with required_plan and _meta.upgrade), token_scope or a plan limit such as url_limit_reached, competitor_limit, project_limit.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: API temporarily disabled or no measuring capacity (disabled, busy, capacity_exhausted, free_capacity_exhausted).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Unknown or not readable id (not_found, unknown_project_id, unknown_url_id, url_not_found, ...).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: 'Missing or invalid API key (error unauthorized). Header WWW-Authenticate: Bearer.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: Invalid input (missing_url, invalid_url, invalid_devices, invalid_region, invalid_metric, ...).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: PerfDelta API key, e.g. pdk_live_...
externalDocs:
  description: API documentation
  url: https://perfdelta.com/api-docs