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

# Quickstart

> Create an API key and make your first request

## 1. Get API access

API access is part of the Researcher, Investigator and Max plans ([pricing](https://www.osintcat.net/pricing)). [Create an account](https://www.osintcat.net/register) if you have none.

## 2. Create a key

1. Open **[Settings → Developer](https://www.osintcat.net/account/developer)**.
2. Create a key, give it a name, and tick the scopes it needs (lookups, account, balance). With none ticked, the key gets all scopes.
3. Copy the key now: it is shown only once.

> [!WARNING]
>
> Keep the key on your server. Anyone with it can run lookups on your account.

## 3. Check the key

[Account](https://docs.osintcat.net/api-reference/endpoint/user.md) does not count as a lookup:

```bash cURL theme={null}
curl "https://www.osintcat.net/api/user" -H "X-API-KEY: YOUR_API_KEY"
```

```python Python theme={null}
import requests

response = requests.get(
    "https://www.osintcat.net/api/user",
    headers={"X-API-KEY": "YOUR_API_KEY"},
    timeout=30,
)
response.raise_for_status()
data = response.json()
print("Plan:", data["account_info"]["plan"])
print("Lookups left today:", data["usage"]["requests_remaining_today"])
```

```javascript JS & TS theme={null}
const response = await fetch("https://www.osintcat.net/api/user", {
  headers: { "X-API-KEY": "YOUR_API_KEY" },
});
const data = await response.json();
console.log("Plan:", data.account_info.plan);
console.log("Lookups left today:", data.usage.requests_remaining_today);
```

```php PHP theme={null}
<?php
$curl = curl_init("https://www.osintcat.net/api/user");
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-KEY: YOUR_API_KEY"],
]);
$data = json_decode(curl_exec($curl), true);
curl_close($curl);
echo "Plan: " . $data["account_info"]["plan"] . "\n";
echo "Lookups left today: " . $data["usage"]["requests_remaining_today"] . "\n";
```

```go Go theme={null}
package main

import (
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://www.osintcat.net/api/user", nil)
    req.Header.Set("X-API-KEY", "YOUR_API_KEY")
    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()
    var data struct {
        AccountInfo struct{ Plan string `json:"plan"` } `json:"account_info"`
        Usage       struct{ Left int `json:"requests_remaining_today"` } `json:"usage"`
    }
    json.NewDecoder(resp.Body).Decode(&data)
    fmt.Println("Plan:", data.AccountInfo.Plan)
    fmt.Println("Lookups left today:", data.Usage.Left)
}
```

```json theme={null}
{
  "account_info": {
    "username": "analyst",
    "email": "analyst@example.com",
    "plan": "Investigator",
    "plan_expires": "2026-11-05T09:12:44"
  },
  "usage": {
    "request_limit_daily": 750,
    "requests_remaining_today": 750,
    "api_access": true
  }
}
```

## 4. Run a lookup

```bash cURL theme={null}
curl "https://www.osintcat.net/api/breach?query=user@example.com" -H "X-API-KEY: YOUR_API_KEY"
```

```python Python theme={null}
import requests

response = requests.get(
    "https://www.osintcat.net/api/breach",
    params={"query": "user@example.com"},
    headers={"X-API-KEY": "YOUR_API_KEY"},
    timeout=60,
)
if response.status_code == 429:
    print("Slow down or wait for tomorrow's allowance:", response.json())
else:
    response.raise_for_status()
    result = response.json()
    print(result["results_count"], "records; lookups left:", result["_meta"]["lookups_left"])
```

```javascript JS & TS theme={null}
const url = new URL("https://www.osintcat.net/api/breach");
url.searchParams.set("query", "user@example.com");
const response = await fetch(url, { headers: { "X-API-KEY": "YOUR_API_KEY" } });
const result = await response.json();
console.log(response.status, result.results_count, result._meta);
```

```php PHP theme={null}
<?php
$curl = curl_init("https://www.osintcat.net/api/breach?" . http_build_query(["query" => "user@example.com"]));
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["X-API-KEY: YOUR_API_KEY"],
    CURLOPT_TIMEOUT => 60,
]);
$result = json_decode(curl_exec($curl), true);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
if ($status === 429) {
    echo "Slow down or wait for tomorrow's allowance\n";
} else {
    echo $result["results_count"] . " records; lookups left: " . $result["_meta"]["lookups_left"] . "\n";
}
```

```go Go theme={null}
package main

import (
    "encoding/json"
    "fmt"
    "net/http"
    "net/url"
)

func main() {
    req, _ := http.NewRequest("GET", "https://www.osintcat.net/api/breach?query="+url.QueryEscape("user@example.com"), nil)
    req.Header.Set("X-API-KEY", "YOUR_API_KEY")
    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()
    if resp.StatusCode == 429 {
        fmt.Println("Slow down or wait for tomorrow's allowance")
        return
    }
    var result struct {
        Count int `json:"results_count"`
        Meta  struct{ LookupsLeft any `json:"lookups_left"` } `json:"_meta"`
    }
    json.NewDecoder(resp.Body).Decode(&result)
    fmt.Println(result.Count, "records; lookups left:", result.Meta.LookupsLeft)
}
```

## Prefer an SDK?

The [official SDKs](https://docs.osintcat.net/sdks.md) send the key for you, read it from the `OSINTCAT_API_KEY` environment variable, and give every answer and error a type. The same lookup:

```typescript JS & TS theme={null}
import { OsintCatClient } from "osintcat";

const client = new OsintCatClient(); // reads OSINTCAT_API_KEY

const result = await client.breach.search({
    query: "user@example.com"
});
console.log(result);
```

```python Python theme={null}
from osintcat import OsintCat

client = OsintCat()  # reads OSINTCAT_API_KEY

result = client.breach.search(
    query="user@example.com",
)
print(result)
```

```go Go theme={null}
package main

import (
	"context"
	"fmt"

	osintcat "github.com/OsintCatHQ/osintcat-go"
	osintcatclient "github.com/OsintCatHQ/osintcat-go/client"
)

func main() {
	client := osintcatclient.NewClient() // reads OSINTCAT_API_KEY
	request := &osintcat.SearchBreachRequest{
		Query: "user@example.com",
	}
	result, err := client.Breach.Search(context.Background(), request)
	if err != nil {
		panic(err)
	}
	fmt.Printf("%+v\n", result)
}
```

```php PHP theme={null}
<?php
require __DIR__ . '/vendor/autoload.php';

use OsintCat\OsintCatClient;
use OsintCat\Breach\Requests\SearchBreachRequest;

$client = new OsintCatClient(); // reads OSINTCAT_API_KEY

$result = $client->breach->search(
    new SearchBreachRequest([
        'query' => 'user@example.com',
    ]),
);
echo json_encode($result, JSON_PRETTY_PRINT), PHP_EOL;
```

[Set up an SDK step by step](https://docs.osintcat.net/sdks.md).

## Good practice

* **Handle `429`.** Stay under 3 requests per second and wait for `Retry-After` when a request is refused. See [Rate limits](https://docs.osintcat.net/api-reference/introduction.md#rate-limits).
* **Check access first.** [Modules](https://docs.osintcat.net/api-reference/endpoint/modules.md) shows which lookups your plan includes.
* **Keep keys apart.** Use one key per application, with only the scopes it needs, so you can revoke one without stopping the others.
* **Log `request_id`.** Every error answer names one, and a server error also an `error_id`; support can find the request with either.

## Next

> [card] [Introduction](https://docs.osintcat.net/api-reference/introduction.md)
>
> Plans, billing, limits and every error

> [card] [Breach Lookup](https://docs.osintcat.net/api-reference/endpoint/breach.md)
>
> The most used lookup


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.