---
title: List Destinations
slug: asindataapi/destinations-api/list
docTags: 
createdAt: 2024-08-01T10:34:46.729Z
---

# List Destinations

You can List all of the Destinations currently set up on your account by making making a  `HTTP GET` request to the  `/destinations` endpoint.

***

### Parameters

The following querystring (HTTP GET) parameters allow you to refine the results returned by the Destinations List API.

| `Parameter`      | `Required` | `Description`                                                                                                                                      |
| ---------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `api_key`        | `required` | The API key for your account.                                                                                                                      |
| `search_term`    | `optional` | Limits the returned Destinations to just those containing the `search_term` in their name.                                                         |
| `page`           | `optional` | Set the page number of Destinations to return, defaults to `page=1` . 10 Destinations are returned per page.                                       |
| `sort_by`        | `optional` | The sort order to apply to the results. Valid values are `type` (to sort by Destination type) or `name` (to sort by Destination name).             |
| `sort_direction` | `optional` | The sort direction to return results. Valid values are `descending` or `ascending` (the default). Use in conjunction with the `sort_by` parameter. |

### Example

<font color="#52c41a">`GET`</font>  `/destinations`

In the example below we List page 1 of all the Destinations on your account:

:::CodeblockTabs
HTTP

```HTTP
https://api.asindataapi.com/destinations?api_key=demo
```

```curl
$ curl "https://api.asindataapi.com/destinations?api_key=demo"
```

```nodejs
const axios = require('axios');

axios.get('https://api.asindataapi.com/destinations?api_key=demo')
  .then(response => {
    const apiResponse = response.data;

    console.log("Total Destinations: ", apiResponse.usage.used);

    apiResponse.destinations.map((destination, number) =>
      console.log((number + 1) + '. ' + destination.name);
      
  }).catch(error => {
    console.error(error);
  });
```

```python
import requests
import json

params = {
  'api_key': 'demo'
}

api_result = requests.get('https://api.asindataapi.com/destinations', { params })

api_response = api_result.json()

for number, destination in enumerate(api_response['destinations'], start=1):
    print "%s. %s" % (number, destination['name'])
```

```php
<?php
      
$queryString = http_build_query([
  'api_key' => 'demo',
]);

$ch = curl_init(sprintf('%s?%s', 'https://api.asindataapi.com/destinations', $queryString));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
# the following options are required if you're using an outdated OpenSSL version
# more details: https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 180);

$json = curl_exec($ch);
curl_close($ch);

$api_result = json_decode($json, true);

print_r($api_result);

echo "Total Destinations: ", $api_result['usage']['used'], PHP_EOL;

foreach ($api_result['destinations'] as $number => $destination) {
  echo "{$number}. {$destination['name']}", PHP_EOL;
}

?>
```
:::

ASIN Data API responds with the following JSON showing page 1 of all the Destinations on your ASIN Data API account:

```json
{
  "request_info": {
    "success": true
  },
  "usage": {
    "used": 1,
    "limit": 50,
    "available": 49
  },
  "destinations": [
    {
      "id": "ABCDEFG",
      "name": "My First S3 Destination",
      "type": "s3",
      "enabled": true,
      "used_by": 0,
      "s3_bucket_name": "s3_bucket_name",
      "s3_path_prefix": "my_path_prefix"
    }
  ]
}
```

***

**Next Steps**
     [Update Destination](https://docs.trajectdata.com/asindataapi/destinations-api/update)
     [Delete Destination](https://docs.trajectdata.com/asindataapi/destinations-api/delete)
