Analytics

Mentions over time

Matched, relevant and sentiment counts per day or week across the window, as one total series or split per platform or per keyword with `by`. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.

GET
/v1/analytics/series
AuthorizationBearer <token>

API key minted via POST /v1/api-keys (format mk_live_...)

In: header

Query Parameters

range?string

Preset window ending today. Ignored when from or to is given. Default 30d.

Value in"7d" | "30d" | "90d" | "365d"
from?string

First day, YYYY-MM-DD, inclusive, in timezone.

Match^\d{4}-\d{2}-\d{2}$
to?string

Last day, YYYY-MM-DD, inclusive, in timezone. Default today.

Match^\d{4}-\d{2}-\d{2}$
keywordIds?|null

Only these keyword ids. Repeatable, or comma-separated; omit for every keyword.

Itemsitems <= 50
platforms?array<string>

Only these platforms. Repeatable, or comma-separated; omit for every platform.

Itemsitems <= 20
compare?boolean

true adds the period of the same length right before the window as previous.

timezone?string

IANA zone the days are cut in (Europe/Madrid). Default UTC. One offset, the zone's at the end of the window, applies to the whole window.

Lengthlength <= 64
bucket?string

Point granularity: hour (windows of at most 14 days), day, week (Monday start) or month. Default: day up to 90 days, week beyond.

Value in"hour" | "day" | "week" | "month"
by?string

Split into one series per platform, per keyword (the top 20 by matched, the rest folded into "other") or per sentiment (positive, neutral, negative, unclassified). Omit for one total series.

Value in"platform" | "keyword" | "sentiment"

Response Body

application/json

application/json

application/json

curl -X GET "https://api.mentio.dev/v1/analytics/series"
{
  "window": {
    "from": "string",
    "to": "string",
    "days": 0,
    "timezone": "string",
    "bucket": "hour"
  },
  "data": [
    {
      "key": "string",
      "label": "string",
      "keyword": {
        "id": "string",
        "term": "string",
        "kind": "brand"
      },
      "points": [
        {
          "date": "string",
          "matched": 0,
          "relevant": 0,
          "positive": 0,
          "neutral": 0,
          "negative": 0,
          "unclassified": 0
        }
      ]
    }
  ],
  "previous": [
    {
      "key": "string",
      "label": "string",
      "keyword": {
        "id": "string",
        "term": "string",
        "kind": "brand"
      },
      "points": [
        {
          "date": "string",
          "matched": 0,
          "relevant": 0,
          "positive": 0,
          "neutral": 0,
          "negative": 0,
          "unclassified": 0
        }
      ]
    }
  ]
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}