Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello everyone
I have some data that i get from a API call, name, id, domain... and i need take that id and call to another API. Im following that video https://www.thebiccountant.com/2018/03/22/web-scraping-2-scrape-multiple-pages-power-bi-power-query/
thats how my query looks
let
content = "{
""method"": ""post"",
""body"": {}
}",
Origen = Json.Document(Web.Contents("https://website/data/730214/runs/3246632/", [Headers=[#"content-type"="application/json", Authorization="Bearer ZnIzY3UzM2w1YXQ2ZDM0Mm9nMWxkYWRta2dtYTI0aWNtaDdmMmZvYTNiZ3E0MzVjbGhiZ3ZrczBuMCYzNzI5NCYxNjYwMjA1MDM5Nzc0"], Content=Text.ToBinary(content)],
[Query = "website/data/" & main_id &"/runs/" & lastrun_id ])),
#"Convertido en tabla" = Record.ToTable(Origen)
in
#"Convertido en tabla"
When i try to do that i get the next error
Expression.Error: Se han pasado 3 argumentos a una función que espera entre 1 y 2.
Detalles:
Pattern=
Arguments=[List]
How can i solve it?
Thanks u
Hi @yebenesPW ,
you need to include the Query as another record field in the first record. So removing some brackets should do the job here:
let
content = "{
""method"": ""post"",
""body"": {}
}",
Origen = Json.Document(Web.Contents("https://website/data/730214/runs/3246632/", [Headers=[#"content-type"="application/json", Authorization="Bearer ZnIzY3UzM2w1YXQ2ZDM0Mm9nMWxkYWRta2dtYTI0aWNtaDdmMmZvYTNiZ3E0MzVjbGhiZ3ZrczBuMCYzNzI5NCYxNjYwMjA1MDM5Nzc0"], Content=Text.ToBinary(content), Query = "website/data/" & main_id &"/runs/" & lastrun_id ])),
#"Convertido en tabla" = Record.ToTable(Origen)
in
#"Convertido en tabla"
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 16 | |
| 12 | |
| 9 | |
| 7 | |
| 6 |