Quantcast
Channel: Power Query topics
Viewing all articles
Browse latest Browse all 30990

Trying to connect to Bureau of Labor Statistics, but stuck on the URL query

$
0
0

I've actually got the connection going, but I need to provide multiple (what the Burear of Statistics calls) "sessionids". I can provide 1 session ID and get the data, which is great, but I need more than one, which is what their API has.

 

Here's my query right now:

 

let
    Source = Json.Document(Web.Contents("https://api.bls.gov/publicAPI/v2/timeseries/data/LAUCN281070000000003?registrationkey=abc123def345ghi678")),
    Results = Source[Results]
in
    Results

 

The highlighted portion is the "sessionid", but I need to provide multiple sessionid's. It can't be a field in the URL (i.e. &sessionid=LAUCN281070000000003,ABCD271728372818,ETC273282828847 and so on). It has to be a part of the main URL (pardon my novice lingo).

 

It all seems pretty straightforward in the API information for BLS (Burear of Labor Statistics) here: https://www.bls.gov/developers/api_signature_v2.htm#parameters

 

But I've tried everything I can think of (i.e. "https://api.bls.gov/publicAPI/v2/timeseries/data/&"LAUCN281070000000003,ABCD271728372818,ETC273282828847"&?registrationkey=abc123def345ghi678

 

All to no avail.

 

I know this is rather specific, but any advice would be greatly appreciated...

 

 

Thanks!

 


Viewing all articles
Browse latest Browse all 30990

Trending Articles