> For the complete documentation index, see [llms.txt](https://docs.thesports.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thesports.com/help-center/football/yellow-card-and-red-card-rules.md).

# Yellow card and red card rules

### **Second yellow card resulting in a red card**

If a player receives two yellow cards, the second yellow card results in a red card.

The [**Real-time data**](/thesports-docs/basic-data/real-time-data.md) API endpoint returns the following data:

* `score`: One yellow card and one red card
* `stats`: One yellow card and one red card
* `incidents`: Two incidents, including one `yellow card` incident and one `two yellow cards resulting in a red card` incident

The following is an example from the `incidents` field:

<figure><img src="/files/pFYtvBWTrUqncJ7pprSY" alt=""><figcaption></figcaption></figure>

### **One yellow card followed by a direct red card**

If a player first receives a yellow card and later receives a direct red card, the **Real-time data** API endpoint returns the following data:

* `score`: One yellow card and one red card
* `stats`: One yellow card and one red card
* `incidents`: Two incidents, including one `yellow card` incident and one `red card` incident

### **How to distinguish between these situations?**

The `score` and `stats` fields return the same values in both situations, so they cannot be used to distinguish between them.

Use the second incident in the `incidents` field to determine whether the red card resulted from a second yellow card or was issued directly.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.thesports.com/help-center/football/yellow-card-and-red-card-rules.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
