// This file is autogenerated, DO NOT EDIT
// query-dsl/geo-grid-query.asciidoc:62

[source, python]
----
resp = client.search(
    index="my_locations",
    size=0,
    aggs={
        "grouped": {
            "geohash_grid": {
                "field": "location",
                "precision": 2
            }
        }
    },
)
print(resp)
----
