REST API reference

Search and fetch articles over plain HTTPS — no MCP client required.

The REST API lives on each publisher's vanity host (the publisher is
resolved from the hostname). It's available when the publisher enables
public API access — or always, when you authenticate with a
buyer API key (Authorization: Bearer mk_…).

All responses are JSON with permissive CORS.

Search

GET https://oasy.<publisher-domain>/api/v1/articles/search?query=<q>&limit=<n>
ParamRequiredNotes
query (alias q)yes1–200 chars
limitno1–50, default 10

Search is hybrid: semantic (vector) and full-text candidates fused by
reciprocal-rank. The response tells you which legs contributed:

{
  "count": 2,
  "mode": "hybrid",          // "hybrid" | "fts" | "semantic" | "none"
  "results": [
    {
      "id": "cmr…",
      "url": "https://…",
      "title": "…",
      "author": "…",
      "publishedAt": "2026-05-01T09:00:00.000Z",
      "summary": "…",
      "tags": ["…"],
      "match": {               // semantic hits only — WHERE the query landed
        "chunkId": "cmr…#3",
        "section": "Methods",  // heading the matching passage falls under
        "snippet": "…240 chars of the matching passage…"
      }
    }
  ]
}

Articles whose license denies the rag right are excluded from search
results entirely.

Get one article

GET https://oasy.<publisher-domain>/api/v1/articles/<id-or-url>?last_user_prompt=<text>

last_user_prompt is required (1–8000 chars): the verbatim text of your
end user's most recent prompt. Publishers see it in their reader-intent
analytics — it's the audit contract for full-text access, same as the MCP
tool.

A successful response carries the body and the machine-readable license:

{
  "article": { "id": "…", "url": "…", "title": "…", "body": "…", "policy": "OBSERVE", … },
  "license": {
    "licensor": "Publisher Name",
    "rights": { "summarization": "granted", "display": "granted", "rag": "granted", "fine_tuning": "denied" },
    "pricingUsdCents": { "display": 50 },
    "termsUrl": "…/license/<publisherId>",
    "requestVia": "request_license (MCP tool) — publisher approval workflow"
  }
}

Response statuses you must handle

HTTPstatus fieldMeaning
200Full article served
200license_limitedLicense grants summarization only — you get the summary; cite the URL
200blockedPublisher blocks this article for AI agents
403license_deniedNo AI use licensed; request access via request_license
451territory_blockedPublisher's content rules exclude your region
400missing_last_user_promptAdd the required param
404rest_api_disabledPublisher hasn't opted into anonymous REST — authenticate with a buyer key
404article_not_found / unknown_publisher_hostCheck the id/URL and hostname

Billing on this surface

With a buyer key, reads of per-use-priced content that your licenses don't
already cover accrue metered charges (price snapshotted per read,
settled monthly, hard-capped) — see
Marketplace & buyer API.


Did this page help you?