### Install Go SDK with go get Source: https://github.com/osintcathq/docs/blob/master/sdks.mdx Install the official OsintCat Go SDK. Requires Go 1.21 or later. ```sh go get github.com/OsintCatHQ/osintcat-go ``` -------------------------------- ### Example /api/user response Source: https://github.com/osintcathq/docs/blob/master/quickstart.mdx Example JSON response from the /api/user endpoint, showing account info and usage details. ```json { "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 } } ``` -------------------------------- ### PHP SDK example for account->get() Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/user.mdx Uses the official OsintCat PHP SDK. Reads the API key from the OSINTCAT_API_KEY environment variable. ```php account->get(); echo json_encode($result, JSON_PRETTY_PRINT), PHP_EOL; ``` -------------------------------- ### Go SDK example for Account.Get() Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/user.mdx Uses the official OsintCat Go SDK. Reads the API key from the OSINTCAT_API_KEY environment variable. ```go package main import ( "context" "fmt" osintcatclient "github.com/OsintCatHQ/osintcat-go/client" ) func main() { client := osintcatclient.NewClient() // reads OSINTCAT_API_KEY result, err := client.Account.Get(context.Background()) if err != nil { panic(err) } fmt.Printf("%+v\n", result) } ``` -------------------------------- ### SDK examples for machine details Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/machine-viewer.mdx Official SDK examples for the same request. Each reads your API key from the OSINTCAT_API_KEY environment variable. ```typescript import { OsintCatClient } from "osintcat"; const client = new OsintCatClient(); // reads OSINTCAT_API_KEY const result = await client.machineViewer.machine({ machine_id: "742e1f66-f449-4a6c-80d5-8f5eb8e9c2b5" }); console.log(result); ``` ```python from osintcat import OsintCat client = OsintCat() # reads OSINTCAT_API_KEY result = client.machine_viewer.machine( machine_id="742e1f66-f449-4a6c-80d5-8f5eb8e9c2b5", ) print(result) ``` ```go 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.MachineMachineViewerRequest{ MachineID: "742e1f66-f449-4a6c-80d5-8f5eb8e9c2b5", } result, err := client.MachineViewer.Machine(context.Background(), request) if err != nil { panic(err) } fmt.Printf("%+v\n", result) } ``` ```php machineViewer->machine( '742e1f66-f449-4a6c-80d5-8f5eb8e9c2b5', ); echo json_encode($result, JSON_PRETTY_PRINT), PHP_EOL; ``` -------------------------------- ### Run a breach lookup with cURL Source: https://github.com/osintcathq/docs/blob/master/quickstart.mdx Sends a GET request to the OSINT Cat breach API with a query parameter and API key header. Replace YOUR_API_KEY with your actual key. ```bash curl "https://www.osintcat.net/api/breach?query=user@example.com" -H "X-API-KEY: YOUR_API_KEY" ``` -------------------------------- ### Python SDK example for account.get() Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/user.mdx Uses the official OsintCat SDK. Reads the API key from the OSINTCAT_API_KEY environment variable. ```python from osintcat import OsintCat client = OsintCat() # reads OSINTCAT_API_KEY result = client.account.get() print(result) ``` -------------------------------- ### Install Python SDK from GitHub Source: https://github.com/osintcathq/docs/blob/master/sdks.mdx Install the official OsintCat Python SDK from GitHub until it is on PyPI. Requires Python 3.10 or later. Do not pip install osintcat as that name still holds an old client. ```sh pip install "git+https://github.com/OsintCatHQ/osintcat-python@main" ``` -------------------------------- ### Go HTTP example for Minecraft Player Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/minecraft.mdx Creates an HTTP GET request to the Minecraft Player endpoint with query 'Notch' and the X-API-KEY header. Prints the status code and response body. ```go package main import ( "fmt" "io" "net/http" ) func main() { req, _ := http.NewRequest("GET", "https://www.osintcat.net/api/minecraft?query=Notch", 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() body, _ := io.ReadAll(resp.Body) fmt.Println(resp.StatusCode, string(body)) } ``` -------------------------------- ### SDK examples for downloading machine Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/machine-viewer.mdx Official SDK examples for JS/TS, Python, Go, and PHP. Each client reads your API key from OSINTCAT_API_KEY environment variable. ```typescript import { OsintCatClient } from "osintcat"; const client = new OsintCatClient(); // reads OSINTCAT_API_KEY const response = await client.machineViewer.downloadMachine({ machine_id: "742e1f66-f449-4a6c-80d5-8f5eb8e9c2b5" }); const file = await response.arrayBuffer(); console.log(file.byteLength, "bytes"); ``` ```python from osintcat import OsintCat client = OsintCat() # reads OSINTCAT_API_KEY data = b"".join(client.machine_viewer.download_machine( machine_id="742e1f66-f449-4a6c-80d5-8f5eb8e9c2b5", )) print(len(data), "bytes") ``` ```go package main import ( "context" "fmt" "io" osintcat "github.com/OsintCatHQ/osintcat-go" osintcatclient "github.com/OsintCatHQ/osintcat-go/client" ) func main() { client := osintcatclient.NewClient() // reads OSINTCAT_API_KEY request := &osintcat.DownloadMachineMachineViewerRequest{ MachineID: "742e1f66-f449-4a6c-80d5-8f5eb8e9c2b5", } result, err := client.MachineViewer.DownloadMachine(context.Background(), request) if err != nil { panic(err) } data, err := io.ReadAll(result) if err != nil { panic(err) } fmt.Println(len(data), "bytes") } ``` ```php machineViewer->downloadMachine( '742e1f66-f449-4a6c-80d5-8f5eb8e9c2b5', ); echo strlen($result), " bytes", PHP_EOL; ``` -------------------------------- ### SDK examples for file info request Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/machine-viewer.mdx Official SDK examples for the same request. Each client reads your API key from the `OSINTCAT_API_KEY` environment variable. ```typescript import { OsintCatClient } from "osintcat"; const client = new OsintCatClient(); // reads OSINTCAT_API_KEY const result = await client.machineViewer.file({ file_id: "aB3dE5fG7hI9jK1lM3nO" }); console.log(result); ``` ```python from osintcat import OsintCat client = OsintCat() # reads OSINTCAT_API_KEY result = client.machine_viewer.file( file_id="aB3dE5fG7hI9jK1lM3nO", ) print(result) ``` ```go 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.FileMachineViewerRequest{ FileID: "aB3dE5fG7hI9jK1lM3nO", } result, err := client.MachineViewer.File(context.Background(), request) if err != nil { panic(err) } fmt.Printf("%+v\n", result) } ``` ```php machineViewer->file( 'aB3dE5fG7hI9jK1lM3nO', ); echo json_encode($result, JSON_PRETTY_PRINT), PHP_EOL; ``` -------------------------------- ### SDK examples for Machine Viewer statistics Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/machine-viewer.mdx Official SDK examples for the same request. Each client reads the API key from the OSINTCAT_API_KEY environment variable. The TypeScript/JavaScript, Python, Go, and PHP examples are shown as interchangeable tabs. ```typescript import { OsintCatClient } from "osintcat"; const client = new OsintCatClient(); // reads OSINTCAT_API_KEY const result = await client.machineViewer.stats(); console.log(result); ``` ```python from osintcat import OsintCat client = OsintCat() # reads OSINTCAT_API_KEY result = client.machine_viewer.stats() print(result) ``` ```go package main import ( "context" "fmt" osintcatclient "github.com/OsintCatHQ/osintcat-go/client" ) func main() { client := osintcatclient.NewClient() // reads OSINTCAT_API_KEY result, err := client.MachineViewer.Stats(context.Background()) if err != nil { panic(err) } fmt.Printf("%+v\n", result) } ``` ```php machineViewer->stats(); echo json_encode($result, JSON_PRETTY_PRINT), PHP_EOL; ``` -------------------------------- ### TypeScript SDK example for account.get() Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/user.mdx Uses the official OsintCat SDK. Reads the API key from the OSINTCAT_API_KEY environment variable. ```typescript import { OsintCatClient } from "osintcat"; const client = new OsintCatClient(); // reads OSINTCAT_API_KEY const result = await client.account.get(); console.log(result); ``` -------------------------------- ### Example 200 response for GET /api/user Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/user.mdx Shows the JSON response structure with account_info and usage fields. The usage object includes daily request limit, remaining lookups, and API access flag. ```json { "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": 742, "api_access": true } } ``` -------------------------------- ### Go example for Steam lookup Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/steam.mdx Creates an HTTP GET request with the API key header, sends it using the default client, and prints the status code and response body. Handles errors with panic. ```go package main import ( "fmt" "io" "net/http" ) func main() { req, _ := http.NewRequest("GET", "https://www.osintcat.net/api/steam-lookup?username=gaben", 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() body, _ := io.ReadAll(resp.Body) fmt.Println(resp.StatusCode, string(body)) } ``` -------------------------------- ### Install the JS/TS SDK with npm Source: https://github.com/osintcathq/docs/blob/master/sdks.mdx Install the official OsintCat SDK for JavaScript/TypeScript. Requires Node.js 18 or later, Bun, Deno, or Cloudflare Workers. No dependencies. ```sh npm install osintcat ``` -------------------------------- ### SDK examples for machine files treeview Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/machine-viewer.mdx Official SDK examples for JS/TS, Python, Go, and PHP. Each reads your API key from the OSINTCAT_API_KEY environment variable. ```typescript import { OsintCatClient } from "osintcat"; const client = new OsintCatClient(); // reads OSINTCAT_API_KEY const result = await client.machineViewer.files({ machine_id: "742e1f66-f449-4a6c-80d5-8f5eb8e9c2b5" }); console.log(result); ``` ```python from osintcat import OsintCat client = OsintCat() # reads OSINTCAT_API_KEY result = client.machine_viewer.files( machine_id="742e1f66-f449-4a6c-80d5-8f5eb8e9c2b5", ) print(result) ``` ```go 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.FilesMachineViewerRequest{ MachineID: "742e1f66-f449-4a6c-80d5-8f5eb8e9c2b5", } result, err := client.MachineViewer.Files(context.Background(), request) if err != nil { panic(err) } fmt.Printf("%+v\n", result) } ``` ```php machineViewer->files( '742e1f66-f449-4a6c-80d5-8f5eb8e9c2b5', ); echo json_encode($result, JSON_PRETTY_PRINT), PHP_EOL; ``` -------------------------------- ### SDK examples for machine search Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/machine-viewer.mdx Official SDK examples for TypeScript, Python, Go, and PHP. Each client reads the API key from the `OSINTCAT_API_KEY` environment variable. ```typescript import { OsintCatClient } from "osintcat"; const client = new OsintCatClient(); // reads OSINTCAT_API_KEY const result = await client.machineViewer.search({ query: "DESKTOP" }); console.log(result); ``` ```python from osintcat import OsintCat client = OsintCat() # reads OSINTCAT_API_KEY result = client.machine_viewer.search( query="DESKTOP", ) print(result) ``` ```go 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.SearchMachineViewerRequest{ Query: "DESKTOP", } result, err := client.MachineViewer.Search(context.Background(), request) if err != nil { panic(err) } fmt.Printf("%+v\n", result) } ``` ```php machineViewer->search( new SearchMachineViewerRequest([ 'query' => 'DESKTOP', ]), ); echo json_encode($result, JSON_PRETTY_PRINT), PHP_EOL; ``` -------------------------------- ### SDK example: Go - client.Account.Modules() Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/modules.mdx Use the official Go SDK to call the modules endpoint. The client reads the OSINTCAT_API_KEY environment variable automatically. The example prints the result with %+v and panics on error. ```go package main import ( "context" "fmt" osintcatclient "github.com/OsintCatHQ/osintcat-go/client" ) func main() { client := osintcatclient.NewClient() // reads OSINTCAT_API_KEY result, err := client.Account.Modules(context.Background()) if err != nil { panic(err) } fmt.Printf("%+v\n", result) } ``` -------------------------------- ### PHP: Install SDK with Composer Source: https://github.com/osintcathq/docs/blob/master/sdks.mdx Requires PHP 8.1 or later. Installs the OsintCat PHP SDK and Guzzle as the PSR-18 HTTP client. ```sh composer require osintcat/osintcat-php guzzlehttp/guzzle ``` -------------------------------- ### Python requests example for Steam lookup Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/steam.mdx Uses the requests library to perform a GET request with query parameters and headers, then prints the status code and JSON response. Requires the requests package. ```python import requests url = "https://www.osintcat.net/api/steam-lookup" params = {"username": "gaben"} headers = {"X-API-KEY": "YOUR_API_KEY"} response = requests.get(url, params=params, headers=headers, timeout=60) print(response.status_code, response.json()) ``` -------------------------------- ### cURL example for machine search Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/machine-viewer.mdx Example cURL command to search machines with a query parameter and API key header. Replace `YOUR_API_KEY` with your actual key. ```bash curl "https://www.osintcat.net/api/machine_viewer/search?query=DESKTOP" \ -H "X-API-KEY: YOUR_API_KEY" ``` -------------------------------- ### Response example: 200 OK with modules and user Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/modules.mdx Example JSON response for the modules endpoint. Shows the structure of the modules array and user object, including fields like id, name, category, enabled, access_level, allowed_plans, accessible, locked, and user plan/role/beta_access. ```json { "modules": [ { "id": "universal-breach-search", "name": "Universal Breach Search", "category": "Breach Data", "enabled": true, "access_level": "public", "allowed_plans": [], "accessible": true, "locked": false } ], "user": { "plan": "investigator", "role": "user", "beta_access": false } } ``` -------------------------------- ### Go request to GET /api/user Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/user.mdx Uses net/http to call the account endpoint with the X-API-KEY header. Prints the status code and response body. ```go package main import ( "fmt" "io" "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() body, _ := io.ReadAll(resp.Body) fmt.Println(resp.StatusCode, string(body)) } ``` -------------------------------- ### SDK examples for Minecraft profile lookup (TypeScript, Python, Go, PHP) Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/minecraft-profile.mdx Each official SDK reads the API key from the OSINTCAT_API_KEY environment variable. The request looks up a Minecraft profile by username (e.g., 'Notch') and prints the result. The Go example uses the osintcat-go client and handles errors with panic. ```typescript import { OsCatClient } from "osintcat"; const client = new OsCatClient(); // reads OSINTCAT_API_KEY const result = await client.minecraft.profile({ username: "Notch" }); console.log(result); ``` ```python from osintcat import OsCat client = OsCat() # reads OSINTCAT_API_KEY result = client.minecraft.profile( username="Notch", ) print(result) ``` ```go package main import ( "context" "fmt" osintcat "github.com/OsCatHQ/osintcat-go" osintcatclient "github.com/OsCatHQ/osintcat-go/client" ) func main() { client := osintcatclient.NewClient() // reads OSINTCAT_API_KEY request := &osintcat.ProfileMinecraftRequest{ Username: "Notch", } result, err := client.Minecraft.Profile(context.Background(), request) if err != nil { panic(err) } fmt.Printf("%+v\n", result) } ``` ```php minecraft->profile( new ProfileMinecraftRequest([ 'username' => 'Notch', ]), ); echo json_encode($result, JSON_PRETTY_PRINT), PHP_EOL; ``` -------------------------------- ### Example Result (completed task) Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/user-footprint.mdx JSON response example for a completed footprint task, showing status 'done', stats with checked/found counts, and results array with domain availability and extra data. ```json { "status": "done", "stats": { "checked": 112, "total_modules": 112, "found": 34, "elapsed": "5.1s" }, "results": [ { "domain": "github.com", "taken": true, "ExtraData": { "ProfileURL": "https://github.com/johndoe", "PublicRepos": 17 } }, { "domain": "reddit.com", "taken": false, "ExtraData": {} } ] } ``` -------------------------------- ### Go: Make first request to get account info Source: https://github.com/osintcathq/docs/blob/master/sdks.mdx Save as main.go and run with `go run .`. Creates a client that reads OSINTCAT_API_KEY and prints the account plan and remaining lookups. ```go package main import ( "context" "fmt" osintcatclient "github.com/OsintCatHQ/osintcat-go/client" ) func main() { client := osintcatclient.NewClient() // reads OSINTCAT_API_KEY result, err := client.Account.Get(context.Background()) if err != nil { panic(err) } fmt.Printf("%+v\n", result) } ``` -------------------------------- ### Check API key with Go Source: https://github.com/osintcathq/docs/blob/master/quickstart.mdx Use this Go program to verify your API key by calling the /api/user endpoint. It prints your plan and remaining lookups. Replace YOUR_API_KEY with your actual key. ```go 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) } ``` -------------------------------- ### PHP: Make first request to get account info Source: https://github.com/osintcathq/docs/blob/master/sdks.mdx Save as first.php and run with `php first.php`. Creates a client that reads OSINTCAT_API_KEY and prints the account plan and remaining lookups. ```php account->get(); echo json_encode($result, JSON_PRETTY_PRINT), PHP_EOL; ``` -------------------------------- ### Run a breach lookup with Go Source: https://github.com/osintcathq/docs/blob/master/quickstart.mdx Uses net/http to query the breach API. Handles 429 rate-limit responses and prints the record count and remaining lookups. ```go 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) } ``` -------------------------------- ### Check API key with PHP Source: https://github.com/osintcathq/docs/blob/master/quickstart.mdx Use this PHP script to verify your API key by calling the /api/user endpoint. It prints your plan and remaining lookups. Replace YOUR_API_KEY with your actual key. ```php 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"; ``` -------------------------------- ### Check API key with Python Source: https://github.com/osintcathq/docs/blob/master/quickstart.mdx Use this Python script to verify your API key by calling the /api/user endpoint. It prints your plan and remaining lookups. Replace YOUR_API_KEY with your actual key. ```python 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"]) ``` -------------------------------- ### GET /api/breach/search/{id} Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/breach-search.mdx Polls the status and results of a breach search job. Only the API key that started the job can read it, and the job is kept for 30 minutes. Polling is free and can be done every few seconds. ```APIDOC ## [GET] /api/breach/search/{id} ### Description Polls the status and results of a breach search job. Only the API key that started the job can read it, and the job is kept for 30 minutes. Polling is free and can be done every few seconds. ### Method GET ### Endpoint `https://www.osintcat.net/api/breach/search/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The job id. ### Response #### Success Response (200) - **id** (string) - The job id. - **status** (string) - `running` while sources are still searching, then `completed`. - **query_type** (string) - The type the query is searched as. - **results_count** (number) - Number of records in `breach_data` so far. - **breach_data** (array) - Matching records from every source that has answered; `source_db` names the breach when it is known. - **password_seen** (number) - Only for `type=password`: how often the password appears in known breaches. - **sources** (object) - One entry per source by id: `status` (`pending`, `completed` or `error`), `count`, and for an error a short `error` message. #### Response Example ```json 202 { "id": "0f0e0d0c-0000-4000-8000-000000000001", "status": "running", "query_type": "email", "sources": ["b1", "b2", "b3"], "poll": "/api/breach/search/0f0e0d0c-0000-4000-8000-000000000001", "_meta": { "plan": "investigator", "lookups_left": 741 } } ``` ```json 200 { "id": "0f0e0d0c-0000-4000-8000-000000000001", "status": "completed", "query_type": "email", "results_count": 1, "breach_data": [ { "email": "user@example.com", "password": "hunter2", "source_db": "EXAMPLE_COM_2019" } ], "sources": { "b1": { "status": "completed", "count": 0 }, "b2": { "status": "completed", "count": 1 }, "b3": { "status": "completed", "count": 0 } } } ``` ``` -------------------------------- ### Make first request with Python SDK Source: https://github.com/osintcathq/docs/blob/master/sdks.mdx Save as first.py and run with python first.py. Shows your plan and how many lookups are left today. The client reads OSINTCAT_API_KEY automatically. ```python from osintcat import OsintCat client = OsintCat() # reads OSINTCAT_API_KEY result = client.account.get() print(result) ``` -------------------------------- ### Create footprint task with GET /api/footprint/create-task Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/email-footprint.mdx Starts an asynchronous email footprint scan. The request consumes one lookup from the daily quota; polling get-task is free. The response includes a task_id for polling and the initial status (e.g., running). ```bash GET https://www.osintcat.net/api/footprint/create-task ``` -------------------------------- ### Check API key with JavaScript/TypeScript Source: https://github.com/osintcathq/docs/blob/master/quickstart.mdx Use this JavaScript/TypeScript snippet to verify your API key by calling the /api/user endpoint. It prints your plan and remaining lookups. Replace YOUR_API_KEY with your actual key. ```javascript 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); ``` -------------------------------- ### Poll task with GET /api/footprint/get-task Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/email-footprint.mdx Poll the task endpoint roughly once per second until `status` is no longer one of the running states (`running`, `queued`, `pending`, `processing`, `started`). A scan typically completes within a few seconds and is capped at ~3 minutes. The response includes `status`, `stats` (with `checked`, `total_modules`, `found`, `elapsed`), and `results` (with `domain`, `taken`, `ExtraData`). ```bash GET https://www.osintcat.net/api/footprint/get-task ``` -------------------------------- ### cURL request to GET /api/user Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/user.mdx Sends a GET request to the account endpoint with the X-API-KEY header. Does not count as a lookup and requires the account:read scope. ```bash curl "https://www.osintcat.net/api/user" \ -H "X-API-KEY: YOUR_API_KEY" ``` -------------------------------- ### Run a breach lookup with Python requests Source: https://github.com/osintcathq/docs/blob/master/quickstart.mdx Uses the requests library to query the breach API. Handles 429 rate-limit responses and prints the record count and remaining lookups. ```python 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"]) ``` -------------------------------- ### Run a breach lookup with JavaScript fetch Source: https://github.com/osintcathq/docs/blob/master/quickstart.mdx Uses the Fetch API to query the breach endpoint. Logs the HTTP status, result count, and metadata. ```javascript 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); ``` -------------------------------- ### Run a breach lookup with PHP cURL Source: https://github.com/osintcathq/docs/blob/master/quickstart.mdx Uses cURL to query the breach API. Handles 429 rate-limit responses and prints the record count and remaining lookups. ```php "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"; } ``` -------------------------------- ### Example result (completed task) Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/email-footprint.mdx Example JSON response for a completed footprint task, showing status, stats, and results array. ```json { "status": "done", "stats": { "checked": 119, "total_modules": 119, "found": 95, "elapsed": "6.4s" }, "results": [ { "domain": "github.com", "taken": true, "ExtraData": { "Username": "johnny123", "PublicRepos": 42 } } ] } ``` -------------------------------- ### GET /api/steam-lookup Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/steam.mdx Look up a Steam account by its username and get the public profile. Requires an API key in the X-API-KEY header. ```APIDOC ## [GET] /api/steam-lookup ### Description Look up a Steam account by its username and get the public profile. ### Method GET ### Endpoint https://www.osintcat.net/api/steam-lookup ### Parameters #### Query Parameters - **username** (string) - Required - The Steam username. #### Headers - **X-API-KEY** (string) - Required - Your API key. ### Response #### Success Response (200) - **status** (number) - HTTP status code. - **body** (object) - JSON response containing the public profile data. ### Usage Counts as one lookup against your plan's daily allowance (Max: unlimited). When the allowance is used up, the lookup can continue at a per-lookup price charged to your balance (the module's page in the dashboard shows the price). The price applies even when the lookup finds nothing; a lookup that fails because of an error on our side is not charged. ### Request Example ```bash cURL curl "https://www.osintcat.net/api/steam-lookup?username=gaben" \ -H "X-API-KEY: YOUR_API_KEY" ``` ```python Python import requests url = "https://www.osintcat.net/api/steam-lookup" params = {"username": "gaben"} headers = {"X-API-KEY": "YOUR_API_KEY"} response = requests.get(url, params=params, headers=headers, timeout=60) print(response.status_code, response.json()) ``` ```javascript JS & TS const response = await fetch("https://www.osintcat.net/api/steam-lookup?username=gaben", { headers: { "X-API-KEY": "YOUR_API_KEY" }, }); console.log(response.status, await response.json()); ``` ```php PHP true, CURLOPT_HTTPHEADER => ["X-API-KEY: YOUR_API_KEY"], ]); $response = curl_exec($curl); $status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE); curl_close($curl); echo $status . " " . $response; ``` ```go Go package main import ( "fmt" "io" "net/http" ) func main() { req, _ := http.NewRequest("GET", "https://www.osintcat.net/api/steam-lookup?username=gaben", 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() body, _ := io.ReadAll(resp.Body) fmt.Println(resp.StatusCode, string(body)) } ``` ``` -------------------------------- ### GET /api/footprint/get-task Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/user-footprint.mdx Retrieves the status and results of a footprint scan task. Poll this endpoint until the status is no longer in a running state to get the final results. ```APIDOC ## [GET] /api/footprint/get-task ### Description Retrieves the status and results of a footprint scan task. Poll this endpoint until the status is no longer in a running state to get the final results. ### Method GET ### Endpoint https://www.osintcat.net/api/footprint/get-task ### Parameters #### Query Parameters - **id** (string) - Required - The task ID returned from create-task. ### Response #### Success Response (200) - **status** (string) - The current status of the task (e.g., "done", "running", "queued", etc.). - **stats** (object) - Statistics about the scan, including checked, total_modules, found, and elapsed. - **results** (array) - Array of result objects, each with domain, taken, and ExtraData fields. ### Request Example ```bash curl "https://www.osintcat.net/api/footprint/get-task?id=TASK_ID" \ -H "X-API-KEY: YOUR_API_KEY" ``` ### Response Example ```json { "status": "done", "stats": { "checked": 112, "total_modules": 112, "found": 34, "elapsed": "5.1s" }, "results": [ { "domain": "github.com", "taken": true, "ExtraData": { "ProfileURL": "https://github.com/johndoe", "PublicRepos": 17 } }, { "domain": "reddit.com", "taken": false, "ExtraData": {} } ] } ``` ``` -------------------------------- ### GET /api/footprint/get-task Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/email-footprint.mdx Retrieves the status and results of a footprint scan task. Poll this endpoint until the status is no longer in a running state to get the final results. ```APIDOC ## GET /api/footprint/get-task ### Description Retrieves the status and results of a footprint scan task. Poll this endpoint until the status is no longer in a running state to get the final results. ### Method GET ### Endpoint https://www.osintcat.net/api/footprint/get-task ### Parameters #### Query Parameters - **id** (string) - Required - The task ID returned from create-task. ### Response #### Success Response (200) - **status** (string) - The current status of the task (e.g., "done", "running", "queued", "pending", "processing", "started"). - **stats** (object) - Statistics about the scan. - **checked** (integer) - Number of modules checked. - **total_modules** (integer) - Total number of modules. - **found** (integer) - Number of results found. - **elapsed** (string) - Time elapsed for the scan. - **results** (array) - Array of result objects. - **domain** (string) - The domain where the email was found. - **taken** (boolean) - Whether the username is taken. - **ExtraData** (object) - Additional data about the result. ### Request Example ```bash curl "https://www.osintcat.net/api/footprint/get-task?id=TASK_ID" \ -H "X-API-KEY: YOUR_API_KEY" ``` #### Response Example ```json { "status": "done", "stats": { "checked": 119, "total_modules": 119, "found": 95, "elapsed": "6.4s" }, "results": [ { "domain": "github.com", "taken": true, "ExtraData": { "Username": "johnny123", "PublicRepos": 42 } } ] } ``` ``` -------------------------------- ### Go SDK example for DNS Resolver Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/dns-resolver.mdx Uses the official OsintCat Go SDK. Reads the API key from the OSINTCAT_API_KEY environment variable. Calls client.DNS.Resolve with a ResolveDNSRequest. ```go 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.ResolveDNSRequest{ Query: "example.com,osintcat.net", } result, err := client.DNS.Resolve(context.Background(), request) if err != nil { panic(err) } fmt.Printf("%+v\n", result) } ``` -------------------------------- ### cURL request to GET /api/modules Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/modules.mdx Sends a GET request to the modules endpoint with the X-API-KEY header. Requires the osint:read scope and does not count as a lookup. ```bash curl "https://www.osintcat.net/api/modules" \ -H "X-API-KEY: YOUR_API_KEY" ``` -------------------------------- ### DNS Resolver API response example Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/dns-resolver.mdx Example 200 response showing a JSON object mapping each hostname to its IP address, or null if it does not resolve. ```json { "example.com": "93.184.215.14", "osintcat.net": "104.21.32.1" } ``` -------------------------------- ### Authenticate with X-API-KEY header Source: https://github.com/osintcathq/docs/blob/master/api-reference/introduction.mdx Send your API key in the X-API-KEY header with every request. Keys start with oc_live_ (or cat_ for keys made before November 2026). Create keys in Settings → Developer. ```bash curl "https://www.osintcat.net/api/user" -H "X-API-KEY: YOUR_API_KEY" ``` -------------------------------- ### Make first request with JS/TS SDK Source: https://github.com/osintcathq/docs/blob/master/sdks.mdx Save as first.mjs and run with node first.mjs. Shows your plan and how many lookups are left today. The client reads OSINTCAT_API_KEY automatically. ```typescript import { OsintCatClient } from "osintcat"; const client = new OsintCatClient(); // reads OSINTCAT_API_KEY const result = await client.account.get(); console.log(result); ``` -------------------------------- ### SDK example: PHP - OsintCatClient->account->modules() Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/modules.mdx Use the official PHP SDK to call the modules endpoint. The client reads the OSINTCAT_API_KEY environment variable automatically. The result is echoed as JSON with pretty print. ```php account->modules(); echo json_encode($result, JSON_PRETTY_PRINT), PHP_EOL; ``` -------------------------------- ### SDK example: Python - OsintCat.account.modules() Source: https://github.com/osintcathq/docs/blob/master/api-reference/endpoint/modules.mdx Use the official Python SDK to call the modules endpoint. The client reads the OSINTCAT_API_KEY environment variable automatically. ```python from osintcat import OsintCat client = OsintCat() # reads OSINTCAT_API_KEY result = client.account.modules() print(result) ```