IntelligenceService

SearchIntelHistory

SearchIntelHistory searches stored historical intelligence events by semantic similarity to a free-text query. Each cache miss costs one embeddings call, so the route has its own fail-closed rate policy. Premium-gated. PRO-gated. Requires entitlement tier >= 1.

post/api/intelligence/v1/search-intel-history

Request

  • Base URL: https://api.worldmonitor.app
  • URL: https://api.worldmonitor.app/api/intelligence/v1/search-intel-history
  • Auth: one of:
    • API key in header X-WorldMonitor-Key
    • API key in header X-Api-Key
    • HTTP bearer

Headers

Idempotency-Keystring

Optional client-generated idempotency key. Retrying a POST with the same key and an identical request body replays the original response (only the status, body, and Content-Type are reproduced) instead of re-executing; reusing the key with a different body is rejected with 422. For mutations this avoids duplicating the side effect, while for batch-read POSTs it replays a cached snapshot that can be up to 24 hours stale. Keys are scoped per authenticated caller (falling back to the source IP for unauthenticated endpoints) and retained for 24 hours.

Request body

querystring required

Free-text search query, e.g. "artillery strikes near Kharkiv". Embedded with the same model and normalization the seed writer used, so query and stored vectors are comparable.

domainstring

Restrict to one producing domain. Empty searches every domain.

countrystring

Restrict to one ISO 3166-1 alpha-2 country. Empty searches every country.

frominteger

Warning: Values > 2^53 may lose precision in JavaScript

tointeger

Warning: Values > 2^53 may lose precision in JavaScript

limitinteger

Maximum matches to return. Defaults to 20 server-side when omitted or <= 0; the handler caps it at 64, the SEARCH_MAX_LIMIT the Convex action clamps to (convex/intelHistory.ts).

Response

OK

querystring

Echo of the search query, so a caller multiplexing requests can pair a response back to its input.

partialboolean

True when a bounded candidate window may omit further matches.

upstreamUnavailableboolean

True when the embedding provider or the history store could not be reached. The gateway reads this flag out of the body and switches the response to Cache-Control: no-store, so a transient outage is never pinned as a false-empty result for the tier's full TTL.

Changes

No recorded changes to this operation across all 1 revision of this API.