> ## Documentation index
> Fetch the complete documentation index at: https://rankfield.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 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](/?tab=key#playground) 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:

```bash
export RANKFIELD_API_KEY="ls_..."
```

An AI agent can get its own key with one request:

```bash
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:

```bash cURL
curl https://rankfield.dev/v1/domains/wikipedia.org/site-strength \
  -H "Authorization: Bearer $RANKFIELD_API_KEY"
```

```python Python
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"])
```

```javascript JavaScript
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

```json 200
{
  "domain": "wikipedia.org",
  "siteStrength": 100
}
```

`siteStrength` is a 0–100 score from the Rankfield web graph; [How Site Strength works](/docs/site-strength/how-site-strength-works) explains it. Any other status is an error with a JSON body: see [Errors](/docs/get-started/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](/docs).
- Many URLs or keywords at once: [Batch jobs](/docs/get-started/batch-jobs).
- Connect an AI agent: [MCP server](/docs/agents/mcp-server) or [Agent skill](/docs/agents/agent-skill).
