Skip to content

sitelyWebsites as typed APIs.

Type-safe data from real websites. URL in, typed object out.

Design Preview

sitely has no implementation yet. The docs describe the system as it will exist; the architecture is specified end-to-end so implementation can follow the contract exactly. See What is sitely? for the bigger picture.

A 30-second look

ts
import { createClient } from "@sitely/client";
import wikipedia from "@sitely/site-wikipedia";

const sitely = createClient({
    baseUrl: "https://sitely.example/api",
    apiKey: process.env.SITELY_API_KEY!,
    sites: [wikipedia],
});

const article = await sitely
    .site("en.wikipedia.org")
    .resource("article", { title: "TypeScript" });

console.log(article.data.headline);    // "TypeScript"
console.log(article.data.categories);  // ["Programming languages", …]

The site, the resource, the params, and the response shape are all typed against the imported @sitely/site-wikipedia. Drop a package, drop the inference along with it.

The same call from anywhere else, via the HTTP API:

bash
curl "https://sitely.example/api/v1/sites/en.wikipedia.org/article?title=TypeScript" \
    -H "Authorization: Bearer sitely_sk_..."

The client adds inference, retries, pagination, and cancellation. The HTTP API is the contract underneath.

What you get

  • One npm package per site. Each site package declares typed resources (article, product, recipe). Schemas can compose schema.org types or be fully custom — interop where useful, no ceiling.
  • No fallback path; no surprise shapes. Every response comes from a typed site package. URLs whose hostname isn't covered return a clean error, not a best-effort guess.
  • Caching with sensible defaults. Hot Redis + cold Postgres, per-resource TTL, consumer-side max-age control, stale data as a fallback when extraction fails (opt-out via acceptStale: false).
  • Request coalescing. Ten parallel calls to the same URL trigger one extraction.
  • Rate limits on your behalf. Per-key for fairness; per-site for politeness; surfaced as 429 with Retry-After.
  • robots.txt respected by default. No flag overrides it on the server path.
  • Deterministic builds. Site packages compile reproducibly; the published manifest is byte-identical to a clean rebuild, signed-friendly, and diffable across versions.

Where to start

You want to…Start here
Call sitely from TypeScriptUsing the client
Call sitely from any languageConsuming the HTTP API
Run sitely on your own infrastructureSelf-hosting the server
Add a new siteWriting a site package
Understand the architectureArchitecture overview