Synoppy v1.0 is here— start free
DocsCrawl
Endpoint

Crawl

POST/api/crawl discovers a domain's URLs (sitemap.xml or same-origin links) and reads each page with the Read engine, returning one clean Markdown document per page. Each page is metered like a Read (by its real work); requires an API key. This endpoint is live.

Request body

urlstringrequired
Any URL on the site. Discovery runs against its origin.
limitnumber
Maximum pages to read. 1–25, defaults to 10.

Example request

curl -X POST https://synoppy.com/api/crawl \
  -H "Authorization: Bearer $SYNOPPY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com", "limit": 10 }'

Response

{
  "success": true,
  "domain": "example.com",
  "discovered": 1204,
  "count": 10,
  "pages": [
    {
      "url": "https://example.com/",
      "title": "Home",
      "markdown": "# Welcome\n...",
      "words": 142
    }
  ],
  "latencyMs": 2049,
  "creditsUsed": 20,
  "creditsRemaining": 4980
}

Response fields

successboolean
True when the crawl succeeded.
domainstring
The origin that was crawled.
discoverednumber
Total URLs found on the domain.
countnumber
Pages actually read in this crawl (at most limit).
pages{ url, title, markdown, words }[]
One entry per page read: url, title (string or null), clean markdown, and a words count.
latencyMsnumber
End-to-end time in milliseconds.
creditsUsednumber
Total credits charged — each page is metered like a Read, then summed.
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.crawl("https://example.com", { limit: 10 });
for (const page of res.pages) console.log(page.url, page.words);