> For the complete documentation index, see [llms.txt](https://docs.ghumelu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ghumelu.com/boundary-api.md).

# Boundary API

## Get Quality Information for a Boundary

<mark style="color:blue;">`GET`</mark>&#x20;

Shows Quality score, address components, missing components, and metadata for an address

#### Headers

| Name           | Type   | Description        |
| -------------- | ------ | ------------------ |
| x-api-key\*    | String | Authentication Key |
| content-type\* | String | application/json   |

#### Request Body

| Name     | Type   | Description                            |
| -------- | ------ | -------------------------------------- |
| boundary | String | Boundary string with or without commas |

{% tabs %}
{% tab title="200: OK Success" %}

{% endtab %}

{% tab title="400: Bad Request invalid input, object invalid" %}

{% endtab %}

{% tab title="403: Forbidden Authorization Failure, invalid key" %}

{% endtab %}
{% endtabs %}

## Query Structure

{% tabs %}
{% tab title="Sample Request" %}
{% code overflow="wrap" lineNumbers="true" %}

```sh
curl -X GET --location --header "Accept:application/json" --header "Content-Type: application/json" -H "Authorization: Bearer " -d '{"user.locations": "29.962358,77.539901"}' https://api.ghumelu.com/v2/boundary
```

{% endcode %}
{% endtab %}

{% tab title="Sample Response" %}
{% code overflow="wrap" lineNumbers="true" %}

```sh
{"kind":"ghumelu#BoundayAPIResponse","etag":"4caf61bda19f1d784217a1e107c-90545","pageInfo":{"totalResults":1,"resultsPerPage":1},"items":{"boundary":["IN"]}}
```

{% endcode %}
{% endtab %}
{% endtabs %}

###

{% tabs %}
{% tab title="Sample Request" %}
{% code overflow="wrap" lineNumbers="true" %}

```sh
curl -X GET --location --header "Accept:application/json" --header "Content-Type: application/json" -H "Authorization: Bearer" -d '{"user.locations": "29.962358,77.539901"}' https://api.ghumelu.com/v2/boundary/language
```

{% endcode %}
{% endtab %}

{% tab title="Sample Response" %}
{% code overflow="wrap" lineNumbers="true" %}

```sh
{"kind":"ghumelu#BoundayAPILanguageResponse","etag":"fd306d910897cb01ed6be55bd93-efc63","pageInfo":{"totalResults":1,"resultsPerPage":1},"items":{"language":[[{"hi":{"label":"Hindi","official":false,"administrative-use":false,"commercial-use":false,"national-use":false,"distribution":"30%"}},{"en":{"label":"English","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"bn":{"label":"Bengali","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"gu":{"label":"Gujarati","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"ks":{"label":"Kashmiri","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"ml":{"label":"Malayalam","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"mr":{"label":"Marathi","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"or":{"label":"Oriya","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"pa":{"label":"Punjabi","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"ta":{"label":"Tamil","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"te":{"label":"Telugu","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"ur":{"label":"Urdu","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"kn":{"label":"Kannada","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"as":{"label":"Assamese","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"sa":{"label":"Sanskrit","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"sd":{"label":"Sindhi","official":true,"administrative-use":false,"commercial-use":false,"national-use":false}},{"hi":{"label":"Hindi","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"ur":{"label":"Urdu","official":false,"administrative-use":false,"commercial-use":false,"national-use":false}},{"dialect":["Regional languages"]}]]}}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Response Structure

{% tabs %}
{% tab title="Example Request" %}
{% code lineNumbers="true" %}

```sh
curl --request GET --location 
'https://api.ghumelu.com/v2/boundary/language/?user.locations=[user's latitude, user's longitude]&key=[YOUR_API_KEY]'
\
--header 'Authorization: Bearer $BEARER_TOKEN'
```

{% endcode %}
{% endtab %}

{% tab title="Example Response" %}
{% code lineNumbers="true" %}

```sh
 {
 "kind": "ghumelu#boundaryLanguageResponse",
 "etag": "g2524LdBjHrCj5tu58udI-LCOU0",
 "pageInfo": {
   "totalResults": 1,
   "resultsPerPage": 5
   },
 "items": {
       "language": "[widely spoken language label]"
   }
 }
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Response Overview

1. **Boundary Components:** Contains an array of address components with a json object containing

```sh
 {
"componentType": "Zip Code",
}
```

2. Boundaries

Search for boundaries to understand the geographical segmentation of any user around the world.

3. Zip Code

Identify the location with globally identified zonal code to pinpoint the user location and stay ahead in delivering relatable content.

3. Languages

Look up and search regional languages to help people in finding content in their way of communication.

### Get your API key

All API requests are authenticated using API key. Any request that doesn't include an API key will return an error.

You can get an API key from your [Ghumelu Console](https://developers.ghumelu.com/en/welcome) dashboard to get started.

<figure><img src="/files/5v9K5Uq4cUy6fvGHdyi5" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="curl" %}

```sh
curl --request GET --location 
'https://api.ghumelu.com/v2/boundary/language/?user.locations=[user's latitude, user's longitude]&key=[YOUR_API_KEY]'
```

{% endtab %}
{% endtabs %}
