Map
POST/api/map discovers the URLs on a site fast, without reading every page — from sitemap.xml, or by extracting same-origin links when there is no sitemap. Metered per request; far cheaper than reading pages. This endpoint is live. (A GET form with ?url= is also supported.)
Request body
urlstringrequired
Any URL on the site to map. Discovery runs against its origin.
Example
curl -X POST https://synoppy.com/api/map \
-H "Authorization: Bearer $SYNOPPY_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com" }'Response
{
"success": true,
"domain": "example.com",
"urls": [
"https://example.com/pricing",
"https://example.com/docs",
"https://example.com/about"
],
"count": 1204,
"source": "sitemap",
"latencyMs": 288,
"creditsUsed": 1,
"creditsRemaining": 4999
}The source field reports which path was used — "sitemap" or "links".
Response fields
successboolean
True when discovery succeeded.
domainstring
The origin the URLs were discovered from.
urlsstring[]
Absolute URLs found on the domain (capped per request).
countnumber
Total number of URLs returned.
source"sitemap" | "links"
Which path produced the list — a parsed sitemap.xml, or same-origin link extraction when no sitemap exists.
latencyMsnumber
End-to-end time in milliseconds.
creditsUsednumber
Credits charged — metered per request; far cheaper than reading pages.
creditsRemainingnumber
Your credit balance after this call (null for anonymous playground calls).
In code
import { Synoppy } from "@synoppy/sdk";
const synoppy = new Synoppy({ apiKey: process.env.SYNOPPY_API_KEY });
const res = await synoppy.map("https://example.com");
console.log(res.count, res.urls);