<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Analyzing Financial Records

## OpenCorporates API

| Endpoint | Description |
|---|---|
| `GET /companies/search?q=<name>` | Search companies by name |
| `GET /companies/<jurisdiction>/<number>` | Get specific company |
| `GET /officers/search?q=<name>` | Search officers/directors |
| `GET /companies/<j>/<n>/filings` | Company filing history |

## SEC EDGAR

| Endpoint | Description |
|---|---|
| `GET /cgi-bin/browse-edgar?company=<name>&action=getcompany` | Company search |
| `GET /cgi-bin/browse-edgar?action=getcompany&CIK=<cik>&type=10-K` | Filing search |
| Full-text search: `https://efts.sec.gov/LATEST/search-index?q=<query>` | Search filing text |

## ICIJ Offshore Leaks

| Resource | URL |
|---|---|
| Search | `https://offshoreleaks.icij.org/search?q=<name>` |
| API | `https://offshoreleaks.icij.org/api/v1/search?q=<name>` |

## Agent Script

```bash
node agent.js company-lookup --name "Acme Holdings" --jurisdiction gb
node agent.js sec-search --company "Acme Corp" --filing-type 10-K
node agent.js corporate-network --company-id oc-123456 --depth 2
node agent.js offshore-check --name "John Smith"
node agent.js --self-test
```
