Types follow your imports
Install a site package, hand it to createClient, and your domains, resource names, params, and response shapes are all inferred. No codegen. Typos are compile errors.
Try the client
Type-safe data from real websites. URL in, typed object out.
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:
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.
article, product, recipe). Schemas can compose schema.org types or be fully custom — interop where useful, no ceiling.acceptStale: false).429 with Retry-After.| You want to… | Start here |
|---|---|
| Call sitely from TypeScript | Using the client |
| Call sitely from any language | Consuming the HTTP API |
| Run sitely on your own infrastructure | Self-hosting the server |
| Add a new site | Writing a site package |
| Understand the architecture | Architecture overview |