Docs
Quickstart: your first RankHound API request
Mint a key, confirm it, make a real request. Five minutes end to end, and nothing to install.
Before you start
You need a RankHound account with at least one brand set up, and the Owner or Admin role, because those are the only roles that may mint a key.
The API reads what RankHound has already done and what has already been collected. It triggers neither, so a brand that finished onboarding an hour ago may not have a week of rankings yet, or enough AI answers to quote a rate from. See how to read our numbers.
Four steps
- 1
Mint a key
Go to API keys in the app and create one. It starts
rh_live_and is shown once. Copy it somewhere safe before you close the dialog. - 2
Put it in the environment
Never in source control, never in front-end code. It reads every brand the key covers.
- 3
Confirm it with /me
One request that proves the key works and tells you the rules in force.
- 4
Ask a real question
This week's rankings for your target keywords, the agent's articles, or per-engine AI visibility.
Step 1 and 2: the key
export RANKHOUND_API_KEY=rh_live_...Keys belong to the organisation, not to you. They survive the person who made them leaving, and a request is not re-checked against that person's role — demoting an admin must not take production down at 3am. Revoke a key when someone leaves; deleting the user does not.
Step 3: confirm the key with /me
curl -H "X-API-Key: $RANKHOUND_API_KEY" \
https://app.rankhound.ai/api/v1/meA 200 means the key is good. The response carries your plan, whether the key is pinned to a single brand, your current rate-limit position, and a reporting_rules block with the live thresholds. Read those rather than hardcoding 5: if we change the floor, your client should follow without a release.
Anything else means something specific. The full list is on errors and rate limits.
Step 4: your first real request
Start with this week's rankings for your target keywords. If your organisation has one brand, this is all it takes. /agent answers what RankHound did this week, and /visibility reads AI visibility tracking the same way.
curl -H "X-API-Key: $RANKHOUND_API_KEY" \
"https://app.rankhound.ai/api/v1/keywords"If you have more than one brand you will get 400 brand_required. That is the API refusing to guess. Call /brands, take the id, pass it on every request after that. Full detail on working with multiple brands.
curl -H "X-API-Key: $RANKHOUND_API_KEY" \
"https://app.rankhound.ai/api/v1/brands"
curl -H "X-API-Key: $RANKHOUND_API_KEY" \
"https://app.rankhound.ai/api/v1/keywords?brand=<id>"Before you render any of it
Three rules for the SEO numbers
Every SEO tool and endpoint carries these. Each one is a way to report a ranking or an article wrongly while looking right.
- 1
A null number is never zero.
It means not measured yet, or, for a rank inside a completed check, not in the top 100. An article's results stay null until it is published and Google reports the page; a keyword's rank.latest is null until its first check. Never render either as 0 clicks or position 0.
- 2
Ranks are checked weekly, not live.
Quote a position as of the week it was checked (rank.latest.week_start). A rank check runs once a week through the top 100, and its results arrive over a few hours rather than instantly.
- 3
These tools only read.
Approving, rejecting or publishing an article happens in RankHound, so send the customer there for it. There is no endpoint, flag or tool that publishes.
Three rules you must not break
These are not style preferences. Breaking them produces a confidently wrong report in your customer's name.
- 1
A null rate means "not enough answers yet". It is NOT zero.
Rates come back as {present, responses, rate, min_sample}. When rate is null, the sample is below the floor. Say “3 of 4 answers, too few to quote a percentage”. Never render it as 0%, and never let it into an average. Reporting “0% visibility” for a brand that was named in 3 of 4 answers is the single most damaging thing you can do with this data.
- 2
Never average the engines.
There is no single visibility score and you must not compute one. ChatGPT, Perplexity and Google AI Overviews are different surfaces that disagree, so a mean describes nothing real. Report per engine. If the user insists on one number, give them the pooled counts (present and responses summed) and say plainly what you did.
- 3
An empty alerts list does NOT mean nothing changed.
A finding is raised only when both comparison windows carry enough answers AND the move is larger than its own margin of error. On a small plan that excludes most real movement. Say “no change large enough to distinguish from noise at this sample size”. GET /me shows the thresholds in force.
If you would rather not write HTTP
Inside an AI assistant, the hosted MCP server gives it the same reads as tools, with no install and no key handling in the conversation. The CLI will do the same from a terminal or a CI job once it is on npm.
Not installable yet. @rankhound/cli is written and tested but is not published on npm, so there is no install command to give you. The hosted MCP server needs no install and works now, and the REST API takes any HTTP client.
Quickstart questions
Answered from the implementation.
Where do I get a RankHound API key?
Should I call /me first?
Why did my request return 400 brand_required?
Can I use the API key in a browser?
Do I need an SDK?
7-day trial
You need data before you can read it
RankHound is SEO automation software that finds the searches your site can win and writes for them, and the API returns what it has already done. Start a trial and the first week's research, rankings and articles are there to read.
Card required, nothing charged for 7 days.
On every plan
- Keyword research and competitor analysis, every week.
- Articles written against the pages that rank, waiting for your approval.
- Google rankings checked weekly, beside your Search Console data.
- Publishing to WordPress or any site by webhook, once you approve.
- AI visibility tracking across six AI assistants.