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
eduardomaia
Frequent Visitor

API Restfull With Multiple Pages

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.

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

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

Community Support Team _ Yuliana Gu
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

3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

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

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

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

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors