Synoppy v1.0 is here— start free
DocsImages
Endpoint

Images

POST/api/images returns every image on a page — including lazy-loaded and srcset sources plus the Open Graph card image — with alt text, resolved to absolute URLs and de-duplicated. Metered per request by the bytes read. This endpoint is live.

Request body

urlstringrequired
The page to pull images from.

Example request

curl -X POST https://synoppy.com/api/images \
  -H "Authorization: Bearer $SYNOPPY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://stripe.com" }'

Response

{
  "success": true,
  "url": "https://stripe.com",
  "count": 62,
  "images": [
    {
      "src": "https://images.stripeassets.com/.../hero.png",
      "alt": "Social card image",
      "width": 1200,
      "height": 630
    }
  ],
  "latencyMs": 1136,
  "creditsUsed": 1,
  "creditsRemaining": 4999
}

Response fields

successboolean
True when the page was read.
urlstring
The page the images were pulled from.
countnumber
Number of images returned.
images{ src, alt, width, height }[]
One entry per image: src (absolute URL), alt (string or null), width / height (numbers when declared on the element, else null). Includes lazy-loaded and srcset sources plus the Open Graph card image; data: URIs and duplicates are dropped.
latencyMsnumber
End-to-end time in milliseconds.
creditsUsednumber
Credits charged — metered per request by the bytes read.
creditsRemainingnumber
Your credit balance after this call.

In code

import { Synoppy } from "@synoppy/sdk";
const synoppy = new Synoppy({ apiKey: process.env.SYNOPPY_API_KEY });

const res = await synoppy.images("https://stripe.com");
console.log(res.count, res.images);