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

# API Reference — Competitive Intelligence

## SEC EDGAR API

### Full-Text Search
```bash
curl -s -A "CompanyName admin@company.com" \
  "https://efts.sec.gov/LATEST/search-index?q=%22Example+Corp%22&forms=10-K,10-Q,8-K"
```

### Company Submissions
```bash
curl -s -A "CompanyName admin@company.com" \
  "https://data.sec.gov/submissions/CIK0001234567.json"
```

### CIK Lookup
```bash
curl -s -A "CompanyName admin@company.com" \
  "https://www.sec.gov/cgi-bin/browse-edgar?company=example&CIK=&type=10-K&output=atom"
```

### Rate Limits
- 10 requests per second
- User-Agent header required (company name + email)

## OpenCorporates API

### Company Search
```bash
curl -s "https://api.opencorporates.com/v0.4/companies/search?q=Example+Corp&api_token=$OC_KEY"
```

### Company Details
```bash
curl -s "https://api.opencorporates.com/v0.4/companies/us_de/1234567?api_token=$OC_KEY"
```

### Officers Search
```bash
curl -s "https://api.opencorporates.com/v0.4/officers/search?q=John+Smith&api_token=$OC_KEY"
```

## Crunchbase API

### Organization
```bash
curl -s "https://api.crunchbase.com/api/v4/entities/organizations/example?user_key=$CB_KEY"
```

### Funding Rounds
```bash
curl -s "https://api.crunchbase.com/api/v4/entities/organizations/example/funding_rounds?user_key=$CB_KEY"
```

## Google Patents

### Search
```bash
curl -s "https://patents.google.com/xhr/query?url=q%3D%22Example+Corp%22&patents=true"
```

## USPTO API

### Patent Search
```bash
curl -s "https://developer.uspto.gov/ibd-api/v1/patent/application?searchText=Example+Corp&start=0&rows=20"
```

## SpiderFoot

### API Scan
```bash
curl -X POST "http://localhost:5001/api/scan" \
  -d "scanname=example_ci&scantarget=example.com&modules=sfp_whois,sfp_dnsresolve"
```

### Get Results
```bash
curl -s "http://localhost:5001/api/scan/$SCAN_ID/data"
```

## Environment Variables

| Variable | Description |
|----------|-------------|
| `OC_KEY` | OpenCorporates API key |
| `CB_KEY` | Crunchbase API key |
