Skip to content

About

Verifies a company is registered and active across UK Companies House, US SEC EDGAR and the FCA Register. Fetch/Agent/Monitor; 20 offline tests.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

8 Commits

Folders and files

Repository files navigation

TinyVerify

🐟 TinyVerify

Is this company actually registered, or just vibes? Live verification across 3 official registries with no API β€” in one command.

Python 3.9+ TinyFish Tests License: MIT

TinyFish Student Bounty TinyVerify (Drop 002) Β· 3 endpoints β†’ 150 pts tier

πŸ“‘ Contents

✨ Why build this?

"Is this doctor licensed? Is this company still registered?" β€” answering that used to mean hand-searching licensing boards and registries with no APIs. Life gets awesome when: one command checks the official sources live and hands you a structured record you can trust β€” with a source link, not a screenshot of a search result.

πŸš€ Installing / Getting started

Minimal setup to your first verified record (β‰ˆ1 minute):

git clone https://github.com/Ehsas317/tinyverify.git
cd tinyverify
pip install -r requirements.txt
export TINYFISH_API_KEY=...   # https://agent.tinyfish.ai/api-keys
python3 tinyverify.py --name "Tesco" --jurisdiction UK

What actually happens ↑: Search finds the official Companies House entry β†’ Fetch reads the live page β†’ JSON prints the structured record (see Usage).

Initial Configuration

Need Where to get it Notes
TINYFISH_API_KEY https://agent.tinyfish.ai/api-keys One key for Search/Fetch/Agent/Monitor. Search + Fetch are free within daily allowance.
pip install -r requirements.txt This repo Installs the tinyfish SDK. Nothing else is required.

Verify your setup first (free, prints monitors on your account):

python3 tinyverify.py --doctor

🎯 Usage

One-off check (hiring / partnerships β€” table is fastest to read):

python3 tinyverify.py --name "Tesco" --format table
REGISTRY                                | NAME  | STATUS  | NUMBER  | READER
----------------------------------------+-------+---------+---------+--------
UK Companies House                      | Tesco | active  | 00445790| Fetch
UK FCA Financial Services Register      | Tesco | authorised | 201282 | Agent
US SEC EDGAR                            | Tesco | no_match | -       | Fetch

Tesco (BOTH) Β· endpoints: UK Companies House, UK FCA Financial Services Register, US SEC EDGAR Β· est. 150 pts
  verdict: partial

Machine use (pipelines, agents, spreadsheets):

python3 tinyverify.py --name "Apple" --jurisdiction US --output result.json
python3 tinyverify.py --name "Tesco" --format csv --output vendors.csv

Batch vendor KYB (real use β€” a whole vendor list):

# vendors.csv β€” one vendor per row
python3 tinyverify.py --input vendors.csv --format csv --output kyb-report.csv

Watchlist (ongoing monitoring + Slack/email alerts):

python3 tinyverify.py --name "Tesco" --jurisdiction BOTH --monitor \
  --webhook "https://hooks.slack.com/services/..." --schedule "0 9 * * *"

--monitor creates a daily TinyFish Page Monitor per source page. When the registry record changes, the webhook receives the diff. The FCA page is skipped with a documented note (same unreachable host Agent reads through).

✨ Features

  • βœ… 3 official registries β€” UK Companies House, US SEC EDGAR, UK FCA Register (no APIs, no logins)
  • βœ… Smart TinyFish pipeline β€” Search β†’ Fetch β†’ Agent β†’ Monitor; Agent only where Fetch can't read
  • βœ… verdict β€” verified | partial | not_found | ambiguous for compliance/hiring hand-off
  • βœ… Batch + CSV β€” vendor lists in, spreadsheet-ready report out
  • βœ… Formats β€” json (pipelines/agents) Β· table (humans) Β· csv (Excel/Sheets)
  • βœ… Monitor + webhook β€” daily watchlist with Slack/email alerts
  • βœ… Retries with backoff β€” one flaky page won't sink a batch
  • βœ… AI-ready (MCP) β€” Claude/Cursor can call tinyverify_check as a tool
  • βœ… 20 offline tests β€” parsers + formatters + verdict, no API key needed (make test)

βš™οΈ Configuration

Argument Type / default What it does
--name String One name, or comma list ("Tesco,Apple"). Required unless --input given.
--input String CSV file with one name per row (batch).
--type String Β· company Record type: company Β· person Β· licence.
--jurisdiction UK | US | BOTH Β· BOTH Which registries to check.
--monitor bool Create a daily Monitor per source page.
--webhook String Monitor webhook URL (Slack/email bridge).
--schedule String Β· 0 9 * * * Monitor cron (UTC).
--format json | table | csv Β· json Output format.
--output String Also write the report to this file.
--retries Number Β· 3 Retries per TinyFish call (exponential backoff).
--verbose bool Log each retry to stderr.
--doctor bool Check API key + list monitors, then exit.

