Not everything OpenCorporates does is sexy. But it is all important, even the backend work that bit by bit is making the largest open database of companies in the world even better. This week, we’re happy to announce the latest version of the API (our service which allows direct access to our data), many of which have been enabled by the move to ElasticSearch we did last late year. Missed it? That’s not surprising, as we didn’t make a big thing of it, but it brought significant improvements in stability and speed – for example our API is now serving up to 5 million requests a day, without breaking a sweat. The change in our underlying search engine has also allowed us to introduce much more powerful search features to the API, and we’re pleased to announce them today as v0.4 of the API:
- search by registered address (yes, at last!)
- search for companies starting with given phrase (e.g. ‘Barclays Bank’)
- filter by multiple jurisdictions (e.g. Ireland and UK)
- filter by country (e.g. US)
- richer filtering of inactive and branch companies
- a new nonprofit filter, to restrict to/exclude companies with a nonprofit company type
- users with API keys can now get addresses (and dates of birth) for directors/officers
- filtering officers by address, date of birth, position or status
- more powerful date searching
- a completely new way of representing industry codes that is far more granular and allows more powerful search filtering
We’ll be rolling many of these features out to the website over the next couple of months, but in the meantime you can already have fun with such searches as:
- Companies with registered address at the Empire State Building: https://api.opencorporates.com/v0.4/companies/search?registered_address=10%20EAST%2039TH%20NEW%20YORK
- Companies with ‘condominium’ in the name in the US and Canada: https://api.opencorporates.com/v0.4/companies/search?q=condominium&country_code=us|ca
- Officers who were born over 105 years ago, but are still active: https://api.opencorporates.com/v0.4/officers/search?date_of_birth=:1910-04-21&inactive=false&your_api_token {requires API token)
- Nonprofit companies in UK and US with ‘political’ in the name and incorporated in 2014: https://api.opencorporates.com/v0.4/companies/search?nonprofit=true&q=political&country_code=gb|us&incorporation_date=2014-01-01:2014-12-31&api_token=your_api_token {requires API token)
- Companies in the UK or Belgium with tax in the title and with the EU industry code for “Accounting, bookkeeping and auditing activities; tax consultancy”: https://api.opencorporates.com/v0.4/companies/search?jurisdiction_code=be|gb&q=tax&industry_codes=eu_nace_2-692&api_token=your_api_token {requires API token)
As is normal with our new API releases, for the next week or so the new version will be available on request by specifying it in the URL (as in the examples above) – after that it will become the default, and version 0.2 will be retired from service. We’ll be running through some of the feature in detail over the next few weeks (and the detailed documentation is here) – until then, have fun.
The registered address feature is a fantastic addition! It needs a little tweaking, though. It should also be able to search for variants on the same addresses. As an example, “99 West Main Street”, “99 W Main Street”, “99 West Main St”, and “99 W Main St” all produce different results given how the search currently works. It’s frustrating, having to run the same search four times due to the API taking the search parameters too literally.
We will be looking to improve address searching and handling in the future, but it’s non-trivial, particularly when you’re dealing with multiple countries and languages. Rest assured it’s a high priority for us.