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

[source, python]
----
resp = client.search(
    index="sales",
    size="0",
    aggs={
        "sales_over_time": {
            "date_histogram": {
                "field": "date",
                "calendar_interval": "2d"
            }
        }
    },
)
print(resp)
----
