# geohash

[Geohash](https://en.wikipedia.org/wiki/Geohash) is a public domain spatial index.

## GEOHASH\_BOUNDARY <a href="#geohash_boundary" id="geohash_boundary"></a>

```sql
GEOHASH_BOUNDARY(index)
```

**Description**

Returns a geography representing the geohash cell. It will return `null` on error (invalid input).

**Input parameters**

* `index`: `STRING` The Geohash cell index. The maximum length supported is 17.

**Return type**

`GEOGRAPHY`

**Example**

{% tabs %}
{% tab title="carto-un" %}

```sql
SELECT `carto-un`.carto.GEOHASH_BOUNDARY('ezrqcjzgdr3');
-- POLYGON((-1.00000128149986 41.9999988377094, -0.999999940395355 41.9999988377094, ...
```

{% endtab %}

{% tab title="carto-un-eu" %}

```sql
SELECT `carto-un-eu`.carto.GEOHASH_BOUNDARY('ezrqcjzgdr3');
-- POLYGON((-1.00000128149986 41.9999988377094, -0.999999940395355 41.9999988377094, ...
```

{% endtab %}

{% tab title="manual" %}

```sql
SELECT carto.GEOHASH_BOUNDARY('ezrqcjzgdr3');
-- POLYGON((-1.00000128149986 41.9999988377094, -0.999999940395355 41.9999988377094, ...
```

{% endtab %}
{% endtabs %}

<img src="/files/4m1BK9j4Wq34gat4HHd2" alt="EU flag" data-size="line">This project has received funding from the [European Union’s Horizon 2020](https://ec.europa.eu/programmes/horizon2020/en) research and innovation programme under grant agreement No 960401.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.carto.com/data-and-analysis/analytics-toolbox-for-bigquery/sql-reference/geohash.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
