# detect_email

> **Function** in `langchain`

📖 [View in docs](https://reference.langchain.com/python/langchain/agents/middleware/_redaction/detect_email)

Detect email addresses in content.

## Signature

```python
detect_email(
    content: str,
) -> list[PIIMatch]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `content` | `str` | Yes | The text content to scan for email addresses. |

## Returns

`list[PIIMatch]`

A list of detected email matches.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/51e954877efd2d2c3c5bf09364dcfec8794eadb0/libs/langchain_v1/langchain/agents/middleware/_redaction.py#L50)