# Retrieve dump

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

Tags: how-tos

---


> [!WARNING]
> The dump size can exceed 2 GB.





## Request a dump

[About a dump](/docs/glossary/#dump).

Make one of the calls:
* Retrieve hotel dump ([B2B](/docs/b2b-api/static-content/retrieve-hotel-dump/), [Affiliate](/docs/affiliate-api/static-content/retrieve-hotel-dump/)).
* Retrieve hotel custom dump ([B2B](/docs/b2b-api/static-content/retrieve-hotel-custom-dump/), [Affiliate](/docs/affiliate-api/static-content/retrieve-hotel-custom-dump/)).
* Retrieve hotel incremental dump ([B2B](/docs/b2b-api/static-content/retrieve-hotel-incremental-dump/), [Affiliate](/docs/affiliate-api/static-content/retrieve-hotel-incremental-dump/)).
* Retrieve hotel reviews’ dump ([B2B](/docs/b2b-api/static-content/retrieve-hotel-reviews-dump/), [Affiliate](/docs/affiliate-api/static-content/retrieve-hotel-reviews-dump/)).
* Retrieve regions’ dump ([B2B](/docs/b2b-api/static-content/retrieve-regions-dump/), [Affiliate](/docs/affiliate-api/static-content/retrieve-regions-dump/)).
* Retrieve hotel reviews’ incremental dump ([B2B](/docs/b2b-api/static-content/retrieve-incremental-hotel-reviews-dump/), [Affiliate](/docs/affiliate-api/static-content/retrieve-incremental-hotel-reviews-dump/)).

## Extract the `url` field value from the call response

The `url` field value has the download link for the dump.




## Full code


**Node.js**

```js {linenos=inline}
import fetch from 'node-fetch';

// keyId is the API key ID
// apiKey is the API key access token
async function retrieveDump(keyId, apiKey) {
  let dumpResponse = await fetch('https://api.worldota.net/api/b2b/v3/hotel/info/dump/', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Basic ' + Buffer.from(keyId + ':' + apiKey).toString('base64')
    },
    body: JSON.stringify({
      'inventory': 'all',
      'language': 'en'
    })
  });
  const json = await dumpResponse.json();
  return json.data.url;
}

await retrieveDump(keyId, apiKey);
```

**Python**

```python {linenos=inline}
import base64
import json
import requests

# keyId is the API key ID
# apiKey is the API key access token
def retrieve_dump(key_id, api_key):
    encoded_credentials = base64.b64encode(f"{key_id}:{api_key}".encode("ascii")).decode("ascii")
    r = requests.post(
        url="https://api.worldota.net/api/b2b/v3/hotel/info/dump/",
        json={"inventory": "all", "language": "en"},
        headers={
            "Content-Type": "application/json",
            "Authorization": f"Basic {encoded_credentials}"
        }
    )
    return r.json()["data"]["url"]


if __name__ == "__main__":
    url = retrieve_dump(key_id, api_key)
```



