Sign in
POST

/v1/search/vector

v1

Vector similarity search


Search for articles and/or stories by embedding vector similarity. Submit your own 1536-dimensional embedding and receive the nearest matches from the news corpus. Requires Pro tier or higher. Uses cosine distance for similarity scoring.


Request Examples

bash
curl "https://api.newsrank.ai/v1/search/vector" \
  -H "Authorization: Bearer nrf_your_api_key"

Response

json
{
  "ok": true,
  "articles": [
    {
      "similarity": 0.94,
      "distance": 0.06,
      "url_hash": "string",
      "title": "string",
      "url": "string",
      "source_name": "string",
      "category": "string",
      "published_at": 0
    }
  ],
  "stories": [
    {
      "similarity": 0.91,
      "distance": 0.09,
      "cluster_id": 0,
      "headline": "string",
      "summary": "string",
      "article_count": 0,
      "first_seen": 0,
      "last_updated": 0
    }
  ]
}

Try it

Server

Using sandbox demo key (5 req/min) — no signup required

Authentication
Demo key (sandbox)
Endpoint
POST /v1/search/vector