Forum Discussion

daniela_costa7's avatar
daniela_costa7
New Member
5 years ago

Trying to connect to API from INE through JSON file but exceeds limit

Hi everyone!

 

I'm trying to connect to an API from INE (National Statistics Institute), that has 5 main dimensions:

  • varcd: -> code of report
  • Dim1 -> date reference (S3A202101 for Jan 2021, S3A202102 for Feb 2021, etc...)
  • Dim2 -> location
  • Dim3 -> type of good
  • lang -> language

I want to load this table to Power Query, so I did the following:

If I import the JSON file that I get from (including Dim1)....

 

https://www.ine.pt/ine/json_indicador/pindica.jsp?op=2&varcd=0001400&lang=PT&Dim1=S3A202101

 

....it works, but i would have to do it manually for all months+year since 2019.

 

Is there a solution for my problem? I don't have much of a background in JSON files, XML, etc, so I ask for your help please!

 

Thanks!!

3 Replies

      • goncalogeraldes's avatar
        goncalogeraldes
        Super User

        Try connecting via a REST API like in this example with the full URL of the request from the cURL tab in the API Explorer