AntiSMI News API
The news API from AntiSMI — 5 operation(s) for news.
The news API from AntiSMI — 5 operation(s) for news.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/antismi-media:antismi-media-news-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Russian Archive News API
description: 'Semantic search, daily digests and trends over a Russian-language news archive since 1999. Authentication: X-API-Key header (get a key at https://news.antismi.media, Settings → Account). Plans and limits: https://news.antismi.media/mcp'
version: 1.0.0
tags:
- name: News
paths:
/news/{news_id}:
get:
tags:
- News
summary: Get News By Id
description: Get full news article by ID with metadata
operationId: get_news_by_id_news__news_id__get
parameters:
- name: news_id
in: path
required: true
schema:
type: integer
title: News Id
- name: lang
in: query
required: false
schema:
enum:
- ru
- en
type: string
description: 'Язык метаданных: en → title/resume/key_notions из *_en с fallback на русский'
default: ru
title: Lang
description: 'Язык метаданных: en → title/resume/key_notions из *_en с fallback на русский'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/news/search:
post:
tags:
- News
summary: Search News
description: 'Search news with filters
Available only for premium users.'
operationId: search_news_news_search_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewsFilter'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/NewsSearchResult'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- APIKeyHeader: []
/news/similarity_search:
post:
tags:
- News
summary: Similarity Search
description: 'Perform similarity search using embeddings
Available only for premium users.'
operationId: similarity_search_news_similarity_search_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SimilaritySearch'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/SimilaritySearchResult'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- APIKeyHeader: []
/news/vector_search:
post:
tags:
- News
summary: Vector Search
description: 'Perform vector search using text query
This endpoint:
1. Generates embedding from the query text using Google Gemini API
2. Searches for similar news using pgvector (cosine similarity)
3. Returns enriched news items sorted by relevance
Available only for premium users.
Parameters:
- query: Search text (will be converted to embedding)
- date_from: Optional start date filter
- date_to: Optional end date filter
- limit: Maximum number of results (default 50, max 100)
- telegram_id: Optional user ID for logging'
operationId: vector_search_news_vector_search_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VectorSearchRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/VectorSearchResult'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- APIKeyHeader: []
/news/topic_timeline:
post:
tags:
- News
summary: Topic Timeline
description: 'Хронология темы: сколько из K ближайших по смыслу новостей приходится на каждый период
(год или месяц), нормировка на объём базы за период, лучшие заголовки периода с точной похожестью.
Для вопросов «как менялась тема за N лет»: обычный vector_search отдаёт лишь top-N ближайших,
что не показывает динамику. Только premium/media/system, как и vector_search.'
operationId: topic_timeline_news_topic_timeline_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TopicTimelineRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TopicTimelineResult'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- APIKeyHeader: []
components:
schemas:
TopicTimelineResult:
properties:
query:
type: string
title: Query
step:
type: string
title: Step
date_from:
type: string
format: date-time
title: Date From
date_to:
type: string
format: date-time
title: Date To
candidates:
type: integer
title: Candidates
min_similarity:
type: number
title: Min Similarity
periods:
items:
$ref: '#/components/schemas/TopicTimelinePeriod'
type: array
title: Periods
search_time_ms:
anyOf:
- type: number
- type: 'null'
title: Search Time Ms
type: object
required:
- query
- step
- date_from
- date_to
- candidates
- min_similarity
- periods
title: TopicTimelineResult
description: Ответ хронологии темы.
SimilaritySearchResult:
properties:
items:
items:
type: object
type: array
title: Items
type: object
required:
- items
title: SimilaritySearchResult
description: Result of similarity search
example:
items:
- news:
id: 1
similarity_score: 0.95
title: Example news
SentimentEnum:
type: string
enum:
- positive
- neutral
- negative
title: SentimentEnum
description: Sentiment classification
TopicTimelineRequest:
properties:
query:
type: string
maxLength: 1000
minLength: 1
title: Query
description: Тема на естественном языке
date_from:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Date From
description: Начало периода (по умолчанию 1999-01-01)
date_to:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Date To
description: Конец периода (по умолчанию сейчас)
step:
anyOf:
- type: string
enum:
- year
- month
- type: 'null'
title: Step
description: Шаг периода; по умолчанию year при окне > 3 лет, иначе month
candidates:
type: integer
maximum: 2000.0
minimum: 100.0
title: Candidates
description: Сколько ближайших новостей распределять по периодам
default: 2000
per_period:
type: integer
maximum: 10.0
minimum: 1.0
title: Per Period
description: Сколько заголовков отдавать на период
default: 5
min_similarity:
type: number
maximum: 1.0
minimum: 0.0
title: Min Similarity
description: Порог косинусной похожести для заголовков
default: 0.5
telegram_id:
anyOf:
- type: integer
- type: 'null'
title: Telegram Id
description: Telegram user ID для логирования
lang:
type: string
enum:
- ru
- en
title: Lang
description: Язык заголовков и понятий в ответе (en — из *_en с fallback на русский)
default: ru
type: object
required:
- query
title: TopicTimelineRequest
description: 'Запрос хронологии темы: как менялось внимание к теме по периодам (годам или месяцам).'
NewsEnriched:
properties:
id:
type: integer
title: Id
url:
type: string
title: Url
news_text:
type: string
title: News Text
news_date:
type: string
format: date-time
title: News Date
links:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Links
agency_name:
anyOf:
- type: string
- type: 'null'
title: Agency Name
media_type:
anyOf:
- type: string
- type: 'null'
title: Media Type
category:
anyOf:
- type: string
- type: 'null'
title: Category
category_title:
anyOf:
- type: string
- type: 'null'
title: Category Title
category_emoji:
anyOf:
- type: string
- type: 'null'
title: Category Emoji
title:
anyOf:
- type: string
- type: 'null'
title: Title
resume:
anyOf:
- type: string
- type: 'null'
title: Resume
key_notions:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Key Notions
sentiment:
anyOf:
- $ref: '#/components/schemas/SentimentEnum'
- type: 'null'
meta_lang_source:
anyOf:
- type: string
- type: 'null'
title: Meta Lang Source
type: object
required:
- id
- url
- news_text
- news_date
title: NewsEnriched
description: Complete enriched news (response model)
NewsFilter:
properties:
start_date:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Start Date
end_date:
anyOf:
- type: string
format: date-time
- type: 'null'
title: End Date
agency_ids:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Agency Ids
category_ids:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Category Ids
media_types:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Media Types
sentiments:
anyOf:
- items:
$ref: '#/components/schemas/SentimentEnum'
type: array
- type: 'null'
title: Sentiments
limit:
type: integer
maximum: 1000.0
title: Limit
default: 100
offset:
type: integer
minimum: 0.0
title: Offset
default: 0
lang:
type: string
enum:
- ru
- en
title: Lang
description: 'Язык метаданных: en → title/resume/key_notions из *_en с fallback на русский'
default: ru
type: object
title: NewsFilter
description: Model for filtering news
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
TopicTimelineItem:
properties:
id:
type: integer
title: Id
news_date:
type: string
format: date-time
title: News Date
title:
anyOf:
- type: string
- type: 'null'
title: Title
url:
type: string
title: Url
agency_name:
anyOf:
- type: string
- type: 'null'
title: Agency Name
similarity:
type: number
title: Similarity
type: object
required:
- id
- news_date
- url
- similarity
title: TopicTimelineItem
description: Заголовок периода с точной похожестью.
SimilaritySearch:
properties:
query_embedding:
items:
type: number
type: array
maxItems: 768
minItems: 768
title: Query Embedding
limit:
type: integer
maximum: 100.0
title: Limit
default: 10
similarity_threshold:
type: number
maximum: 1.0
minimum: 0.0
title: Similarity Threshold
default: 0.7
filters:
anyOf:
- $ref: '#/components/schemas/NewsFilter'
- type: 'null'
type: object
required:
- query_embedding
title: SimilaritySearch
description: Model for similarity search
VectorSearchResult:
properties:
news:
items:
$ref: '#/components/schemas/NewsEnriched'
type: array
title: News
total_count:
type: integer
title: Total Count
query_embedding_generated:
type: boolean
title: Query Embedding Generated
default: true
search_time_ms:
anyOf:
- type: number
- type: 'null'
title: Search Time Ms
type: object
required:
- news
- total_count
title: VectorSearchResult
description: Response model for vector search
NewsSearchResult:
properties:
total_count:
type: integer
title: Total Count
items:
items:
$ref: '#/components/schemas/NewsEnriched'
type: array
title: Items
has_more:
type: boolean
title: Has More
type: object
required:
- total_count
- items
- has_more
title: NewsSearchResult
description: Result of news search
TopicTimelinePeriod:
properties:
period:
type: string
title: Period
description: '''2016'' или ''2016-03'''
candidates:
type: integer
title: Candidates
description: Сколько из K ближайших новостей попало в период
corpus_total:
anyOf:
- type: integer
- type: 'null'
title: Corpus Total
description: Всего новостей в базе за период (оценка)
per_10k:
anyOf:
- type: number
- type: 'null'
title: Per 10K
description: candidates на 10 000 новостей базы за период
best_similarity:
anyOf:
- type: number
- type: 'null'
title: Best Similarity
description: Лучшая точная похожесть в периоде
top:
items:
$ref: '#/components/schemas/TopicTimelineItem'
type: array
title: Top
default: []
notions:
items:
type: string
type: array
title: Notions
default: []
type: object
required:
- period
- candidates
title: TopicTimelinePeriod
description: Один период хронологии.
VectorSearchRequest:
properties:
query:
type: string
maxLength: 1000
minLength: 1
title: Query
description: Search query text
date_from:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Date From
description: Start date filter
date_to:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Date To
description: End date filter
limit:
type: integer
maximum: 100.0
title: Limit
description: Maximum number of results
default: 50
telegram_id:
anyOf:
- type: integer
- type: 'null'
title: Telegram Id
description: Telegram user ID for logging
lang:
type: string
enum:
- ru
- en
title: Lang
description: 'Язык метаданных в ответе: ru (по умолчанию) или en (title/resume/key_notions из *_en, fallback на русский)'
default: ru
type: object
required:
- query
title: VectorSearchRequest
description: Request model for vector search with text query
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
securitySchemes:
APIKeyHeader:
type: apiKey
in: header
name: X-API-Key