---
title: "Validate a public SVG URL for BIMI readiness"
method: GET
path: "/api/validate"
---

# Validate a public SVG URL for BIMI readiness

`GET /api/validate`

## Request

- Base URL: `https://makebimi.com`
- URL: `https://makebimi.com/api/validate`
- Auth: none declared
- TypeScript: <https://skmtc.dev/makebimi/apis/makebimi-svg-tiny-p-s-validation-api/docs/api/validate/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetches a publicly reachable SVG over HTTPS and returns a detailed validation
report. A syntactically reachable but non-compliant SVG returns HTTP 200 with
`valid: false`; request-shape errors return HTTP 400.

## Query parameters

- `url` string, uri, required

## Response `200`

Validation report returned, including reports for files that are not compliant.

- ValidationReport
  - `valid` boolean, required: True only when all required validation checks pass.
  - `url` string, uri, required: The SVG URL supplied to the validator.
  - `file_size_bytes` integer: Size of the fetched SVG in bytes when the file was retrieved.
  - `file_size_kb` string: Human-readable file size in kilobytes when the file was retrieved.
  - `errors` string[], required: Blocking validation failures.
  - `warnings` string[], required: Non-blocking validation warnings.
  - `checks` ValidationChecks, required
    - `fetchable` boolean, required: The supplied URL is publicly reachable.
    - `is_xml` boolean, required: The response parses as XML.
    - `svg_root` boolean, required: The root element is svg.
    - `namespace_correct` boolean, required: The SVG namespace is http://www.w3.org/2000/svg.
    - `version_1_2` boolean, required: The root SVG element declares version 1.2.
    - `base_profile_tiny_ps` boolean, required: The root SVG element declares baseProfile tiny-ps.
    - `has_viewbox` boolean, required: A viewBox is present.
    - `viewbox_square` boolean, required: The viewBox has a 1:1 aspect ratio.
    - `has_title` boolean, required: A title element is present.
    - `no_scripts` boolean, required: No script elements are present.
    - `no_external_refs` boolean, required: No external href or xlink:href references are present.
    - `no_image_elements` boolean, required: No image elements are present.
    - `no_embedded_bitmaps` boolean, required: No data-image bitmap content is present.
    - `no_animations` boolean, required: No SVG animation elements are present.
    - `no_foreign_object` boolean, required: No foreignObject elements are present.
    - `file_size_ok` boolean, required: The SVG is no larger than the validator’s recommended 32 KB maximum.
  - `meta` object, required: Extracted SVG metadata, such as viewBox and dimensions, when available.
  - `spec` string, uri, required: Reference SVG Tiny P/S specification.
  - `tool` string, required: Tool attribution string.

## Other responses

- `400`: The required `url` parameter is missing or cannot be parsed as a supported URL.

---

[API](https://skmtc.dev/makebimi/apis/makebimi-svg-tiny-p-s-validation-api.md) - [All operations](https://skmtc.dev/makebimi/apis/makebimi-svg-tiny-p-s-validation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/makebimi/apis/makebimi-svg-tiny-p-s-validation-api/revisions/a0a21b83de06?raw)
