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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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