Hydrant API

One call

GET /v1/companies/enrich, the record if it's recent and an enrichment if not.

GET /v1/companies/enrich?domain= is the simplest way to get a company: one request, and the answer is the company's record.

curl "https://api.hydrantapi.com/v1/companies/enrich?domain=hvidbjergbank.dk" \
  -H "Authorization: Bearer $HYDRANT_API_KEY"

What it does

  • We have a recent record. If something in our record of the company was fetched in the last 30 days, you get it at once, and it costs a read: 1 credit.
  • We don't. The company is enriched now, as POST /v1/enrichments would, and the call waits up to 30 seconds for it. Most companies take 20 to 30 seconds.
StatusWhenCost
200 with the recordIt was recent, or the enrichment ended in time1 credit, or 10
202 with the enrichmentThe enrichment is still running after 30 seconds10 credits, given back if it finds no company
404 company_not_foundThe enrichment found no company at the domainNothing
503 enrichment_failedThe enrichment failed on our side; retry after Retry-AfterNothing
400 invalid_parameterThe domain isn't oneNothing

The key needs the enrich scope, because the call may start an enrichment. fields= and include=evidence work as they do on GET /v1/companies/{domain}.

A 202

A 202 carries the enrichment, with its status_url (also in the Location header). Follow that, or call GET /v1/companies/enrich again: while the enrichment runs, asking again for the domain gets the same one and isn't charged again. Once it has ended, the record is recent, and the next call answers at once.

With a test key

A test key reads the sandbox: its companies come back however old their records are, and any other domain is a 404.

On this page