---
type: api
title: Get IP geolocation database configurations
description: **All methods and paths for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-ingest-get-ip-location-database
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-ingest-get-ip-location-database
products:
  - Elasticsearch
---

# Get IP geolocation database configurations


Availability: Generally available since 8.15

## Paths

- `GET` `/_ingest/ip_location/database/{id}`
- `GET` `/_ingest/ip_location/database`

#### Path parameters

- `id` (union string | string[]) — optional, leave it out to use `/_ingest/ip_location/database`
  Comma-separated list of database configuration IDs to retrieve.
Wildcard (`*`) expressions are supported.
To get all database configurations, omit this parameter or use `*`.

## Required authorization

- Cluster privileges: `manage`

## Authentication

- Api key: `Authorization: <value>`
  Elasticsearch APIs support key-based authentication.
  You must create an API key and use the encoded value in the request header.
  For example:
  
  
  ```
  curl -X GET "${ES_URL}/_cat/indices?v=true" \
    -H "Authorization: ApiKey ${API_KEY}"
  ```
  
  To get API keys, use the `/_security/api_key` APIs.
- Basic: `Authorization: Basic <credentials>`
- Bearer: `Authorization: Bearer <token>`
  Elasticsearch APIs support the use of bearer tokens in the `Authorization` HTTP header to authenticate with the API.
  For examples, refer to [Token-based authentication services](https://www.elastic.co/guide/en/elasticsearch/reference/current/token-authentication-services.html)

## Response

`application/json`

- `databases` (object[])
  - `id` (string)
  - `version` (number)
  - `modified_date_millis` (number)
  - `modified_date` (number)
  - `database` (object)
    - `name` (string)
      The provider-assigned name of the IP geolocation database to download.
    - `web` (object)
    - `local` (object)
      - `type` (string)
    - `maxmind` (object)
      - `account_id` (string)
    - `ipinfo` (object)
## Code examples

#### Console

```console
GET /_ingest/ip_location/database/my-database-id
```

#### JavaScript

```javascript
const response = await client.ingest.getIpLocationDatabase({
  id: "my-database-id",
});
```

#### Python

```python
resp = client.ingest.get_ip_location_database(
    id="my-database-id",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_ingest/ip_location/database/my-database-id" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.ingest().getIpLocationDatabase(g -> g
    .id("my-database-id")
);
```

#### C#

```c#
var response = await client.Ingest
    .GetIpLocationDatabaseAsync(d1 => d1
        .Id(new[] { "my-database-id" })
    );
```

#### PHP

```php
$resp = $client->ingest()->getIpLocationDatabase([
    "id" => "my-database-id",
]);
```

#### Ruby

```ruby
response = client.ingest.get_ip_location_database(
  id: "my-database-id"
)
```

