Last week we launched Version 0.4 of OpenCorporates’ API, and with it brought some rather sexy new features (such as power searches, searching by address, new industry code functionality, and searching officers by address). As promised this has been on-demand for the past week, with v0.3.2 remaining the default in order to allow our regular users to try it out, and shake down the features in case there were any bugs.
Well, we found one (the behaviour of inactive filter was not quite as documented – thanks Mike!), fixed that, and while we were at it added a feature which didn’t quite make the cut for v0.4: restricting search results to companies by multiple industry codes, i.e. where the companies must have all the industry codes supplied, not just one of them.
Compare these two API calls:
- https://api.opencorporates.com/v0.4.1/companies/search?industry_codes=eu_nace_2-869|eu_nace_2-691 – companies with industry codes corresponding to EU NACE 2 codes for Legal activities OR Other human health activities, which returns over 85,000 companies at time of writing
- https://api.opencorporates.com/v0.4.1/companies/search?industry_codes=eu_nace_2-869,eu_nace_2-691– companies with industry codes corresponding to EU NACE 2 codes for Legal activities AND Other human health activities which returns just 18 companies
Kind of cool, no?
So 0.4.x is now the default, specifically 0.4.1 (we increment versions whenever there’s a change which changes behaviour even if it’s fixing a bug to ensure the principle of least surprise for users of the API). v0.2 will be getting removed shortly, so we advise any users of this version to upgrade soon.