Exit codes: 0 ok Β· 2 usage / missing key Β· 3 registry fetch failed.

πŸ—οΈ How it works

flowchart LR
    subgraph tinyfish["TinyFish (SDK)"]
      S[Search<br/>free] --> F[Fetch<br/>free]
      F --> A[Agent<br/>$0.016/step]
      F --> M[Monitor<br/>$0.005/run]
    end
    F -->|Companies House + SEC EDGAR| R1[(Official registries<br/>server-rendered)]
    A -->|FCA Register β€” Fetch: target_unreachable| R2[(Official registry<br/>dynamic / blocked)]
    M -->|daily diff| R1
    R1 --> J[Structured JSON<br/>status Β· number Β· dates Β· source link]
    R2 --> J
Loading

Each primitive is used for what it's best at β€” Fetch for static pages ($0), Agent only for the dynamic/blocked registry, Monitor for ongoing change detection. Nothing is padded to inflate the endpoint count.

πŸ“‘ Registries

Registry Reader Returns
UK Companies House Fetch status active/dissolved, 8-digit number, incorporated date, registered office
US SEC EDGAR Fetch + Agent rescue CIK, legal name, latest 10-K date, multi-match list
UK FCA Register Agent authorised / not-authorised, FCA reference number

Every check is stamped source_url + checked_at + reader, and no_match / multi-match are reported explicitly β€” never guessed.

πŸ’Ό Where it's useful

  • Vendor KYB / procurement β€” batch-check a vendor CSV before onboarding
  • Hiring / partnerships β€” 10-second table verdict before you sign
  • Watchlists β€” --monitor flags the day a vendor goes dissolved
  • Research / journalism β€” verify a company exists before you write about it

βœ… Live proof (2026-11-08)

Check Result Reader
Tesco / Companies House active, 00445790, incorporated 27 Nov 1947 Fetch
Tesco / FCA Register authorised, ref 201282, 15 matches Agent
Apple / SEC EDGAR CIK 0000320193, latest 10-K 2026-11-03 Fetch
Monitors 3e4299ff… (Companies House), a884b06b… (SEC) Monitor

Full outputs: examples/ Β· Transcript: examples/DEMO.md

πŸ”€ State machines (explicit, in states.py)

Every status the tool can emit is declared in one place β€” no bare strings in the logic:

stateDiagram-v2
    [*] --> CheckOutcome
    CheckOutcome: active / dissolved / unknown / no_match / ambiguous / authorised
    [*] --> Verdict: fold(VERDICT_PRIORITY)
    Verdict: ambiguous > not_found > partial > verified
    [*] --> MonitorState: not_requested / created / skipped
    [*] --> Rescue: Fetch date missing β†’ Agent
Loading

Import tinyverify.states in your code, or read CHECK_STATUSES / VERDICT_PRIORITY as the spec. Public JSON/CLI/exit codes unchanged.

πŸ“ Project structure

tinyverify/
β”œβ”€β”€ __init__.py   # version
β”œβ”€β”€ cli.py        # argparse + verdict + doctor
β”œβ”€β”€ client.py     # TinyFish wrapper (retry/backoff)
β”œβ”€β”€ checks.py     # one check per registry
β”œβ”€β”€ parsers.py    # pure offline-tested parsers
β”œβ”€β”€ registries.py # config
β”œβ”€β”€ report.py     # JSON/CSV/table formatters + Monitors
tinyverify.py     # shim (back-compat: python3 tinyverify.py …)
tests/            # parsers + report + mocked checks
examples/         # live JSON outputs + demo transcript
docs/assets/      # banner

πŸ€– Use with AI (MCP)

TinyVerify ships an MCP server, so Claude, Cursor, and other agents can verify companies as a tool call β€” no copy-pasting JSON:

{
  "mcpServers": {
    "tinyverify": {
      "command": "tinyverify-mcp",
      "env": { "TINYFISH_API_KEY": "..." }
    }
  }
}

Tools: tinyverify_check(name, jurisdiction, type) β†’ JSON report with verdict; tinyverify_doctor() β†’ key/monitor health. Install both CLIs with:

pip install -e .         # gives `tinyverify` + `tinyverify-mcp` on PATH

🀝 Contributing

Issues and PRs are welcome β€” see CONTRIBUTING.md. Parser changes need a test; new registries need a config entry + check_* + test.

πŸ”— Links

πŸ“œ Licensing

MIT β€” see LICENSE.


Back to top ↑

About

Verifies a company is registered and active across UK Companies House, US SEC EDGAR and the FCA Register. Fetch/Agent/Monitor; 20 offline tests.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages