> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://notion.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://notion.ferndocs.com/_mcp/server.

# Query a database endpoint supports filtering by timestamp

When [querying a database](/reference/post-database-query) using filters, you previously were only able to build filters using properties that were explicitly defined in the database schema. We've added a new type of filter for the created timestamp and last edited timestamp of any page within the database. This means you can filter by these attributes, even if the database doesn't have a "Created time" or "Last edited time" _property_.

You can read more about this filter type [here](/reference/post-database-query-filter#timestamp-filter-object), but as a preview here is how you would filter by the created timestamp:

**`JSON`**

```json JSON
{
    "filter": {
        "timestamp": "created_time",
        "created_time": {
          "past_week": {}
        }
    }
}
```
And here's how you would filter by the last edited time:

**`JSON`**

```json JSON
{
    "filter": {
        "timestamp": "last_edited_time",
        "last_edited_time": {
          "after": "2021-05-10"
        }
    }
}
```
Note that you can also use this filter type within a compound filter.