---
title: "Get article counts"
method: POST
path: "/get_article_counts"
---

# Get article counts

`POST /get_article_counts`

## Request

- Base URL: `https://newsmind.app/api/v1`
- URL: `https://newsmind.app/api/v1/get_article_counts`
- Auth: OAuth 2 (authorization code, authorization URL `https://newsmind.app/oauth/authorize`, token URL `https://newsmind.app/oauth/token`, scopes: `mcp`)

Count articles grouped by feed, day, or hour. Use before list/search for cheap planning. Doubles as a feed-velocity check (group_by=feed, since_hours=1 shows which feeds are noisiest right now).

## Request body

- object
  - `group_by` 'feed' | 'day' | 'hour', required: Bucket dimension. 'feed' returns one row per feed; 'day' / 'hour' return time buckets.
  - `unread_only` boolean: Only count articles the user hasn't marked read.
  - `since_hours` number: Only articles published in the last N hours.
  - `since_days` number: Only articles published in the last N days.
  - `feed_id` integer: Limit to a specific feed (useful with group_by=day or hour).

## Response `200`

Success

- object
  - `counts` object[], required
    - `key` string
    - `count` integer

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `402`: Subscription required (trial expired or cancelled)
- `429`: Too many calls. Either the per-account rate limit ({error: "rate_limited", message}) or the account's in-flight work ({error: <sentence>, code: "busy"}). Wait Retry-After seconds.
- `500`: Server error on our side (error: internal_error). The team has been notified.
- `503`: Temporarily unable to answer. error: timeout (the request ran too long; narrow it), server_busy or tier_unavailable (retry after Retry-After seconds when sent).

---

[API](https://skmtc.dev/newsmind/apis/newsmind-api.md) · [All operations](https://skmtc.dev/newsmind/apis/newsmind-api/llms.txt) · [OpenAPI document](https://skmtc.dev/newsmind/apis/newsmind-api/revisions/f8af23fb5a10?raw)
