MetricSpot Pdfs API
Generate, poll, and download white-label PDF reports.
Generate, poll, and download white-label PDF reports.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/metricspot-com:metricspot-com-pdfs-api"
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.
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: 3.2.0
info:
title: MetricSpot REST Pdfs API
version: '2026-05-16'
summary: Programmatic SEO audits, white-label PDF reports, and HTML previews.
description: 'The MetricSpot REST API lets you run on-demand SEO audits, generate
white-label PDF reports, and render browser-friendly HTML previews for
any URL you own.
Access requires the Pro plan ($49/month) and is capped at 5,000 API
calls per calendar month across all of your tokens. Quota resets on
the 1st of every month.
Most endpoints expect a Bearer API token prefixed with `ms_live_`.
The single anonymous endpoint (`POST /api/public/audit`) is open to
the world and rate-limited by IP.'
contact:
name: MetricSpot Support
email: info@metricspot.com
url: https://app.metricspot.com
license:
name: Proprietary
servers:
- url: https://app.metricspot.com
description: Production
security:
- BearerAuth: []
tags:
- name: pdfs
description: Generate, poll, and download white-label PDF reports.
paths:
/api/audits/{id}/pdf:
post:
tags:
- pdfs
summary: Queue a PDF report
description: 'Queues a white-label PDF render for a completed audit. Pass an
optional `language` (defaults to the user''s account language, then
`en`) and an optional `brand_id` for white-label styling. If
`brand_id` is omitted and the account has one brand kit, it is used
automatically. Poll `GET /api/pdfs/{id}` for status.'
operationId: startPdf
parameters:
- $ref: '#/components/parameters/AuditId'
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/StartPdfRequest'
examples:
defaults:
summary: Default branding, default language
value: {}
spanishBranded:
summary: Spanish, explicit brand kit
value:
language: es
brand_id: 17
responses:
'201':
description: PDF render queued.
content:
application/json:
schema:
type: object
required:
- pdf
properties:
pdf:
$ref: '#/components/schemas/PdfQueued'
examples:
queued:
value:
pdf:
id: 88
audit_id: 123456
brand_id: 17
language: en
status: pending
created_at: '2026-05-16T10:05:00.000Z'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PlanCap'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: Audit is not yet complete.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
notReady:
value:
error: Audit not yet complete
'429':
$ref: '#/components/responses/Quota'
/api/audits/{id}/report:
get:
tags:
- pdfs
summary: HTML preview of the audit report
description: 'Returns a self-contained HTML document with the same data and
template as the PDF. Useful for in-browser QA of white-label
styling before generating a real download. The response is marked
`Cache-Control: private, no-store` because the underlying audit
data is authentication-gated.'
operationId: previewReport
parameters:
- $ref: '#/components/parameters/AuditId'
- in: query
name: lang
required: false
description: Locale for the report copy. Defaults to `en`.
schema:
type: string
example: en
- in: query
name: brand_id
required: false
description: Brand kit to apply. Omit for default styling.
schema:
type: integer
minimum: 1
example: 17
responses:
'200':
description: Rendered HTML preview.
content:
text/html:
schema:
type: string
description: Self-contained HTML document.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PlanCap'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: Audit is not yet complete.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
$ref: '#/components/responses/Quota'
/api/pdfs/{id}:
get:
tags:
- pdfs
summary: Get PDF status or download
description: 'Default behavior returns JSON with the render status. If the
request sets `Accept: application/pdf` AND the PDF is `ready`, the
endpoint streams the binary PDF instead.'
operationId: getPdf
parameters:
- $ref: '#/components/parameters/PdfId'
- in: header
name: Accept
required: false
description: 'Use `application/json` (default) to poll status, or
`application/pdf` to download the binary when ready.
'
schema:
type: string
example: application/json
responses:
'200':
description: Either a JSON status payload or the binary PDF, based on `Accept`.
content:
application/json:
schema:
type: object
required:
- pdf
properties:
pdf:
$ref: '#/components/schemas/PdfStatus'
examples:
pending:
value:
pdf:
id: 88
audit_id: 123456
status: pending
error_message: null
created_at: '2026-05-16T10:05:00.000Z'
generated_at: null
download_url: null
ready:
value:
pdf:
id: 88
audit_id: 123456
status: ready
error_message: null
created_at: '2026-05-16T10:05:00.000Z'
generated_at: '2026-05-16T10:05:30.000Z'
download_url: /api/pdfs/88/download
application/pdf:
schema:
type: string
format: binary
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'410':
description: PDF was generated but the file is no longer on disk.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
gone:
value:
error: File missing on disk
'429':
$ref: '#/components/responses/Quota'
/api/pdfs/{id}/download:
get:
tags:
- pdfs
summary: Download a ready PDF
description: 'Streams the binary PDF as `application/pdf` with a
`Content-Disposition: attachment` header. The PDF must be in status
`ready` and the file must still exist on disk.'
operationId: downloadPdf
parameters:
- $ref: '#/components/parameters/PdfId'
responses:
'200':
description: PDF binary.
headers:
Content-Disposition:
schema:
type: string
example: attachment; filename="example.com-audit.pdf"
content:
application/pdf:
schema:
type: string
format: binary
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: PDF is not yet ready.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
notReady:
value:
error: PDF not ready
'410':
description: PDF row exists but the file is no longer on disk.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
gone:
value:
error: File missing
'429':
$ref: '#/components/responses/Quota'
components:
schemas:
PdfStatusEnum:
type: string
enum:
- pending
- rendering
- ready
- failed
Error:
type: object
required:
- error
properties:
error:
type: string
description: Short machine-readable error code or label.
message:
type: string
description: Human-readable explanation when present.
code:
type: string
description: Optional secondary code used by some plan-gate errors.
used:
type: integer
description: Quota usage so far (present on quota responses).
limit:
type: integer
description: Quota cap (present on quota responses).
additionalProperties: true
PdfStatus:
description: 'Polling response for `GET /api/pdfs/{id}` with `Accept: application/json`.'
type: object
required:
- id
- audit_id
- status
properties:
id:
type: integer
audit_id:
type: integer
status:
$ref: '#/components/schemas/PdfStatusEnum'
error_message:
type:
- string
- 'null'
created_at:
type: string
format: date-time
generated_at:
type:
- string
- 'null'
format: date-time
download_url:
type:
- string
- 'null'
description: Populated only when status is `ready`. Relative URL to the download endpoint.
StartPdfRequest:
type: object
properties:
language:
type: string
description: Locale code for the report copy (e.g. `en`, `es`, `fr`, `de`, `it`). Defaults to the account language, then `en`.
brand_id:
type:
- integer
- 'null'
description: Brand kit id. Omit or null to use default styling (or the account's only brand kit when present).
additionalProperties: false
PlanLimitError:
type: object
required:
- error
properties:
error:
type: string
code:
type: string
message:
type: string
plan:
$ref: '#/components/schemas/PlanId'
used:
type: integer
cap:
type: integer
resets_at:
type: string
format: date-time
additionalProperties: true
PdfQueued:
type: object
required:
- id
- audit_id
- language
- status
- created_at
properties:
id:
type: integer
audit_id:
type: integer
brand_id:
type:
- integer
- 'null'
language:
type: string
example: en
status:
$ref: '#/components/schemas/PdfStatusEnum'
created_at:
type: string
format: date-time
PlanId:
type: string
enum:
- free
- starter
- premium
- pro
responses:
Forbidden:
description: Authenticated but not allowed to access this resource.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
notOwner:
value:
error: Forbidden
BadRequest:
description: Malformed request (bad id, missing or invalid body, bad query param).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
badId:
value:
error: Bad id
invalidBody:
value:
error: Invalid JSON body
Quota:
description: API call quota exceeded for the current calendar month.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
quota:
value:
error: quota_exceeded
message: Monthly API quota of 5000 calls reached. Resets on the 1st.
used: 5000
limit: 5000
PlanCap:
description: 'Plan-specific limit reached (monthly audit cap, white-label
restriction, paid-plan-only feature).
'
content:
application/json:
schema:
$ref: '#/components/schemas/PlanLimitError'
examples:
auditCap:
value:
error: Plan limit reached
code: audit_cap
message: Your Pro plan includes 500 audits/month. You've used 500 this month.
plan: pro
used: 500
cap: 500
resets_at: '2026-06-01T00:00:00.000Z'
whiteLabel:
value:
error: Plan limit reached
message: White-label PDFs require Starter or Pro.
plan: free
Unauthorized:
description: Missing or invalid bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
badToken:
value:
error: Invalid API token
NotFound:
description: Resource not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
notFound:
value:
error: Not found
parameters:
PdfId:
in: path
name: id
required: true
description: PDF report row id.
schema:
type: integer
minimum: 1
example: 88
AuditId:
in: path
name: id
required: true
description: Audit row id.
schema:
type: integer
minimum: 1
example: 123456
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: ms_live_<random>
description: 'Bearer token issued from the dashboard under Account, API tokens.
Tokens are prefixed with `ms_live_` and pass plan and quota gates
on every request.
'