# Classify Emails as Spam or Legitimate

**Use case:** 

Label incoming emails as spam or legitimate so inboxes stay clean and important messages never get buried or lost in the noise.

## Input

```json
{
  "texts": [
    "Congratulations you won a free cruise, click here to claim your prize now"
  ],
  "categories": [
    "spam",
    "legitimate"
  ],
  "multiLabel": false
}
```

## Output

```json
{
  "text": {
    "label": "Text",
    "format": "text"
  },
  "label": {
    "label": "Label",
    "format": "text"
  },
  "labels": {
    "label": "Labels",
    "format": "array"
  },
  "confidence": {
    "label": "Confidence",
    "format": "number"
  },
  "tags": {
    "label": "Tags",
    "format": "array"
  },
  "categories": {
    "label": "Categories",
    "format": "array"
  },
  "multiLabel": {
    "label": "Multi-label",
    "format": "boolean"
  },
  "truncated": {
    "label": "Truncated",
    "format": "boolean"
  },
  "observedAt": {
    "label": "Classified at",
    "format": "text"
  },
  "error": {
    "label": "Error",
    "format": "text"
  }
}
```

## About this Actor

This example demonstrates how to use [Tool: Bulk Text Classifier & Tagger](https://apify.com/scrapers_lat/text-classifier-tool) with a specific input configuration. Visit the [Actor detail page](https://apify.com/scrapers_lat/text-classifier-tool) to learn more, explore other use cases, and run it yourself.