squirrelscan Credits API

Read the active organization's credit balance and pricing.

GitHub OpenAPI

Operations 1

GET /v1/credits Get credit balance #

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/squirrelscan-com:squirrelscan-com-credits-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

squirrelscan-com-credits-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: squirrelscan Public Credits API
  version: 1.0.0
  summary: Programmatic website-audit API for external clients, agents, and MCP integrations.
  description: 'The public `/v1` REST surface of squirrelscan.


    This document covers the **external-client-facing** routes only — internal

    server-to-server callbacks (`/v1/*/internal/*`), webhook receivers

    (`/v1/webhooks`, `/v1/github`), and admin-only routes (`/v1/admin/*`,

    `/v1/stats`, `/v1/users`) are intentionally out of scope and NOT part of the

    public contract.


    All error responses use a stable typed envelope:

    `{ "error": { "code": string, "message": string, "requestId"?: string } }`.


    Authentication is via a bearer token in the `Authorization` header.

    Organization API keys with an `sq_` prefix (`sq_dev_` in development) are the

    primary mechanism for automated clients and agents; set one as the

    `SQUIRRELSCAN_API_KEY` environment variable and the CLI and this REST API both

    pick it up. CLI login tokens (`sqcli_`) and Clerk dashboard JWTs are also

    accepted. MCP clients can reach these same audit tools over the hosted MCP

    server at https://mcp.squirrelscan.com/mcp.'
  contact:
    name: squirrelscan support
    url: https://squirrelscan.com
  license:
    name: Proprietary
servers:
- url: https://api.squirrelscan.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Credits
  description: Read the active organization's credit balance and pricing.
paths:
  /v1/credits:
    get:
      tags:
      - Credits
      summary: Get credit balance
      description: Current credit balance for the active organization, plus the plan and the credit pricing table. Pass `?orgId=` to target a specific organization the caller is a member of.
      operationId: getCredits
      parameters:
      - name: orgId
        in: query
        required: false
        description: Target a specific organization the caller belongs to. Defaults to the active org.
        schema:
          type: string
      responses:
        '200':
          description: Balance, plan, and pricing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  responses:
    Unauthorized:
      description: 'Missing or invalid credentials (including the shared auth middleware: no/invalid bearer token). Typed envelope with code `UNAUTHORIZED`. Branch on the `401` status, not the message.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Authentication required
    Forbidden:
      description: Authenticated but not permitted (e.g. not a member of the requested organization). Typed envelope; code `FORBIDDEN`, or `NO_ORG` when no active organization is resolved on credit/org-scoped routes. Branch on the `403` status.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            noOrg:
              summary: No active organization resolved
              value:
                error:
                  code: NO_ORG
                  message: No active organization
            forbidden:
              summary: Not permitted (e.g. API key scoped to a different org)
              value:
                error:
                  code: FORBIDDEN
                  message: API key is not scoped to this organization
  schemas:
    UpgradeOffer:
      type: object
      description: The upgrade offer attached to a credit wall. The API builds it once; clients render it and never derive a price or link themselves.
      required:
      - url
      - plan
      - interval
      - name
      - priceMonthUsd
      - priceYearUsd
      - monthlyCredits
      properties:
        url:
          type: string
          format: uri
          description: Deep link to checkout for the organization that hit the wall, after login.
        plan:
          type: string
          enum:
          - pro
          description: Plan slug used in the link.
        interval:
          type: string
          enum:
          - month
          description: Billing interval the link preselects.
        name:
          type: string
          description: Display name of the plan.
        priceMonthUsd:
          type: number
          description: Monthly price in USD.
        priceYearUsd:
          type: number
          description: Annual price in USD.
        monthlyCredits:
          type: integer
          description: Credits granted each month.
    CreditsResponse:
      type: object
      required:
      - balance
      - plan
      - pricing
      - pricingVersion
      properties:
        balance:
          type: integer
          description: Available credits for the organization.
        plan:
          type: object
          description: The organization's plan definition.
          additionalProperties: true
        pricing:
          type: object
          description: Credit cost table keyed by feature.
          additionalProperties: true
        pricingVersion:
          type: integer
          description: Monotonic version of the pricing table.
        upgrade:
          allOf:
          - $ref: '#/components/schemas/UpgradeOffer'
          description: The org-targeted upgrade offer, present on every read so a client can render a credit wall without a 402 (the CLI preflight does). Absent for an unmetered organization and for an organization already on Pro or above.
      example:
        balance: 0
        plan:
          id: free
          name: Free
        pricing: {}
        pricingVersion: 1
        upgrade:
          url: https://app.squirrelscan.com/upgrade?plan=pro&interval=month&org=org_123&src=cli
          plan: pro
          interval: month
          name: Pro
          priceMonthUsd: 19
          priceYearUsd: 190
          monthlyCredits: 3000
    Error:
      type: object
      description: Stable error envelope returned by all public routes.
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code (SCREAMING_SNAKE_CASE). Treat unknown codes as opaque.
            message:
              type: string
              description: Human-readable description. May change; do not match on it.
            requestId:
              type: string
              description: Correlation id for support / log lookups, when available.
          additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Bearer token in the `Authorization` header: `Authorization: Bearer <token>`.


        Programmatic API keys are prefixed `sq_` (issue #154; bearer auth lands in #156). The same scheme today also accepts CLI tokens (`sqcli_` prefix) and Clerk dashboard JWTs.'