---
title: "Content"
description: "<p>Classify, enrich, and align content with topics.</p>"
url: "https://www.contentstack.com/docs/developers/apis/lytics-api/content"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-11-20"
---

# Content

Classify, enrich, and align content with topics.

## Get content alignment with a set of topics

### Get content alignment with a set of topics

**POST** `/v2/content/align`

Get content alignment with a set of topics

#### Query Parameters

- **method** (optional)
  Method for similarity calculation
- **config** (optional)
  Affinity Config ID. Defaults to accounts default
- **limit** (optional)
  Limits response size to this number

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "_meta": {},
  "data": {
    "alignment": {
      "property1": 0,
      "property2": 0
    }
  },
  "request_id": "string",
  "status": 0
}
```

## Classify a URL

### Classify a URL

**POST** `/v2/content/classify`

The Classification API classifies a URL and returns all the extracted content and steps taken to classify the content.

#### Query Parameters

- **url** (required)
  URL to classify

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "_meta": {},
  "data": {
    "content": {},
    "steps": [
      null
    ]
  },
  "request_id": "string",
  "status": 0
}
```

## Enrich a URL or text with Topics

### Enrich a URL or text with Topics

**POST** `/v2/content/enrich`

Enrich a URL or text with Topics and Inferred Topics

#### Query Parameters

- **url** (optional)
  URL to enrich
- **text** (optional)
  Text to enrich

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "_meta": {},
  "data": {
    "inferred_topics": {
      "property1": 0,
      "property2": 0
    },
    "input": "string",
    "topics": {
      "property1": 0,
      "property2": 0
    }
  },
  "request_id": "string",
  "status": 0
}
```

## Get content opportunities

### Get content opportunities

**GET** `/v2/content/opportunity`

Get the saved content opportunity metrics for the current account. Optionally provide a date to fetch the snapshot for that UTC day.

#### Query Parameters

- **date** (optional)
  Opportunity snapshot date in YYYY-MM-DD format

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "_meta": {},
  "data": {
    "topics": [
      {
        "context_layer": "string",
        "dimensions": [
          {
            "label": "string",
            "subject": "string",
            "value": 0
          }
        ],
        "segments": [
          "string"
        ],
        "topic": "string"
      }
    ]
  },
  "request_id": "string",
  "status": 0
}
```