Search by task, endpoint, field, or error.
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.
1. Install
npm install @parseapi/sdk2. Add your key
Create a secret key in Keys. Set it in the terminal that will run the example. Keep it on your server.
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.
import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI(); // Reads PARSEAPI_KEY.
const country = await parse.country('US');
console.log(country.name);node example.mjsHandle 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.
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