It’s a NodeJS script @steven. Paste the code into a .js file (ie. run.js), install the required dependencies which are datocms-client and request in this case with:
In the snippet, it references allPages but looking at the records.json file It appears to export all of the different models and not just pages. Is that correct?