> For the complete documentation index, see [llms.txt](https://docs.craft.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.craft.co/alerts-api/alerts-api-reference/alert-object.md).

# Alert Object

An Alert object represents a single event captured by Craft for a particular company.

| Field            | Type                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                           |
| ---------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id               | ID                                                                            | UUID to identify this Alert document                                                                                                                                                                                                                                                                                                                                                                  |
| dataset          | String!                                                                       | Dataset represents the type of source data used to generate this alert                                                                                                                                                                                                                                                                                                                                |
| class            | [AlertClass](/alerts-api/alerts-api-reference/alert-object.md#alertclass)     | <p>Class of the Alert. Contains machine-friendly</p><p>"code" as well as human-readable "label" fields.</p>                                                                                                                                                                                                                                                                                           |
| title            | String!                                                                       | Summary describing the Alert contents                                                                                                                                                                                                                                                                                                                                                                 |
| text             | String!                                                                       | Full text of the Alert                                                                                                                                                                                                                                                                                                                                                                                |
| source           | String                                                                        | Represents news source URL for Alerts from the "news" dataset                                                                                                                                                                                                                                                                                                                                         |
| value            | Float                                                                         | Stores the value of the dataset at the point when Alert was created                                                                                                                                                                                                                                                                                                                                   |
| variable         | String!                                                                       | Describes the variable from the dataset which was used to create the Alert                                                                                                                                                                                                                                                                                                                            |
| polarity         | Int!                                                                          | <p>Represents the polarity (sentiment) of the signal.<br>Typical values are: <br> -1 - negative polarity<br>  0 - neutral <br>  1 - positive polarity</p>                                                                                                                                                                                                                                             |
| company          | [AlertCompany](/alerts-api/alerts-api-reference/alert-object.md#alertcompany) | <p>Holds additional data about the Company, Alert belongs to.<br><br>May be "null" in case Alert is related to multiple companies at the same time, when none of them is specifically an Alert target.<br></p><p>For example, a change of the aluminum price may affect many dependent manufacturers, but being a result of overall market movement, rather than an Alert for a specific company.</p> |
| relatedCompanies | \[[AlertCompany](#alertcompany)!]                                             | <p>Contains all the companies related to the parent Alert.<br></p><p>For example, a change of the steel price may affect multiple manufacturers.</p><p><br>When filtering by <code>where.company.id</code>, this list will still contain a full set of companies related to the Alert, not just those with matching IDs (but at least one of the Companies will have a desired ID)</p>                |
| payload          | JSON!                                                                         | <p>Holds additional metadata related to the specific Alert.<br></p><p>Please, note that the metadata structure varies depending on the Alert's dataset, variable and class.<br><br>You may find examples of <code>payload</code> Object <a href="/pages/GIb3BI0MJnedqEB9DsfH">here</a>.</p>                                                                                                           |
| resource         | [AlertResource](#alertcompany-1)                                              | Resource that is affected by the given Alert, such as steel, coal, oil, etc. May be missing for Alerts from the datasets that are describing other type of events.                                                                                                                                                                                                                                    |
| period           | String!                                                                       | Defines the time window over which the change of variable was detected                                                                                                                                                                                                                                                                                                                                |
| publishedAt      | String!                                                                       | ISO 8601 timestamp when Alert was published by Craft                                                                                                                                                                                                                                                                                                                                                  |
| occuredAt        | String!                                                                       | ISO 8601 timestamp of change in the tracked value causing this Alert to be created.                                                                                                                                                                                                                                                                                                                   |

### AlertClass

Represents the category of changes that are described by an Alert.

| Field | Type    | Description                                   |
| ----- | ------- | --------------------------------------------- |
| code  | String! | URL-friendly class code                       |
| label | String! | A human-readable version of the Alert's class |

### AlertCompany

Stores a portion of the data from [Basic Company Information](/company-data-api/data-points/basic-company-information.md#basic-fields) for the Company this Alert belongs to.

| Field       | Type    | Description                                                                                                                                        |
| ----------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| id          | ID!     | Company ID which can be used to query additional Company data from the `company` node in the [Company Data API](/company-data-api/introduction.md) |
| displayName | String! | A human-readable company name. Same as `Company.displayName`                                                                                       |
| homepage    | String! | Company's homepage URL. Same as `Company.homepage`                                                                                                 |

### AlertResource

A Resource that is affected by the given Alert, such as `steel`, `coal`, `oil`, etc. May be missing for Alerts from the datasets that are describing other types of events.

| Field | Type    | Description                                                                                       |
| ----- | ------- | ------------------------------------------------------------------------------------------------- |
| id    | String! | <p></p><p>Resource ID, such as:</p><ul><li>"oil"</li><li>"natural\_gas"</li><li>"steel"</li></ul> |
| type  | String! | <p></p><p>General category of the resource, for example:</p><ul><li>"commodity"</li></ul>         |

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/alert-object.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.
