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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.