Skip to content

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.

~5 minNo card requiredv3.4

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.

terminalbash
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.

lib/aperture.tsts
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.

app/projects.tsts
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.

app/projects.tsts
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:

Rate limits by plan (requests per second)
PlanReadsBurstWebhooks
Free20 / s405 / s
Pro100 / s20050 / s
Scale500 / s1,000250 / s
EnterpriseCustomCustomCustom

Hit a 429? Read the Retry-After header and back off — the retries guide has a drop-in helper.