Forum Discussion
NuriaZ
2 years agoNew Member
Creating multiple queries from a list of values
I hope that someone can help me. I have an Excel sheet with a list of names golf players and their license numbers. There's a website where I can get their game data but I have to search by license...
- 2 years ago
parry2k has a good answer related to this: Calling multiple APIs based on a column
Here's a simplified example I've created using a dummy API service:
let Source = #table({"ID"}, {{1}, {3}, {6}}), BaseURL = "https://jsonplaceholder.typicode.com/comments?postId=", ID_Result = Table.AddColumn( Source, "API_Result", each Json.Document(Web.Contents(BaseURL & Number.ToText([ID]))), type list ), Extract_Field = Table.AddColumn( ID_Result, "FirstEmail", each List.First([API_Result])[email], type text ) in Extract_Field
AlexisOlson
2 years agoSuper User
parry2k has a good answer related to this: Calling multiple APIs based on a column
Here's a simplified example I've created using a dummy API service:
let
Source = #table({"ID"}, {{1}, {3}, {6}}),
BaseURL = "https://jsonplaceholder.typicode.com/comments?postId=",
ID_Result = Table.AddColumn(
Source,
"API_Result",
each Json.Document(Web.Contents(BaseURL & Number.ToText([ID]))),
type list
),
Extract_Field = Table.AddColumn(
ID_Result,
"FirstEmail",
each List.First([API_Result])[email],
type text
)
in
Extract_Field
NuriaZ
2 years agoNew Member
I will try to adapt your code to what I need. It looks like it is what I'm asking for.
I'll see if I can make it work because I'm quite new at this.
Thank you.