Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

Importing data with API which includes a list parameter

Hi ,

I need to download All contacts from a survey.

  1. Each Survey has multiple Campaigns.
  2. Each Campaign has multiple Contacts.

query "Contacts" :

 

 

= Json.Document(Web.Contents("https://api.alchemer.eu/v5/survey/"&SurveyIdParameter&"/surveycampaign/"&CampaignIdParameter&"/surveycontact?&api_token=123456&api_token_secret=123456"))

 

 

SurveyIdParameter is a single value eneterd manually.

CampaignIdParameter is a query parameter that get a list of values

 

How do I "make" PQ to loop on the values of the CampaignIdParameter ?

 

Appreciating any help,

Tamir

 

 

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You can transform your list to a table, create a new custom functon like this:

(A as text) =>
let 
    Source = = Json.Document(Web.Contents("https://api.alchemer.eu/v5/survey/"&SurveyIdParameter&"/surveycampaign/"&A&"/surveycontact?&api_token=123456&api_token_secret=123456"))

Invoke this function to the table to craete a new column to get each content.

 

Refer: Scrape Data from Multiple Web Pages with Power Query 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You can transform your list to a table, create a new custom functon like this:

(A as text) =>
let 
    Source = = Json.Document(Web.Contents("https://api.alchemer.eu/v5/survey/"&SurveyIdParameter&"/surveycampaign/"&A&"/surveycontact?&api_token=123456&api_token_secret=123456"))

Invoke this function to the table to craete a new column to get each content.

 

Refer: Scrape Data from Multiple Web Pages with Power Query 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Add a custom column to construct each individual URL and fetch its contents, then combine the results as records or tables as needed.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.