Quickstart
Get an API key, make your first Rankfield request with cURL, Python or JavaScript, and read the answer.
1. Get an API key
Open the API key panel and click Copy. There is no sign-up, no card and no expiry date. Keys start with ls_.
Keep the key in an environment variable rather than in your code:
cURL
export RANKFIELD_API_KEY="ls_..."An AI agent can get its own key with one request:
cURL
curl -sS -X POST https://rankfield.dev/v1/keys -H 'Origin: https://rankfield.dev'The answer's key field holds the key.
2. Make your first request
Ask for the Site Strength of a domain. Send the key as a bearer token:
curl https://rankfield.dev/v1/domains/wikipedia.org/site-strength \
-H "Authorization: Bearer $RANKFIELD_API_KEY"import os, requests
response = requests.get(
"https://rankfield.dev/v1/domains/wikipedia.org/site-strength",
headers={"Authorization": f"Bearer {os.environ['RANKFIELD_API_KEY']}"},
)
response.raise_for_status()
print(response.json()["siteStrength"])const response = await fetch("https://rankfield.dev/v1/domains/wikipedia.org/site-strength", {
headers: { Authorization: `Bearer ${process.env.RANKFIELD_API_KEY}` },
});
if (!response.ok) throw new Error((await response.json()).error.message);
console.log((await response.json()).siteStrength);3. Read the answer
200
{
"domain": "wikipedia.org",
"siteStrength": 100
}siteStrength is a 0–100 score from the Rankfield web graph; How Site Strength works explains it. Any other status is an error with a JSON body: see Errors.
The API does not send CORS headers. Call it from a server, a script or an agent, not from browser JavaScript on another site.
Next steps
- Pick an endpoint from the docs overview.
- Many URLs or keywords at once: Batch jobs.
- Connect an AI agent: MCP server or Agent skill.