Sambodh IAS Newspulse API
The newspulse API from Sambodh IAS — 15 operation(s) for newspulse.
The newspulse API from Sambodh IAS — 15 operation(s) for newspulse.
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/sambodh-ias-in:sambodh-ias-in-newspulse-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: SambodhIAS v2 Newspulse API
version: 2.0.0
tags:
- name: newspulse
paths:
/api/newspulse/generate:
post:
tags:
- newspulse
summary: Generate Cards
description: Trigger the NewsPulse pipeline (admin only).
operationId: generate_cards_api_newspulse_generate_post
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/cron-trigger:
post:
tags:
- newspulse
summary: Cron Trigger
description: 'Trigger NewsPulse pipeline via CRON_SECRET header (for the Render cron job).
Kicks the pipeline off as a FastAPI BackgroundTask and returns 202
Accepted immediately. Keeps the endpoint under 100ms regardless of
pipeline duration (which routinely exceeds 5 minutes after the
clustering stage was added). The cron job only needs the 202 and
verifies the outcome via /last-run; manual curl triggers no longer time out.
This runs the pipeline INSIDE a web instance. The cron job prefers a Render
one-off job (scripts/cron/run_pipeline.py, scripts/newspulse_job.py) and
uses this endpoint only when it has no Render API key: a web instance that
has served for a day has no 130 MB of headroom left in its 512 MiB, and the
OOM kill takes the instance''s live requests down with the run.'
operationId: cron_trigger_api_newspulse_cron_trigger_post
parameters:
- name: x-cron-secret
in: header
required: true
schema:
type: string
title: X-Cron-Secret
responses:
'202':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/last-run:
get:
tags:
- newspulse
summary: Last Pipeline Run
description: 'Return the most recent NewsPulse pipeline run for cron verification.
Cron-secret protected (same as /cron-trigger). The Render cron job
(scripts/cron/run_pipeline.py) polls this after triggering — since the
pipeline runs async, a 202 alone can''t confirm cards were produced. The job
fails (and Render alerts) if the latest run is ''failed'' or ''degraded'', or
if no run is recorded after the trigger.'
operationId: last_pipeline_run_api_newspulse_last_run_get
parameters:
- name: x-cron-secret
in: header
required: true
schema:
type: string
title: X-Cron-Secret
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/today:
get:
tags:
- newspulse
summary: Get Today Cards
description: Get today's published concept cards (IST calendar day).
operationId: get_today_cards_api_newspulse_today_get
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
- name: X-Lang
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Lang
- name: Accept-Language
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Accept-Language
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/cards/{card_id}/view:
post:
tags:
- newspulse
summary: Mark Card Viewed
description: 'Upsert a per-user ''viewed'' record for a NewsPulse card.
Frontend fires this on a 3-second debounced expand. P3 perf fix
(docs/perf-audit-2026-09-26/perf_db.md D8): a single INSERT ... ON
CONFLICT DO UPDATE replaces the old SELECT-then-UPDATE/INSERT pair, and
the update''s WHERE clause makes a re-post of the same card within 10
minutes with no bigger dwell_ms a true no-op — no row rewrite, no index
churn on a table that took 873k unconditional UPDATEs in a week. Returns
the card''s fresh state so the caller can patch its cache in place instead
of invalidating + refetching /cards/states.'
operationId: mark_card_viewed_api_newspulse_cards__card_id__view_post
parameters:
- name: card_id
in: path
required: true
schema:
type: string
format: uuid
title: Card Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MarkViewedRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/cards/states:
get:
tags:
- newspulse
summary: Get Card States
description: 'Per-card state map for the current user, plus optional window progress.
Returns:
{
"states": { card_id: {read, tested, needs_revision, mastered} },
"progress": {window_label, total_cards, tested_cards, untouched_cards}
(only if window_mode given)
}'
operationId: get_card_states_api_newspulse_cards_states_get
parameters:
- name: window_mode
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: rolling_30 | calendar_month
title: Window Mode
description: rolling_30 | calendar_month
- name: window_value
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: YYYY-MM if calendar_month
title: Window Value
description: YYYY-MM if calendar_month
- name: card_ids
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Comma-separated card ids to restrict the state map to (P17 perf fix). Omitting it keeps the old behaviour — every view/coverage/reaction row the user has ever produced — for backward compatibility during rollout; clients should migrate to always passing the ids of the cards currently on screen.
title: Card Ids
description: Comma-separated card ids to restrict the state map to (P17 perf fix). Omitting it keeps the old behaviour — every view/coverage/reaction row the user has ever produced — for backward compatibility during rollout; clients should migrate to always passing the ids of the cards currently on screen.
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/cards/{card_id}/like:
put:
tags:
- newspulse
summary: Like Card
operationId: like_card_api_newspulse_cards__card_id__like_put
parameters:
- name: card_id
in: path
required: true
schema:
type: string
format: uuid
title: Card Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- newspulse
summary: Unlike Card
operationId: unlike_card_api_newspulse_cards__card_id__like_delete
parameters:
- name: card_id
in: path
required: true
schema:
type: string
format: uuid
title: Card Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/cards/{card_id}/bookmark:
put:
tags:
- newspulse
summary: Bookmark Card
operationId: bookmark_card_api_newspulse_cards__card_id__bookmark_put
parameters:
- name: card_id
in: path
required: true
schema:
type: string
format: uuid
title: Card Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- newspulse
summary: Unbookmark Card
operationId: unbookmark_card_api_newspulse_cards__card_id__bookmark_delete
parameters:
- name: card_id
in: path
required: true
schema:
type: string
format: uuid
title: Card Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/cards/{card_id}/share:
post:
tags:
- newspulse
summary: Share Card
description: 'Log a share event (fire-and-forget from the client).
Clients build the URL themselves from the card''s `share_path` (see
cardShareUrl in packages/shared) so the native share sheet opens inside
the tap''s user-gesture window — awaiting this call first would lose it on
Safari. Only published cards have a public page, so anything else 404s.'
operationId: share_card_api_newspulse_cards__card_id__share_post
parameters:
- name: card_id
in: path
required: true
schema:
type: string
format: uuid
title: Card Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ShareRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/cards/bookmarks:
get:
tags:
- newspulse
summary: List Bookmarks
description: 'The Saved tab: the user''s bookmarked cards, most recently saved first.
Goes through the same free-tier teaser as every other list, so bookmarking
a locked card never becomes a paywall bypass.'
operationId: list_bookmarks_api_newspulse_cards_bookmarks_get
parameters:
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
default: 1
title: Page
- name: limit
in: query
required: false
schema:
type: integer
maximum: 50
minimum: 1
default: 20
title: Limit
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
- name: X-Lang
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Lang
- name: Accept-Language
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Accept-Language
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/months:
get:
tags:
- newspulse
summary: List Card Months
description: 'Return calendar months with published-card counts (newest first), used
by the assessment ''pick a month'' dropdown.'
operationId: list_card_months_api_newspulse_months_get
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/stats/summary:
get:
tags:
- newspulse
summary: Get Stats
description: 'Pipeline stats: cards/questions generated today (IST day), LLM costs.'
operationId: get_stats_api_newspulse_stats_summary_get
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse:
get:
tags:
- newspulse
summary: List Cards
description: List concept cards with optional filters.
operationId: list_cards_api_newspulse_get
parameters:
- name: date
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: YYYY-MM-DD
title: Date
description: YYYY-MM-DD
- name: gs_paper
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Gs Paper
- name: category
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: news / editorial / all
title: Category
description: news / editorial / all
- name: status
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: draft/published/archived
title: Status
description: draft/published/archived
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
default: 1
title: Page
- name: limit
in: query
required: false
schema:
type: integer
maximum: 50
minimum: 1
default: 20
title: Limit
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
- name: X-Lang
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Lang
- name: Accept-Language
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Accept-Language
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/{card_id}:
get:
tags:
- newspulse
summary: Get Card
description: 'Get a single concept card with its linked questions.
This endpoint is the free-tier GATE: non-subscribers may open 30 distinct
cards (counted from the launch epoch). Serving an unviewed card to an
under-limit user records the view server-side; over the limit → 402.'
operationId: get_card_api_newspulse__card_id__get
parameters:
- name: card_id
in: path
required: true
schema:
type: string
format: uuid
title: Card Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
- name: X-Lang
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Lang
- name: Accept-Language
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Accept-Language
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
patch:
tags:
- newspulse
summary: Edit Card
description: Edit a concept card (admin only).
operationId: edit_card_api_newspulse__card_id__patch
parameters:
- name: card_id
in: path
required: true
schema:
type: string
format: uuid
title: Card Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EditCardRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/newspulse/{card_id}/publish:
post:
tags:
- newspulse
summary: Publish Card
description: Promote draft → published (admin only).
operationId: publish_card_api_newspulse__card_id__publish_post
parameters:
- name: card_id
in: path
required: true
schema:
type: string
format: uuid
title: Card Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ShareRequest:
properties:
channel:
type: string
enum:
- native
- whatsapp
- x
- telegram
- copy_link
title: Channel
default: native
type: object
title: ShareRequest
EditCardRequest:
properties:
headline:
anyOf:
- type: string
- type: 'null'
title: Headline
bullets:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Bullets
relevance_note:
anyOf:
- type: string
- type: 'null'
title: Relevance Note
syllabus_tags:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Syllabus Tags
gs_paper:
anyOf:
- type: string
- type: 'null'
title: Gs Paper
full_summary:
anyOf:
- type: string
- type: 'null'
title: Full Summary
type: object
title: EditCardRequest
MarkViewedRequest:
properties:
dwell_ms:
type: integer
title: Dwell Ms
default: 0
type: object
title: MarkViewedRequest
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
GenerateRequest:
properties:
max_articles:
type: integer
title: Max Articles
default: 15
sources:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Sources
target_date:
anyOf:
- type: string
- type: 'null'
title: Target Date
type: object
title: GenerateRequest