> For the complete documentation index, see [llms.txt](https://developer.abacum.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.abacum.ai/essentials/concepts/filter-by-period.md).

# Filter by period

Limit model data and dataset data to a date range.

The model data and dataset data endpoints accept two optional parameters:

* `start_date`: the lower bound of the period.
* `end_date`: the upper bound of the period.

## Date formats

| Endpoints                                       | Accepted formats                                |
| ----------------------------------------------- | ----------------------------------------------- |
| `actuals_data`, `scenario_data`, `rolling_data` | `YYYY-MM` (monthly models only) or `YYYY-MM-DD` |
| `raw_data`, `processed_data`                    | `YYYY-MM` only                                  |

## Rules

1. Send both parameters, or neither. If you send only one, the API returns `400` with this message: `Both 'start_date' and 'end_date' are required when filtering by period.`
2. The period snaps to the grain of the model. For a monthly model, a month expands to its first day and its last day.

## Example

This request returns the actuals for January 2023 only:

```
GET https://api.abacum.io/public-api/models/MODEL_ID/actuals_data?start_date=2023-01&end_date=2023-01
```

{% hint style="info" %}
A weekly model snaps the period to the start and the end of the week. It rejects the `YYYY-MM` format, so use `YYYY-MM-DD`.
{% endhint %}
