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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Get data from REST API

Hi everyone, hope you're doing great

 

I need some help to resolve an issue:

 

I'm getting data from a REST API, I have researched on internet and followed to an instruction, but after I inputted mandatory parameter then click OK, it just loading...forerver... 😃 I inputted these parameter on postman and it work properly.

Postman.png2024-07-10_10-34-09.png

 

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Please follow the documentation. Use RelativePath and Query parameters. https://learn.microsoft.com/en-us/powerquery-m/web-contents#example-1

View solution in original post

9 REPLIES 9
lbendlin
Super User
Super User

Please follow the documentation. Use RelativePath and Query parameters. https://learn.microsoft.com/en-us/powerquery-m/web-contents#example-1

Anonymous
Not applicable

Thank you for your answer. Could you please guide more detailed? I'm a little confused.

What part of the documentation is confusing?

Anonymous
Not applicable

I dont know where to input bearer token to M query below:

 

let
searchText = "Power Query"
in
Web.Contents(
"https://www.bing.com",
[
RelativePath = "search",
Query = [q = searchText]
]
)

 

Could you guide me?

Anonymous
Not applicable

Hi @Anonymous ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

This suggestion doesn't help to solve at all, it's just a high level guidance. But I appreciate his suggestion so I accept it as solution to close the topic.

Where are you currently stuck?

Anonymous
Not applicable

I have copied code from postman and used ChatGPT to convert it to M language, it worked. Thank you @lbendlin for your help. Have a good day 😃

That goes in the Headers section as Authentication.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.