The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hey everyone,
I need to query an API Restful through all the pages. I've tried all the methods from other posts in here. But I still couldn't manage to succeed.
Here's my query.
let
apiUrl = "https://api.spotter.exactsales.com.br/api/v2/listarlead?page=1DtCadastroInicio=2016-03-28T14:59:39.000Z",
options = [Headers =[#"mytoken"]],
result = Web.Contents(apiUrl , options),
#"JSON Importado" = Json.Document(result,1252),
#"Convertido em Tabela" = Table.FromList(#"JSON Importado", Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expandido Column1" = Table.ExpandRecordColumn(#"Convertido em Tabela", "Column1", {"id", "Empresa", "DtCadastro", "DtAtualizacao", "Contatos", "Mercado", "Origem", "SubOrigem", "PreVendedor", "Grupo", "Vendedor", "TelEmpresa", "LinkPublico", "LinkMkt", "LinkFeedBack", "Site", "ProdutoLead", "Endereco", "Cidade", "Estado", "Pais", "Obs", "Etapa", "Dores", "Produtos", "CamposPersonalizados", "Etapas"}, {"Column1.id", "Column1.Empresa", "Column1.DtCadastro", "Column1.DtAtualizacao", "Column1.Contatos", "Column1.Mercado", "Column1.Origem", "Column1.SubOrigem", "Column1.PreVendedor", "Column1.Grupo", "Column1.Vendedor", "Column1.TelEmpresa", "Column1.LinkPublico", "Column1.LinkMkt", "Column1.LinkFeedBack", "Column1.Site", "Column1.ProdutoLead", "Column1.Endereco", "Column1.Cidade", "Column1.Estado", "Column1.Pais", "Column1.Obs", "Column1.Etapa", "Column1.Dores", "Column1.Produtos", "Column1.CamposPersonalizados", "Column1.Etapas"})
in
#"Expandido Column1"
The API returns a result limited to 100 registers. So, the number of pages will keep growing. Although, to simplify, if I could just create a range for wich pages to navigate would be awesome.
Solved! Go to Solution.
Hi @eduardomaia,
Please have a look at below articles to see if they helpful to your scenario:
Loop through Multiple Web Pages using Power Query
Iterating over multiple pages of web data using Power Query
Regards,
Yuliana Gu
Hi @eduardomaia,
Please have a look at below articles to see if they helpful to your scenario:
Loop through Multiple Web Pages using Power Query
Iterating over multiple pages of web data using Power Query
Regards,
Yuliana Gu
Thanks a Lot! When I was searching for a solution I didn't found the post Loop through Multiple Web Pages using Power Query
Simple and eficient... it worked here.
Here is a recent link that could work:
Loop through Multiple Web Pages using Power Query - Adatis
Regards,
Jessica
User | Count |
---|---|
58 | |
54 | |
53 | |
49 | |
30 |
User | Count |
---|---|
177 | |
88 | |
70 | |
48 | |
48 |