Quickstart

Get your first ARCP query running in under 10 minutes.

Prerequisites

1. Install the client

npm install @arcp/client

2. Set your API key

export ARCP_API_KEY=arcp_your_key_here
export ARCP_CLIENT_ID=my-app

3. Make your first query

import { ArcpClient } from "@arcp/client";

const arcp = new ArcpClient({
  apiKey: process.env.ARCP_API_KEY,
  clientId: process.env.ARCP_CLIENT_ID,
});

const result = await arcp.query({
  query: "what are the best smartphones of 2026",
  publishers: ["allreviews", "sportsball", "eighty"],
});

console.log(result.envelopes);   // Content from publishers
console.log(result.receipts);    // Usage receipts

4. Track render opens

When a user clicks a render link, track the open to issue a signed receipt for the publisher:

await arcp.trackRenderOpened({
  publisherId: "allreviews",
  contentId: "ar-smartphone-2026",
  userId: "user-123",
});

Direct API (no client library)

You can also use the REST API directly:

curl -X POST https://router.arcp-protocol.com/v1/router/query \
  -H "Authorization: Bearer $ARCP_API_KEY" \
  -H "Content-Type: application/json" \
  -H "User-Agent: my-app/1.0" \
  -d '{
    "query": "best smartphones 2026",
    "publishers": ["allreviews"],
    "client_id": "my-app"
  }'

Next steps