# Alerts API Reference

The [Alerts API](/alerts-api/intro.md) provides two top-level nodes for Craft API: `alerts` and `alert`.&#x20;

### Alerts node signature

Returns a subset of Alerts as per specified arguments. The default page size is 100 items. Items are sorted by the `publishedAt` field in descending order by default.

| Argument | Type                                                                                         | Description                                                                | Default          |
| -------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------- |
| first    | Int                                                                                          | The number of Alerts to retrieve. Should be between 1 and 100 if specified | 100              |
| after    | ID                                                                                           | When specified, API will return the next page of Alerts after given ID     |                  |
| where    | [AlertBoolExpression](/alerts-api/alerts-api-reference/filter-object.md#alertboolexpression) | An expression defining a subset of Alerts to be returned from the API      |                  |
| orderBy  | AlertOrderBy                                                                                 | Specifies fields and sorting order for the API output                      | publishedAt DESC |

### Alert node signature

Allows retrieving a single Alert by its ID.

| Argument | Type | Description                                      | Default |
| -------- | ---- | ------------------------------------------------ | ------- |
| id       | ID   | Unique ID of Alert, as retrieved from Alerts API |         |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.craft.co/alerts-api/alerts-api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
