Ranksy has a REST API for sending data in and pulling data out from your own code — enrich merchant records, record activity and usage events, and read back usage, rankings, reviews, traffic, and more. The full endpoint reference lives in the [API reference](https://api.ranksyapp.com).

## What It's For

- **Send data in** — enrich a merchant with `/identify`, and record what happens with `/track` (both [activity and usage events](https://docs.ranksyapp.com/hc/docs/articles/activity-and-usage-events)).
- **Pull data out** — read your usage totals, rankings, reviews, traffic, and competitor data programmatically instead of by hand.

## Create an API Key

Only the [team owner](https://docs.ranksyapp.com/hc/docs/articles/team-management) can create or revoke API keys.

1. Go to **Settings** > **API Keys**.
2. Click **Create key**.
3. Optional: in **Label (optional)**, enter a name for the key.
4. In **Environment**, select **Live** or **Test**.
5. In **Scope**, select **Full access** or **Custom scopes**. For **Custom scopes**, select each scope that the key needs (see below).
6. Optional: in **Expiry (optional)**, select a date. If you leave the field empty, the key does not expire.
7. Click **Create key**.
8. Copy the key. Ranksy shows the key only one time. Store it in a safe location.

A live key starts with `rk_live_`. A test key starts with `rk_test_`. **Full access** gives the key all scopes (`*`), also scopes that Ranksy adds later.

⚠️ **Warning:** Treat an API key like a password. Don't commit it to a repo or ship it in client-side code. If a key leaks, revoke it in **Settings** > **API Keys**. Then create a new key.

## Making a Request

The base URL is `https://ranksyapp.com/api/v1`. Send your key as a Bearer token. The `{app}` in a URL is the ULID of the app the request is about. To find the ULID of your apps, send `GET /api/v1/apps`.

```bash
curl https://ranksyapp.com/api/v1/apps/{app}/usage-metrics \
  -H "Authorization: Bearer rk_live_..."
```

```bash
curl -X POST https://ranksyapp.com/api/v1/apps/{app}/track \
  -H "Authorization: Bearer rk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "myshopify_domain": "store.myshopify.com",
    "event_handle": "messages_sent",
    "attributes": { "value": 12 }
  }'
```

The second example sends a usage event. A usage event needs the `crm:write` and `appevents:write` scopes.

To check a key, send `GET /api/v1/me`. The response shows your team, the scopes of the key, and the number of apps that your team tracks.

## Scopes

Each key carries only the scopes you grant it, so give a key the least it needs. The available scopes:

| Scope | Grants |
| --- | --- |
| `apps:read` | Your apps, app overviews, and store listings |
| `metrics:read` | Revenue, MRR, installs, churn, and other business metrics, with the subscription and transaction rows |
| `traffic:read` | Traffic, attribution, installs by source, and keyword analytics |
| `rankings:read` | Keyword and category rankings, rank history, and keyword focus |
| `reviews:read` | App reviews |
| `competitors:read` | Tracked competitors and overlap stats |
| `scorecard:read` | The competitive scorecard |
| `catalog:read` | The public Shopify App Store catalog |
| `usage:read` | Usage totals (`/usage-metrics`) and the list of events that your app sent with `/track` (`/usage-events`) |
| `crm:read` | [Customers](https://docs.ranksyapp.com/hc/docs/articles/customer-management), notes, tasks, tags, and automation rules |
| `crm:write` | `/identify`, `/track`, and changes to notes, tasks, and tags |
| `appevents:write` | Usage events (`event_handle`) with `/track`, and forwarding them to Shopify App Events |
| `capi:write` | Merchant identity and session signals for [conversion APIs](https://docs.ranksyapp.com/hc/docs/articles/meta-ads-attribution) (`/capi`) |
| `keywords:write` | [Track and untrack](https://docs.ranksyapp.com/hc/docs/articles/tracked-keywords) App Store keywords |
| `listing:write` | Start [AI listing improvements](https://docs.ranksyapp.com/hc/docs/articles/ai-listing-improvements) |

The exact scope each endpoint needs is listed on its [reference page](https://api.ranksyapp.com).

## Rate Limits

Ranksy limits each app to **120 requests per minute**. Requests that are not for one app, for example `GET /apps`, share a limit of 120 requests per minute for your team. If you send more requests, Ranksy returns `429`. Wait, then send the request again.

Your plan also sets a monthly limit for API requests. Only read requests (`GET`) count toward this limit. Requests to `/identify`, `/track`, `/capi`, `/usage-events`, and `/usage-metrics` do not count. When your team uses all its requests, read requests return `429` with the code `quota_exceeded`. Write requests continue to work. To see your usage, go to **Settings** > **API Keys** and find **API calls used**.

If your plan does not include API requests, read requests return `402` with the code `subscription_required`.

## Common Endpoints

All these paths start with `/apps/{app}`.

- **`/identify`** — enrich a merchant (plan, address, contacts, tags). This is the Ranksy integration. Meta and Reddit conversions, affiliate tracking, the Store profile filter and CRM contacts need it. See [Ranksy Integration: Send Store Data with /identify](https://docs.ranksyapp.com/hc/docs/articles/identify-integration) and the [identify reference](https://api.ranksyapp.com/identify).
- **`/track`** — record an activity or usage event.
- **`/usage-metrics`** — per-handle usage totals over a date range.
- **`/reviews`, `/rankings`, `/traffic/overview`, `/traffic/sources`** — read the same data you see in the dashboard.

Full request and response shapes for every endpoint are in the API reference.

## API, CLI, or AI Assistant (MCP)

Three ways to reach your data, for three different jobs:

- **Developer API** — your app or scripts, reading and writing programmatically. API keys, REST.
- [**AI Assistant (MCP)**](https://docs.ranksyapp.com/hc/docs/articles/connect-ai-assistant-mcp) — you, exploring your data conversationally. Browser authorization, no code.
- [**Ranksy CLI**](https://docs.ranksyapp.com/hc/docs/articles/ranksy-cli) — scripts, cron jobs, and CI checks from your terminal. One binary, same API key.

## Next steps

- [Full API reference](https://api.ranksyapp.com) — See every endpoint, parameter, and response.
- [Ranksy CLI](https://docs.ranksyapp.com/hc/docs/articles/ranksy-cli) — Run the same endpoints from your terminal without writing a client.
- [Activity and Usage Events](https://docs.ranksyapp.com/hc/docs/articles/activity-and-usage-events) — Learn the two kinds of event that `/track` records.
- [Connect an AI Assistant (MCP)](https://docs.ranksyapp.com/hc/docs/articles/connect-ai-assistant-mcp) — Query the same data from an AI assistant.