Tradingeconomics wants you to pay a ridiculous amount for the privilege of exporting public data as csv.

Their site obtains economic data from some api in base64, gzip and XOR encrypted form. I (kinda, got help from Chatgpt) made a script to decrypt and convert data to a readable excel sheet.

https://pastebin.com/raw/gxXZnN37

  • FuckyWucky [none/use name]
    hexagon
    ·
    edit-2
    2 months ago

    They use cloudfront for serving data used in graph. No need to use the link provided in the script (that one is for USD Korean Won exchange rate). You'll have to go to a data url

    https://tradingeconomics.com/laos/consumer-price-index-cpi

    Press F12 to bring up debug tools, click on network and change time series on the graph to make the URL containing graph data show up on network tab. Then paste it in the script and it'll make the sheet.

    • GaveUp [she/her]
      ·
      2 months ago

      Thanks for sharing the source. My issue with the cloudfront uri was that by just looking at it, you can't actually tell that tradingeconomics owns it. For all we know it could've been spun up by anybody