Quickstart
Make your first request to the Aperture API and handle the response. Start to finish, this takes about five minutes — no boilerplate, no data team on call.
Install the SDK
Add the Aperture client to your app. It is a single dependency with no peer requirements and runs in the browser, on the server, or at the edge.
npm install @aperture/sdk
# or
pnpm add @aperture/sdk
Authenticate
Initialize the client once, near the top of your app. Every request is authenticated with a bearer token; the SDK reads it from the environment and attaches the header for you.
import { Aperture } from '@aperture/sdk';
export const aperture = new Aperture({
apiKey: process.env.APERTURE_KEY!,
// reads from the live environment by default
environment: 'live',
});
Make your first request
Call a resource method and await the result. Here we list the ten most recent active projects. Every list method accepts the same pagination and filter parameters, so once you know one, you know them all.
const projects = await aperture.projects.list({
limit: 10,
status: 'active',
});
console.log(projects.data.length); // → 10
Within a few milliseconds the response resolves to a typed object — your editor knows projects.data is an array of Project before you ship a line.
Handle the response
Lists are returned in a consistent envelope: a data array, a has_more flag, and a next_cursor you pass back to fetch the following page. Iterate the data and you’re done.
for (const project of projects.data) {
if (project.archived) continue;
render(project.id, project.name);
}
Next steps
That is the whole loop: install, authenticate, request, handle. Everything else in Aperture — webhooks, idempotent writes, exports — builds on these same calls. Before you scale up, note the per-plan rate limits:
| Plan | Reads | Burst | Webhooks |
|---|---|---|---|
| Free | 20 / s | 40 | 5 / s |
| Pro | 100 / s | 200 | 50 / s |
| Scale | 500 / s | 1,000 | 250 / s |
| Enterprise | Custom | Custom | Custom |
Hit a 429? Read the Retry-After header and back off — the retries guide has a drop-in helper.