Skip to content
POST
/api/v1/extract/images

Extract images API

Image audit with alt text and source classification.

POST /api/v1/extract/images audits every image in a markdown document for missing alt text, external vs. relative sources, data URIs, and duplicate references. Built for accessibility and SEO sweeps.

Overview

Find every image reference (inline + reference-style). Each result includes alt text, URL, whether the source is external/absolute/data URI, and whether the alt text is present.

Request

Authenticate with Authorization: Bearer YOUR_API_KEY and send a JSON body containing the parameters below. Pick your language:

curl -X POST 'https://trymarkdownviewer.com/api/v1/extract/images' \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markdown":"![diagram](https://example.com/x.png)"}'

Body parameters

FieldTypeRequiredDescription
markdownstring
required
Markdown source.

Response

Success responses are wrapped in a data field. Errors use { error: { code, message } } with an appropriate HTTP status — see the error reference.

{
  "data": {
    "images": [
      {
        "line": 1,
        "alt": "diagram",
        "url": "https://example.com/x.png",
        "kind": "inline",
        "isExternal": true,
        "isAbsolute": false,
        "isData": false,
        "hasAlt": true
      }
    ],
    "totals": {
      "count": 1,
      "missingAlt": 0,
      "external": 1,
      "relative": 0,
      "data": 0,
      "duplicates": 0
    }
  }
}

Use cases

Accessibility (WCAG) review

Find images missing alt text before publishing.

Asset migration

List every external image to bulk-download or proxy.

Try in browser

Free tools that run the same logic locally — no API key, no upload.

Try it

Send a real request against your account in the API playground. Errors there link straight back to the error reference.