# Download dump

URL: https://docs.emergingtravel.com/docs/how-tos/process-dump/download-dump/

Tags: how-tos

---


> [!WARNING]
> * Each download URL returned by the API is temporary and valid for **1 hour** from the moment it is issued. Always request a fresh link before downloading the dump.
> * As the dump size can exceed 2 GB, it might take a while to download it.




**Node.js**

```js {linenos=inline}
import fs from 'fs';
import https from 'https';

// url is the URL address taken from the dump receiving calls
// fileName is the path to store the dump
function downloadDump(url, fileName) {
  let localFile = fs.createWriteStream(fileName);
  const request = https.get(url, function (response) {
    response.on('data', (d) => {
      localFile.write(d);
    });
  });
};

await downloadDump(url, fileName);
```

**Python**

```python {linenos=inline}
from urllib.request import urlretrieve


# url is the URL address taken from the dump receiving calls
# file_name is the path to store the dump
def download_dump(url, file_name):
    path, headers = urlretrieve(url, file_name)
    return path


if __name__ == "__main__":
    path = download_dump(dump_url)
```



