Query design and match confirmation for an entity search API
Quick answer. A good entity search query carries the legal name, a jurisdiction filter and a modest limit. Confirm the hit on independent facts, such as identifier, address or officers, before calling paid routes. Statsnet counts one report per company, so confirming first avoids paying for the wrong one.
Steps
-
Normalise input
Trim, keep the suffix, drop decorative punctuation.
-
Filter
Set the jurisdiction array and a small limit.
-
Inspect candidates
Read the free meta profile for each plausible hit.
-
Confirm, then pay
Match a second fact, then request the paid profile once.
Building the query
Statsnet’s POST /companies/search takes a body with a query string and filters, for example a jurisdiction array, while the limit query parameter sets the page size. Strip punctuation noise from user input, but keep the entity suffix: “Harbor Supply LLC” and “Harbor Supply Inc” are different companies in many states.
Without a jurisdiction filter the search runs across 307 jurisdictions and about 490 million companies, so common names return long lists. Add the filter whenever the counterparty has told you where it is registered.
Confirming the hit
Never take the top result on name alone. Compare at least one more fact the applicant gave you: the registration number, the address, or a named officer. If two candidates survive, stop and ask; do not pick one. The meta profile at GET /companies/{id}/meta/beta is public, so you can inspect candidates before any paid call.
Paying once
Each paid request for a company consumes one report, and repeat requests for the same company within 14 days are free. Cache the confirmed ID and re-read within that window rather than searching again. Bulk needs go through POST /export or a custom arrangement; the Statsnet API documentation and plans page describe both.