fosuoy / Company-House-API-Search

A helpful command line utility which uses the Company House API to search for companies given a search string and a regex of the postcode you are looking for companies within - uses are lead generation / job searching, enjoy
1 stars 0 forks source link

Search by name not working 100% - missing off companies #1

Open Redrichmond opened 7 years ago

Redrichmond commented 7 years ago

Enter 'LeasePlan' in the search facility... There's lots of other companies.. It sais it has found 9 but detail is not populated in title file. Enter 'Lease' and then it populates the file.. 'Leaseplan uk ltd'

Redrichmond commented 7 years ago

Enter the word 'Carnview' nothing comes up. Enter 'Carn' then you have results that include carnview?.

fosuoy commented 7 years ago

I've updated the repo, please try pulling it down and trying now.

Please note that it's been updated so instead of using a variables.py file you can use command line arguments, see the readme, I hope this way it will be more straightforward.

I've tested carnview and leaseplan and get the correct output in the titles and results txt files, please confirm you get the output you require, thanks.

Redrichmond commented 7 years ago

Brilliant I can try later.. it it easy to run for a specfic SIC code/Industry?

http://resources.companieshouse.gov.uk/sic/

fosuoy commented 7 years ago

The company house API doesn't support those kinds of searches, for that I'd direct you towards downloading the basic company house info and querying that: http://download.companieshouse.gov.uk/en_output.html

You could read it into a database or query it using something like pandas (it's provided as a csv so you should be able to do that).

Redrichmond commented 7 years ago

Ok many thanks. I pulled all the data back months ago manually and loaded into a Db but some of the quality of the data is terrible. I spent an age just cleaning it..

Redrichmond commented 7 years ago

Pasted the example into CMD after navigating through the long folder name "company_house_search.py -a 12345 -p ^\"LS[0-9]+ -s petroleum" exactly as it was in the readme and it didn't work.. to be honest previous version was easier to use...Just go in and change the variable.py file in 2 places and run it in 3.6 iDE

fosuoy commented 7 years ago

Sorry about leaving it in a broken state, it should be fixed now, I also returned variables.py along with the command line options, so as long as a search term and api key is defined either on the command line or in the variables.py file, things should work.

If you run the same command you tried to run before things should work.

The post code is optional.

If I can help in any other way, let me know.