How to use API with Python?can anyone help me on this.Thanks

(Aside) I think we’re supposed to keep the keys secret - there should be no need to post them anyway.

I don’t use Python or the chwrapper - so apologies if I’ve mentioned something which has bugs in it.

A quick look shows you appear to be using the library as it recommends. I can’t do debugging for you but as a pointer the error seems to show that instead of - or in addition to - submitting the normal “q” parameter for companies search, you’re adding your API key as a parameter on the query string. As per the documentation this shouldn’t be passed as a query parameter but as part of the http header. Again you’ll need to debug this yourself but I did notice a couple of places where this could be being set:

In services/base.py, class Service, function get_session

The line:

session.params.update(access_token=access_token)
…seems a little odd, given that later in this function there seems to be something setting the authorisation parameter

session.auth = (access_token, “”)

In the search.py, class Search function search_companies

…there is the possibility to send additional query parameters (kwargs):

def search_companies(self, term, **kwargs)