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

# API Reference — Performing Corporate Entity Research

## OpenCorporates API v0.4

| Endpoint | Description |
|---|---|
| `GET /companies/search?q=<name>` | Search companies |
| `GET /companies/<jurisdiction>/<number>` | Company detail |
| `GET /officers/search?q=<name>` | Search officers |
| `GET /companies/<j>/<n>/officers` | Company officers |
| `GET /companies/<j>/<n>/filings` | Company filings |

## Companies House API (UK)

| Endpoint | Description |
|---|---|
| `GET /search/companies?q=<name>` | Search companies |
| `GET /company/<number>` | Company profile |
| `GET /company/<number>/officers` | Officers list |
| `GET /company/<number>/persons-with-significant-control` | Beneficial owners |
| `GET /officers/<id>/appointments` | Officer appointments |

### Authentication

```bash
# Companies House uses HTTP Basic Auth with API key as username
curl -u YOUR_API_KEY: https://api.company-information.service.gov.uk/company/00000001
```

## Agent Script

```bash
node agent.js company-profile --jurisdiction gb --number 12345678
node agent.js officer-network --name "Jane Smith" --jurisdiction gb
node agent.js ownership-graph --company-id gb/12345678 --depth 3 --output graph.gexf
node agent.js nominee-detect --officer-name "Corporate Services Ltd"
node agent.js --self-test
```

## Graph Visualization

| Tool | Format | Use |
|---|---|---|
| Gephi | GEXF | Interactive graph exploration |
| Cytoscape | GraphML | Biological/social network analysis |
| Neo4j | Cypher | Graph database queries |
