Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

How to use the companies house API?

Lili7891
7 - Meteor

I was hoping I could use Alteryx to extract some data off companies house using their API - I'm hoping it's not massively complicated, I just want to be able to pull a list of companies and registered directors in the UK.

I saw an example of a case on here which used the API before regarding getting PDF docs and I tried to adapt that for my use, but I don't think I understand it entirely.

Would appreciate if someone could give a bit of guidance maybe (if someone has already utilised Alteryx to get this information even, I couldn't find anything in my searches).

 

I have created a developer profile and followed the instructions as per the companies house website, but getting stuck on how to use the API.

 

Thanks for any help! 

5 REPLIES 5
Kakuffo
Alteryx
Alteryx

HI here is a link to getting started with APIs on alteryx 

Text input and Download tool will be the main tools when connecting to an API

 

https://community.alteryx.com/t5/Engine-Works/APIs-for-Beginners-Integrate-All-the-Systems/ba-p/8074...

 

JosephSerpis
17 - Castor
17 - Castor

Hi @Lili7891 due to Companies House API authentication method outlined in documenation you are going to need to use the Base 64 Encoder Tool to ecrypt your API key. You will need to create a header called Authorisation and include that with the header configuration of the download tool. Using the Throttle tool is also advised given the restriction on the number of API calls you can make per minute. I've attached a workflow that calls the Companies House API you will need to add your own API key to make it work. Hopefully it will get you started and let you see what is needed.

Lili7891
7 - Meteor

Amazing, I'll give this a go and report back if I've managed to work it out, thanks so much!

Lili7891
7 - Meteor

@JosephSerpis Tried using your solution but keep getting the following 

Lili7891_0-1662983497517.png


{"error":"Invalid Authorization","type":"ch:service"} HTTP/1.1 401 UnauthorizedDate: Mon, 12 Sep 2022 11:18:39 GMTContent-Type: application/jsonContent-Length: 53Connection: keep-aliveAccess-Control-Allow-Origin: *Ch-Authentication-Error: Invalid AuthorizationWww-Authenticate: Invalid or no A... error Invalid Authorization
{"error":"Invalid Authorization","type":"ch:service"} HTTP/1.1 401 UnauthorizedDate: Mon, 12 Sep 2022 11:18:39 GMTContent-Type: application/jsonContent-Length: 53Connection: keep-aliveAccess-Control-Allow-Origin: *Ch-Authentication-Error: Invalid AuthorizationWww-Authenticate: Invalid or no A... type ch:service

JosephSerpis
17 - Castor
17 - Castor

Hi @Lili7891 I would check your API key like I said I used this myself and had no issue with my API key from Companies House. Have you tried calling the API through  postman? I typically work with API in postman to check I have everything I need before I transition to Alteryx.

Labels