Skip to main content
Each recipe answers one question — “what is our Visibility Score this month, and how did it move?”, “which domains do the engines cite most?” — with code you can paste and run. Every number a recipe prints is the number the dashboard shows for the same site, range and filters, because the API and the dashboard share one scoring library.

What you’ll need

  • An Enterprise plan. The REST API is Enterprise only; on Basic and Growth, the MCP server answers the same questions inside Claude, ChatGPT and other assistants.
  • An API key. Create one under API & AI assistants in the dashboard (owners only). It starts with rr_api_ and is shown once.
  • The SDK for your language, or nothing at all for curl.

One-time setup

Both SDKs read RANKRAFT_API_KEY from the environment, retry rate-limited requests after the exact Retry-After time, and page through results for you. Packages: rankraft-js on npm · rankraft-py on PyPI. Most recipes need a site_id. Find your site ID once and export it as RANKRAFT_SITE_ID.

Give your AI assistant context

These docs are published as plain text at docs.rankraft.ai/llms.txt. Paste that link into Claude, ChatGPT or Cursor before asking it to write code against the API. In a coding agent, the RankRaft skill or the Claude Code plugin does the same job and knows the conventions below.

Before you build anything

Read Conventions & gotchas. Three rules cause most wrong numbers:
  1. Dates are inclusive UTC days. start_date: "2026-09-01", end_date: "2026-09-30" is all of September.
  2. Never average daily rows into a period score. Ask for the period in one call instead.
  3. Changes are computed by you, from two calls over two windows of equal length.

Recipes

Get started

Conventions & gotchas

Dates, scales, pagination and the mistakes that produce plausible wrong numbers.

Data model

Organization, sites, brands, prompts, engines and answers.

Endpoints at a glance

Every endpoint, its metrics, groupings and filters on one page.

Find your site ID

The one ID every report needs.

Your brand, domains and competitors

Who counts as you, and who counts as a competitor.

Metrics

How metrics are calculated

Every formula, a worked example, and how to reproduce it from raw answers.

Why past numbers change

What is stored once, and what is applied fresh on every request.

Visibility

Visibility Score with change

This period’s score and its change against the previous one.

Headline and daily together

A headline figure and its daily trend, and why they differ.

Visibility over time

Daily, weekly or monthly trend lines.

Competitor leaderboard

Rank yourself against your confirmed competitors.

Compare competitors over time

One line per brand, day by day.

Segment by engine, category or prompt

Where you are strong and where you are missing.

Citations

Owned citation share with change

How much of what the engines cite is your own site.

Citation share and volume over time

Two daily series from one call.

Citation rank by domain

Top cited domains with their change in points.

Where AI gets its answers

Third-party sources worth getting onto.

More recipes

Manage prompts from a CSV

Sync a prompt list from a spreadsheet, with a dry run first.

AI crawler traffic to a warehouse

A daily export of crawler hits.