// This file is autogenerated, DO NOT EDIT
// aggregations/bucket/datehistogram-aggregation.asciidoc:782

[source, python]
----
resp = client.search(
    index="sales",
    size="0",
    aggs={
        "sale_date": {
            "date_histogram": {
                "field": "date",
                "calendar_interval": "year",
                "missing": "2000/01/01"
            }
        }
    },
)
print(resp)
----
