- Decide the one job your tool does first (authority, backlinks, keywords). It picks the endpoints, and the endpoints set your cost per lookup.
- Keep the API key on your server. The browser calls your server; your server calls the API, caches the answer and returns it.
- Every MrKeyword answer is
{ data, meta };meta.creditsChargedtells you the cost of each call. A 402 means no credits left, a 429 means slow down forRetry-Afterseconds. - Batch where the API allows it: up to 100 domains per authority call and 500 keywords per difficulty, intent or cluster call, charged 1 credit per 10 keywords.
- Cache by domain or keyword for at least a day. With caching, most small tools fit the free Developer plan (500 credits) or API Starter at $29 a month.
What do you need to build an SEO tool?
To build an SEO tool on an API you need four pieces: a data source (the API), a small backend that holds the key and caches answers, a front end that shows the results with their labels, and a price that covers what the API charges you. Everything else, accounts, billing and design, is ordinary web development.
The alternative is collecting the data yourself: a crawler, a link graph, a keyword database and the models on top. That is several long-running systems, and the shortcut many people try, scraping Google's results, is against Google's spam policies. Building on an API lets you test whether anyone wants your tool in days. You can always replace the data layer later if the data itself becomes your product.
This guide uses MrKeyword's Data API for every example because we make it and can show exact requests and prices. The structure works the same with any SEO API; the comparison of SEO APIs covers the others.
Step 1: pick the tool and the data it needs
Start from the single question your tool answers, then map it to the fewest endpoints that answer it. Fewer endpoints mean a lower cost per lookup and a simpler cache. The common tools map like this:
Tools, the data they need, and the endpoint that serves it
| Tool | Question it answers | Endpoint | Credits |
|---|---|---|---|
| Domain authority checker | How strong is this domain? | GET|POST /domains/authority | 1 credit per domain |
| Backlink checker | Who links to this domain? | GET /domains/referring-domains, GET /domains/backlinks | 2 credits each |
| Website traffic checker | Roughly how much organic traffic does it get? | GET|POST /domains/traffic | 1 credit per domain |
| Domain report | Everything at a glance | GET /domains/overview | 3 credits |
| Keyword research tool | What should I target, and how hard is it? | GET /keywords/ideas, GET|POST /keywords/metrics | 2 credits; 1 credit per keyword with data |
| Keyword grader | How hard and what intent, for my list? | POST /keywords/difficulty, POST /keywords/intent | 1 credit per 10 keywords |
| Content planner | How do these keywords group into pages? | POST /keywords/cluster | 1 credit per 10 keywords |
| Competitor keywords | What does that site rank for? | GET /domains/organic-keywords | 3 credits |
GET /api/v1/catalog.Be clear about what you are not building. MrKeyword's API predicts which keywords a domain ranks for, but it does not check live Google results, so it will not power a live rank tracker; for that you need a SERP provider. Saying so on your own page early saves support emails later.
Free keyword research toolMonthly searches fetched live from Google Keyword Planner, with source and time on every figure.
Check a keywordStep 2: get an API key
Create a free MrKeyword account, open Data API in the menu and press Create API key. The key starts with mkd_ and is shown once, so copy it into your server's environment straight away (for example MRKEYWORD_KEY). Every workspace starts on the Developer plan: 500 credits a month and 60 calls a minute, with no card.
- One key per environment. Use separate keys for development and production, so revoking one never breaks the other. A workspace can hold up to 20 live keys.
- Never in the browser. The API allows cross-origin calls, but a key in front-end code can be copied by anyone who opens the page and spent on your bill.
- Set an expiry for experiments. A key can carry an end date and stops working after it.
Step 3: make your first call with curl
Send the key as a Bearer header and the domain or keyword as a query parameter; every success is HTTP 200 with { data, meta }. Start in the terminal so you see the raw answer before writing code.
Authority for one domain
curl "https://app.mrkeyword.io/api/v1/domains/authority?domain=example.com" \
-H "Authorization: Bearer $MRKEYWORD_KEY"
x-api-key: mkd_… works too.What comes back (abridged)
{
"data": {
"input": "example.com",
"domain": "example.com",
"authority": { "value": 46, "label": "Derived", "confidence": "high", "asOf": "2026-12-03", "referringDomains": 312, "reason": null },
"referringDomains": { "value": 312, "label": "Measured" },
"backlinks": { "value": 2184, "label": "Measured", "follow": 1560, "nofollow": 624 }
},
"meta": { "endpoint": "domains.authority", "creditsCharged": 1, "creditsRemaining": 499, "plan": "free", "generatedAt": "2026-12-04T09:30:00.000Z" }
}
Three fields matter in every answer. label says what kind of number it is (Measured, Derived, Estimated, Predicted or Not available). confidence says how much evidence stands behind it. And reason explains a null: when MrKeyword has no data for a domain it says so rather than inventing a number, and your tool should do the same.
Keyword lists go in a JSON body. This call grades three keywords for difficulty in the US market:
Difficulty for a keyword list
curl -X POST "https://app.mrkeyword.io/api/v1/keywords/difficulty" \
-H "Authorization: Bearer $MRKEYWORD_KEY" \
-H "content-type: application/json" \
-d '{"keywords":["plumber near me","emergency plumber","plumber cost"],"market":"US"}'
Step 4: call the API from JavaScript, on your server
Put a thin endpoint of your own in front of the API: the browser asks your server, your server checks its cache, calls MrKeyword only on a miss, and returns the answer. This keeps the key secret, lets you rate-limit your own users, and turns repeat lookups into free ones. The example uses Node 18 or later, which has fetch built in.
server.mjs: a cached authority lookup (Node 18+)
import http from "node:http";
const BASE = "https://app.mrkeyword.io/api/v1";
const KEY = process.env.MRKEYWORD_KEY;
const DAY = 24 * 60 * 60 * 1000;
const cache = new Map(); // domain -> { at, data }
async function authority(domain) {
const hit = cache.get(domain);
if (hit && Date.now() - hit.at < DAY) return hit.data;
const res = await fetch(`${BASE}/domains/authority?domain=${encodeURIComponent(domain)}`, {
headers: { authorization: `Bearer ${KEY}` },
});
const body = await res.json();
if (res.status === 429) throw Object.assign(new Error(body.error), { status: 429, retryAfter: Number(res.headers.get("retry-after") || 60) });
if (!res.ok) throw Object.assign(new Error(body.error), { status: res.status });
console.log("credits left", body.meta.creditsRemaining);
cache.set(domain, { at: Date.now(), data: body.data });
return body.data;
}
http.createServer(async (req, res) => {
const url = new URL(req.url, "http://localhost");
if (url.pathname !== "/api/authority") { res.writeHead(404).end(); return; }
try {
const data = await authority(String(url.searchParams.get("domain") || "").trim().toLowerCase());
res.writeHead(200, { "content-type": "application/json" }).end(JSON.stringify(data));
} catch (error) {
res.writeHead(error.status === 400 ? 400 : 503, { "content-type": "application/json" })
.end(JSON.stringify({ error: error.status === 400 ? error.message : "Try again in a minute." }));
}
}).listen(3000);
Notice what the server does not pass through: it never forwards MrKeyword's 402 or 429 to your visitor as-is. Those are your account's problems, not theirs, so log them and show a friendly retry message. A 400 is the visitor's input (a malformed domain), so its message is safe to show.
Step 5: batch keyword lists in Python
For lists, send as many items per call as the endpoint allows: it is cheaper in round trips and in rate-limit headroom, and the keyword list endpoints charge per ten keywords rather than per call. This script grades a keyword file of any length in chunks of 500, waits when told to, and stops cleanly when credits run out. It uses the requests library.
grade.py: difficulty and intent for a long keyword list
import os, sys, time, requests
BASE = "https://app.mrkeyword.io/api/v1"
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['MRKEYWORD_KEY']}"
def post(path, payload):
while True:
r = session.post(f"{BASE}{path}", json=payload, timeout=60)
if r.status_code == 429:
time.sleep(int(r.headers.get("Retry-After", "60")))
continue
if r.status_code == 402:
sys.exit(f"Out of credits: {r.json()['credits']}")
r.raise_for_status()
return r.json()
keywords = [line.strip() for line in open("keywords.txt") if line.strip()]
rows = []
for i in range(0, len(keywords), 500):
chunk = keywords[i:i + 500]
kd = post("/keywords/difficulty", {"keywords": chunk, "market": "US"})
intent = post("/keywords/intent", {"keywords": chunk})
by_kw = {r["keyword"]: r for r in intent["data"]["results"]}
for r in kd["data"]["results"]:
rows.append((r["keyword"], r["difficulty"], r["label"], by_kw.get(r["keyword"], {}).get("intent")))
print("charged", kd["meta"]["creditsCharged"] + intent["meta"]["creditsCharged"], "credits")
for row in rows:
print(*row, sep="\t")
Step 6: cache, so each lookup is paid for once
Cache every answer by endpoint and input, for as long as the data stays meaningful: a day for domain data, a month for keyword volumes. Without a cache, a popular tool pays for the same lookup every time a visitor types example.com; with one, it pays once a day.
- Key: endpoint plus the normalised input, for example
authority:example.comorkd:US:plumber near me. Lower-case domains and stripwww.before caching. - Lifetime: authority, backlinks and traffic change slowly, so 24 hours is safe. Keyword metrics are monthly figures; a few weeks is fine. Use the
asOfdate in each answer to decide when a cached row is stale. - Cache misses that had no data, too. A domain with a
nullvalue and a reason will usually still be empty tomorrow; cache it for a shorter time, say six hours, so you do not pay for it on every visit. - Warm the cache for the domains and keywords your landing pages show, so the first visitor gets an instant answer.
Step 7: respect rate limits and credits
MrKeyword limits calls per minute per key by plan and charges credits per call; a 429 says wait, a 402 says top up, and a call that fails on MrKeyword's side costs nothing. The plan limits are:
Data API plans: credits and rate limits
| Plan | Price | Credits a month | Calls a minute |
|---|---|---|---|
| Developer | Free | 500 | 60 |
| API Starter | $29 a month | 20,000 | 300 |
| API Growth | $99 a month | 100,000 | 600 |
| API Scale | $299 a month | 400,000 | 1,500 |
- 429 Too Many Requests comes with a
Retry-Afterheader in seconds, the standard defined in RFC 6585. Wait that long, then retry once. Do not retry in a tight loop. - 402 Payment Required means the month's allowance and any packs are spent. The body carries
credits.requiredandcredits.remaining. Alert yourself, not your visitor. - Watch the meter:
meta.creditsRemainingand thex-mrkeyword-credits-remainingheader are on every answer, andGET /usageis free. Alert at 80% of the month's allowance. - Batch to stay under the limit: one POST of 100 domains is one call against the per-minute limit, not a hundred.
Step 8: show results your users can trust
Show each number with its label and date, explain empty results with the API's reason, and never print a zero where the API returned null. SEO numbers from any provider are estimates or partial counts; tools that pretend otherwise lose trust the first time a user compares them with another tool.
- Write the label next to the figure: "Link Authority 46 · Derived · as of 3 Dec 2026".
- Show the confidence, or hide low-confidence scores behind a "limited data" note.
- For keyword difficulty, say it is estimated. For predicted rankings, say they are predictions, not live positions.
- Link counts are the links the index has found, not every link on the web; a short note under the table sets that expectation.
Reselling is allowed. Building a public tool on the Data API is what it is for. Keep the labels, call from your server, and contact MrKeyword for bigger volumes, invoicing or a data feed.
Step 9: do the pricing math
Multiply credits per lookup by expected lookups a month after caching, and pick the plan that covers it with headroom; then price your own tool so one paying user covers many free ones. Five typical tools, worked through MrKeyword's price list:
Monthly API cost for five tools (after caching)
| Tool | Call pattern | Per lookup | Lookups a month | Credits a month | Cheapest fit |
|---|---|---|---|---|---|
| Domain authority checker | One authority call per domain | 1 credit per domain | 3,000 | 3,000 | API Starter at $29 a month |
| Backlink checker | Referring domains + backlinks per domain | 4 credits | 2,000 | 8,000 | API Starter at $29 a month |
| All-in-one domain report | One overview call per domain | 3 credits | 5,000 | 15,000 | API Starter at $29 a month |
| Keyword research tool | One ideas call + difficulty for 50 ideas | 7 credits | 1,500 | 10,500 | API Starter at $29 a month |
| Bulk keyword grader | Difficulty + intent for lists of 500 | 100 credits per list | 400 | 40,000 | API Growth at $99 a month |
Two pricing patterns work well for tools built this way. A free tier with a daily lookup cap per visitor (enforced by your server, by IP or account), with a paid plan for bulk lists and exports, keeps your bill proportional to revenue. Or charge per report, and let the per-report price carry the API cost several times over. Either way, track creditsCharged per user from day one so you know what each customer costs you.
Step 10: launch checklist
Key safety
Production key in server environment only, a separate development key, and a plan for revoking and rotating.
Your own limits
Rate-limit your endpoint per visitor so a bot cannot spend your monthly credits in an hour.
Cache and alerts
Cache hit rate logged, a credits-remaining alert, and a fallback message for 402 and 429.
Honest copy
Labels, dates and a short note on what the data is and is not, on the results page itself.
Measure demand
Log which inputs people try. The domains and keywords they ask for tell you what to build next.
Start building with 500 free creditsCreate a workspace, mint an mkd_ key under Data API and run the requests above. No card on the Developer plan.
For the endpoint detail of each tool type, see the keyword API, the backlink API and the domain authority API. If you are building an AI assistant rather than a web tool, SEO data for AI agents and the MCP server are the better starting points.
Questions and answers
Build an SEO tool questions
Can I build an SEO tool without a crawler?
Yes. An SEO data API supplies the crawled and computed data, such as authority, backlinks and keyword metrics, so your tool only needs a small backend that calls the API, caches answers and shows them.
Which SEO API is best for building a tool?
It depends on the data you need and your budget. Our comparison of seven SEO APIs sets out data, prices and limits; MrKeyword's Data API has a free plan and a single credit price list.
How do I keep my API key secret?
Call the API only from your server, keep the key in an environment variable, and have your front end call your own endpoint. Never put the key in browser JavaScript.
How much does it cost to run an SEO tool on an API?
It depends on unique lookups after caching. On MrKeyword, 3,000 domain authority lookups a month is 3,000 credits, which fits API Starter at $29 a month; the free Developer plan has 500 credits a month.
What should my tool do when the API rate-limits it?
On a 429, wait the number of seconds in the Retry-After header and retry once, and show your visitor a short try-again message. Batch requests so you make fewer calls.
Can I resell data from MrKeyword's API in my own tool?
Yes. Building a public tool on the Data API is what it is for. Call it from your server and keep the labels; contact MrKeyword for large volumes or a data feed.
Sources
- MrKeyword Data API — endpoints, credit costs, plans and rate limits
- MrKeyword OpenAPI 3.1 spec — every endpoint, parameter and response shape
- Spam policies for Google web search — Google Search Central, on scraping results without permission
- Node.js: fetch — the built-in fetch used in the JavaScript example
- Requests: HTTP for Humans — the Python library used in the batching example
- RFC 6585, section 4: 429 Too Many Requests — the status code and the Retry-After header





