REST API

News search API reference

JSON over HTTPS. Send your API key as Authorization: Bearer nw_… to https://nearwire.dev/api/v1. Every endpoint below is also in the OpenAPI spec and the interactive reference, where you can try requests.

Find related stories using an article’s existing embedding

POST /api/v1/articles/{articleId}/related

Excludes the original article. Supports time, source and similarity filters. Costs one search request; no new embedding is generated.

parameterintypedescription
articleId *pathstring (uuid)
limitbodyintegerDefault: 10.
minScorebodynumberMinimum cosine similarity
sincebodystringOnly articles published on/after this time. Accepts an ISO 8601 timestamp or a humanized time such as "1h", "30m", "7d", "last 24h", "yesterday" or "oct 1" (calendar dates resolve in UTC).
untilbodystringOnly articles published on/before this time. Accepts an ISO 8601 timestamp or a humanized time such as "1h", "30m", "7d", "last 24h", "yesterday" or "oct 1" (calendar dates resolve in UTC).
feedIdsbodystring (uuid)[]

Semantic news search

POST /api/v1/search

Search news articles by meaning. Provide either a natural-language `query` (embedded server-side) or your own `embedding`.

parameterintypedescription
requiredTermsbodystring[]All case-insensitive literal substrings must occur in title or description
excludedPhrasesbodystring[]Reject articles containing any case-insensitive literal substring in title or description
modebody"semantic" | "keyword" | "hybrid"Default: "semantic".
querybodystringNatural-language search term
embeddingbodynumber[]Precomputed 1536-dim embedding (text-embedding-3-small)
limitbodyintegerDefault: 10.
minScorebodynumberMinimum cosine similarity
sincebodystringOnly articles published on/after this time. Accepts an ISO 8601 timestamp or a humanized time such as "1h", "30m", "7d", "last 24h", "yesterday" or "oct 1" (calendar dates resolve in UTC).
untilbodystringOnly articles published on/before this time. Accepts an ISO 8601 timestamp or a humanized time such as "1h", "30m", "7d", "last 24h", "yesterday" or "oct 1" (calendar dates resolve in UTC).
feedIdsbodystring (uuid)[]

Feeds

List indexed news sources

GET /api/v1/feeds

Account

Current month's usage

GET /api/v1/usage

Monitoring

Saved-query matches; 30-day inbox, paginated

GET /api/v1/monitoring/inbox

parameterintypedescription
queryIdquerystring (uuid)
unreadOnlyquery"true" | "false"
cursorquerystring (uuid)

Mark a match read or unread

PATCH /api/v1/monitoring/inbox/{id}

parameterintypedescription
id *pathstring (uuid)
read *bodyboolean

Saved queries, endpoints and monitoring usage

GET /api/v1/monitoring

Create an endpoint; returns signing secret once

POST /api/v1/webhook-endpoints

parameterintypedescription
name *bodystring
url *bodystring

Verify endpoint ownership

POST /api/v1/webhook-endpoints/{id}/verify

parameterintypedescription
id *pathstring (uuid)

Rotate signing secret; requires verification again

POST /api/v1/webhook-endpoints/{id}/rotate

parameterintypedescription
id *pathstring (uuid)

Delete endpoint and its queries/history

DELETE /api/v1/webhook-endpoints/{id}

parameterintypedescription
id *pathstring (uuid)

Monitor newly indexed matching articles

POST /api/v1/saved-queries

parameterintypedescription
requiredTermsbodystring[]All case-insensitive literal substrings must occur in title or description
excludedPhrasesbodystring[]Reject articles containing any case-insensitive literal substring in title or description
name *bodystring
query *bodystring
endpointIdbodystring (uuid) | nullDefault: null.
minScorebodynumberDefault: 0.35.
feedIdsbodystring (uuid)[]
intervalMinutesbodyobjectDefault: 1.

Replace query; starts a new forward-only version

PUT /api/v1/saved-queries/{id}

parameterintypedescription
id *pathstring (uuid)
requiredTermsbodystring[]All case-insensitive literal substrings must occur in title or description
excludedPhrasesbodystring[]Reject articles containing any case-insensitive literal substring in title or description
name *bodystring
query *bodystring
endpointIdbodystring (uuid) | nullDefault: null.
minScorebodynumberDefault: 0.35.
feedIdsbodystring (uuid)[]
intervalMinutesbodyobjectDefault: 1.

Pause or resume query

PATCH /api/v1/saved-queries/{id}

parameterintypedescription
id *pathstring (uuid)
active *bodyboolean

Delete query and its delivery history

DELETE /api/v1/saved-queries/{id}

parameterintypedescription
id *pathstring (uuid)

Last 50 events; paginate with cursor

GET /api/v1/webhook-events

parameterintypedescription
cursorquerystring (uuid)

Immutable payload and attempt history

GET /api/v1/webhook-events/{id}

parameterintypedescription
id *pathstring (uuid)

Replay the same event ID and payload

POST /api/v1/webhook-events/{id}/replay

parameterintypedescription
id *pathstring (uuid)

* required. Rate limits and quotas are on the pricing page. For AI agents, see the MCP server guide.