Docs home

SDKs

Official clients. One method per endpoint, named after the route, same fields as the raw API. Swift and Kotlin take an app key and send the bundle ID. A language we don't have? Plain HTTP works everywhere. See the authentication guide for request headers. AI agents get the same lookups as tools, see MCP.

Authentication guide

1. Install

Terminal
npm install @parseapi/sdk

2. Add your key

Create a secret key in Keys. Set it in the terminal that will run the example. Keep it on your server.

Terminal environment
export PARSEAPI_KEY='YOUR_API_KEY'

3. Make a request

Look up a country and print its name. This lookup uses your plan's request allowance.

example.mjs
import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI(); // Reads PARSEAPI_KEY.
const country = await parse.country('US');
console.log(country.name);
Run
node example.mjs

Handle errors by code, such as invalid_api_key or not_found. A response with valid: false is a successful lookup.

Handle API errors in your app

The same request, with a handler for API errors. Transport failures still propagate.

example.mjs
import { parseAPI, ParseAPIError } from '@parseapi/sdk';

const parse = parseAPI(); // Reads PARSEAPI_KEY.

try {
  const country = await parse.country('US');
  console.log(country.name);
} catch (error) {
  if (error instanceof ParseAPIError) {
    console.error(error.code, error.status, error.requestId);
  }
  throw error;
}

MIT licensed, source on GitHub.

Questions? Email