VBA to pass GET to API

yits05

Board Regular
Joined
Jul 17, 2020
Messages
56
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I know this question has been asked before, but I still find myself lost. In short, I would like help with creating VBA code that passes the following GET request to an API, and returns the JSON results in 'Sheet2':


Ideal state, I would love for the code to loop through a list of parameters in column A, attaching each to the end of the above HTTP request, send the request, and then return the JSON in one row next to the parameter. Ideally each datapoint would be in its own column, but if it easier it can all be in one field. An example result (dummy data)

1612458974674.png


Many thanks!!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Have you come across the VBA-JSON Library yet? You can download it at VBA Tools (Github). It's in the library JsonConverter.bas that you will need to import into your project, and there are instructions on how to use it. In terms of the project you're envisaging, I'd say it's entirely doable. Let me know if you have any questions.
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,588
Members
449,039
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top