{
  "api": "The Last Economy Wire — Intelligence API",
  "version": "1",
  "base": "/api/v1",
  "documentation": "https://negativeresistance.com/embed",
  "connect": "https://negativeresistance.com/connect",
  "openapi": "/api/v1/openapi.json",
  "license": "Free for any use. Attribution appreciated.",
  "links": {
    "discovery": "https://negativeresistance.com/api/v1",
    "openapi": "https://negativeresistance.com/api/v1/openapi.json",
    "mcp": "https://negativeresistance.com/api/v1/mcp",
    "agentCard": "https://negativeresistance.com/.well-known/agent.json",
    "aiPlugin": "https://negativeresistance.com/.well-known/ai-plugin.json",
    "sdk": "https://negativeresistance.com/api/v1/sdk",
    "status": "https://negativeresistance.com/api/v1/status",
    "provenance": "https://negativeresistance.com/api/v1/sources",
    "contract": "https://negativeresistance.com/api/v1/contract",
    "documentation": "https://negativeresistance.com/embed",
    "connect": "https://negativeresistance.com/connect"
  },
  "contract": {
    "success": "{ \"data\": …, \"_meta\": … }",
    "failure": "{ \"error\": { \"code\": string, \"message\": string, \"hint\": string } }",
    "metaFields": [
      "api, version, schemaVersion — which contract you are reading",
      "correlationId, generatedAt — for support and reproducibility",
      "filters — the filters actually applied, after validation dropped anything malformed",
      "pagination — page, pageSize, totalItems, returned, hasMore, nextUrl",
      "provenance — registries consulted, dedupMethod, worldwide true/false",
      "freshness — per-registry lastSuccessAt, stale/degraded flags, evidence age",
      "links — discovery, openapi, mcp, agentCard, aiPlugin, sdk, status, provenance, contract"
    ],
    "honesty": [
      "A count is never worldwide when _meta.provenance.worldwide is false or _meta.degraded is true. State which registries produced it.",
      "Only PRIMARY registries are ingested — the body that is the authoritative system of record for the trials it publishes. Secondary aggregators that re-publish other registries' records (WHO ICTRP and similar meta-indexes) are excluded from the index, from every count and from deduplication, because they arrive with lag and normalisation loss. They may only ever be used as a separate cross-reference lookup.",
      "Registry facts and analytical inference are reported separately. Rankings and plausibility judgements are the caller's inference.",
      "Aggregates always carry per-registry attribution and the deduplication method used.",
      "Registry metadata only. No patient data, no clinical advice, no commercial enrichment.",
      "Auxiliary sources (literature indexes such as Europe PMC) are consulted by sidecar endpoints only. They never contribute a trial, a count or a deduplication decision. A registry identifier discovered in the literature with inIndex=false is a mention, not a record this API holds."
    ],
    "integrityCheck": "https://negativeresistance.com/api/v1/contract"
  },
  "interfaces": {
    "mcp": {
      "transport": "streamable-http",
      "url": "https://negativeresistance.com/api/v1/mcp",
      "tools": [
        "get_mind_signal",
        "get_hope_signal",
        "get_trends_signal",
        "get_batch_signals",
        "search_world_trials",
        "get_world_trial",
        "get_trial_related_research",
        "get_trial_coverage",
        "get_trial_landscape",
        "find_trial_registrations",
        "get_trial_stats",
        "get_registry_sources",
        "list_capabilities"
      ],
      "toolMap": [
        {
          "tool": "get_mind_signal",
          "endpoint": "/api/v1/mind"
        },
        {
          "tool": "get_hope_signal",
          "endpoint": "/api/v1/hope"
        },
        {
          "tool": "get_trends_signal",
          "endpoint": "/api/v1/trends"
        },
        {
          "tool": "get_batch_signals",
          "endpoint": "/api/v1/batch"
        },
        {
          "tool": "search_world_trials",
          "endpoint": "/api/v1/trials/search"
        },
        {
          "tool": "get_world_trial",
          "endpoint": "/api/v1/trials/{canonicalId}"
        },
        {
          "tool": "get_trial_related_research",
          "endpoint": "/api/v1/trials/{canonicalId}/related"
        },
        {
          "tool": "get_trial_coverage",
          "endpoint": "/api/v1/trials/coverage"
        },
        {
          "tool": "get_trial_landscape",
          "endpoint": "/api/v1/trials/landscape"
        },
        {
          "tool": "find_trial_registrations",
          "endpoint": "/api/v1/trials/registrations"
        },
        {
          "tool": "get_trial_stats",
          "endpoint": "/api/v1/trials/stats"
        },
        {
          "tool": "get_registry_sources",
          "endpoint": "/api/v1/sources"
        }
      ],
      "startHere": "list_capabilities"
    },
    "a2a": {
      "card": "https://negativeresistance.com/.well-known/agent.json",
      "skills": [
        "mind_signal",
        "hope_signal",
        "trends_signal",
        "world_trial_search",
        "world_trial_record",
        "trial_related_research",
        "world_trial_coverage",
        "world_trial_landscape",
        "world_trial_registrations",
        "world_trial_stats",
        "registry_provenance"
      ],
      "status": "discovery-only — no live A2A JSON-RPC message endpoint yet; use MCP or REST."
    },
    "sdk": {
      "url": "https://negativeresistance.com/api/v1/sdk",
      "language": "typescript",
      "methods": [
        "getMind",
        "getHope",
        "getTrends",
        "getBatch",
        "searchTrials",
        "getTrial",
        "getTrialRelatedResearch",
        "getTrialCoverage",
        "getTrialLandscape",
        "getTrialRegistrations",
        "getTrialStats",
        "getSources",
        "getStatus",
        "getUsage"
      ]
    }
  },
  "dataProvenance": {
    "registryCoverage": "https://negativeresistance.com/api/v1/sources",
    "platformHealth": "https://negativeresistance.com/api/v1/status",
    "note": "Call /api/v1/sources FIRST when your answer depends on worldwide scope. It reports every registry consulted, when each last synchronised successfully, whether any is degraded, and which fields that registry does not populate."
  },
  "workflows": [
    {
      "id": "disease-cure-landscape",
      "question": "Find every currently active human trial worldwide plausibly attempting a functional cure for a disease, separate the therapeutic modalities, and rank what looks most promising.",
      "steps": [
        {
          "endpoint": "sources",
          "call": "GET /api/v1/sources",
          "why": "Establish scope honesty first: which registries are covered, when each last synchronised, and whether any is degraded. This decides whether your answer may be called worldwide or must be called partial."
        },
        {
          "endpoint": "trials-coverage",
          "call": "GET /api/v1/trials/coverage?q=type+1+diabetes&status=active",
          "why": "Get the DISTINCT worldwide count before quoting any number, plus how many records are the same trial registered twice and how badly summing the registries would have inflated the total."
        },
        {
          "endpoint": "trials-landscape",
          "call": "GET /api/v1/trials/landscape?q=type+1+diabetes&status=active",
          "why": "Get the shape — phase mass, sponsor concentration, momentum, reporting gap — and read fieldCompleteness so you know which distributions are safe to quote."
        },
        {
          "endpoint": "trials-search",
          "call": "GET /api/v1/trials/search?q=type+1+diabetes&status=active&intervention=islet&pageSize=100",
          "why": "Pull the records for ONE modality. Repeat with intervention=stem+cell, gene+edit, encapsulation, xenotransplant, immune+reset — one search per modality is how you build a comparison instead of one undifferentiated list."
        },
        {
          "endpoint": "trials-search",
          "call": "GET /api/v1/trials/search?...&include=eligibilityText",
          "why": "Add the eligibility prose only for the shortlist, when you must reason about a requirement that lives in free text — for example whether chronic immunosuppression is required."
        },
        {
          "endpoint": "trials-detail",
          "call": "GET /api/v1/trials/{canonicalId}?includeRaw=true",
          "why": "For each shortlisted trial, verify the fields you are about to assert against the untouched registry payload and its checksum."
        },
        {
          "endpoint": "trials-registrations",
          "call": "GET /api/v1/trials/registrations?id=NCT07093359",
          "why": "Confirm you are not double-counting a study that appears under two identifiers."
        }
      ],
      "reporting": "Report registry FACTS (phase, status, sponsor, enrollment, countries, endpoints, dates, identifiers, URLs) separately from your own INFERENCE (which approach looks most promising, and why). Quote each trial's citation.text. Name the denominator and the registries behind every count, and label the answer partial if any registry was degraded or absent."
    },
    {
      "id": "count-honestly",
      "question": "How many trials exist worldwide for a condition?",
      "steps": [
        {
          "endpoint": "trials-coverage",
          "call": "GET /api/v1/trials/coverage?q=<condition>",
          "why": "Returns the distinct count, the cross-registry overlap and the inflation you would have introduced by adding registries together."
        },
        {
          "endpoint": "sources",
          "call": "GET /api/v1/sources",
          "why": "Qualify the number with each registry's last successful sync and degraded state."
        }
      ],
      "reporting": "Quote the distinct count with its registry attribution. Never sum per-registry totals."
    },
    {
      "id": "orient-on-platform",
      "question": "What can this platform tell me?",
      "steps": [
        {
          "endpoint": "batch",
          "call": "GET /api/v1/batch",
          "why": "All three signals in one rate-limit slot."
        },
        {
          "endpoint": "trials-stats",
          "call": "GET /api/v1/trials/stats",
          "why": "Corpus size, registry attribution and the curated topic ids for filtering."
        }
      ],
      "reporting": "The signals describe published attention and announced capital; the trial endpoints describe registry records. They are different kinds of evidence."
    },
    {
      "id": "verify-a-claim",
      "question": "Someone cited a trial at me — is the claim true?",
      "steps": [
        {
          "endpoint": "trials-registrations",
          "call": "GET /api/v1/trials/registrations?id=<their identifier>",
          "why": "Resolve their identifier to a canonical trial and see every registration of it."
        },
        {
          "endpoint": "trials-detail",
          "call": "GET /api/v1/trials/{canonicalId}?includeRaw=true",
          "why": "Read the untouched registry payload and its checksum, then compare field by field."
        }
      ],
      "reporting": "Quote citation.text and the verifyAt URL so the reader can check it themselves."
    },
    {
      "id": "follow-the-evidence",
      "question": "What has actually been published about this trial, and is there related work elsewhere?",
      "steps": [
        {
          "endpoint": "trials-search",
          "call": "GET /api/v1/trials/search?q=<condition>&resultsAvailable=true",
          "why": "Start from trials that declare results, so you are reading about studies that reported rather than studies that merely registered."
        },
        {
          "endpoint": "trials-related",
          "call": "GET /api/v1/trials/{canonicalId}/related",
          "why": "Registry-declared publications first (kind=results is the strongest evidence a trial reported), then the Europe PMC records mentioning its registration identifiers."
        },
        {
          "endpoint": "trials-related",
          "call": "GET /api/v1/trials/{canonicalId}/related?include=crossref",
          "why": "Surface OTHER registry identifiers co-cited with this trial in the literature — sibling and follow-on registrations in registries this index does not ingest. Check inIndex before you say anything about them."
        },
        {
          "endpoint": "trials-detail",
          "call": "GET /api/v1/trials/{canonicalId}?includeRaw=true",
          "why": "Verify any registry field you are about to assert against the untouched payload."
        }
      ],
      "reporting": "Separate the three layers explicitly. Registry-declared publications are the registry’s own statement. Europe PMC hits are identifier MENTIONS, which may be citations or secondary analyses rather than results reports. Cross-registry mentions with inIndex=false are literature discoveries only — this index holds no record for them, so never present them as trials it contains or fold them into any count."
    }
  ],
  "endpoints": [
    {
      "id": "mind",
      "path": "/api/v1/mind",
      "url": "https://negativeresistance.com/api/v1/mind",
      "methods": [
        "GET"
      ],
      "title": "MIND — the AI-economy signal",
      "summary": "A single trailing-window read on where capital, compute, and conscience are flowing: the four capitals (M·I·N·D), a sparkline, the conscience index, and the cure pulse.",
      "category": "signal",
      "params": [
        {
          "name": "days",
          "type": "integer 1–120",
          "description": "Length of the trailing analysis window (default 30)."
        },
        {
          "name": "disease",
          "type": "string",
          "description": "Optional keyword — narrows the capital breakdown to signals matching this topic."
        }
      ],
      "examples": [
        "/api/v1/mind?days=30",
        "/api/v1/mind?days=90&disease=diabetes"
      ],
      "agent": {
        "whenToUse": "The question is about money, compute, networks or data flowing through the AI economy — funding momentum, infrastructure build-out, concentration of attention.",
        "nextSteps": [
          "trends",
          "batch"
        ],
        "notes": [
          "Derived from the platform's own curated signal feed, not a market data vendor. It measures published attention and announced capital, not settled transactions."
        ]
      },
      "mcpTool": "get_mind_signal",
      "sdkMethod": "getMind",
      "a2aSkill": "mind_signal",
      "schemaVersion": "1"
    },
    {
      "id": "hope",
      "path": "/api/v1/hope",
      "url": "https://negativeresistance.com/api/v1/hope",
      "methods": [
        "GET"
      ],
      "title": "Hope — the cure signal",
      "summary": "Global active-trial counts, a per-disease breakdown, the latest curated cure research (paginated), and platform stats. Also carries a `world` block summarising the multi-registry trial index.",
      "category": "signal",
      "sections": [
        "trials",
        "research",
        "stats"
      ],
      "params": [
        {
          "name": "include",
          "type": "csv of sections",
          "description": "trials, research, stats (default all)."
        },
        {
          "name": "disease",
          "type": "string",
          "description": "Filter research articles by disease name."
        },
        {
          "name": "limit",
          "type": "integer 1–50",
          "description": "Max research articles (default 5)."
        },
        {
          "name": "cursor",
          "type": "opaque token",
          "description": "Forward pagination cursor from _meta."
        },
        {
          "name": "offset",
          "type": "integer",
          "description": "Zero-based offset. Ignored when `cursor` is supplied."
        }
      ],
      "examples": [
        "/api/v1/hope",
        "/api/v1/hope?include=research&disease=diabetes&limit=10"
      ],
      "agent": {
        "whenToUse": "You want the headline state of cure progress — how much active trial activity exists, per disease, plus the latest curated research reading.",
        "nextSteps": [
          "trials-search",
          "trials-landscape"
        ],
        "notes": [
          "The `trials` block is a US ClinicalTrials.gov census kept separately from the multi-registry world index. Do NOT add the two together. For worldwide, deduplicated trial evidence use /api/v1/trials/*."
        ]
      },
      "mcpTool": "get_hope_signal",
      "sdkMethod": "getHope",
      "a2aSkill": "hope_signal",
      "schemaVersion": "1"
    },
    {
      "id": "trends",
      "path": "/api/v1/trends",
      "url": "https://negativeresistance.com/api/v1/trends",
      "methods": [
        "GET"
      ],
      "title": "Trends — the feed + capital lens",
      "summary": "The live shape of the Wire (volume, 7-day momentum, where attention concentrates) plus the 2026 crypto TGE list read through the Cure Protocol distribution lens.",
      "category": "signal",
      "sections": [
        "signal",
        "crypto"
      ],
      "params": [
        {
          "name": "include",
          "type": "csv of sections",
          "description": "signal, crypto (default all)."
        },
        {
          "name": "series",
          "type": "boolean",
          "description": "Set false to drop the daily time series."
        },
        {
          "name": "disease",
          "type": "string",
          "description": "Optional keyword — narrows the signal section to matching stories."
        }
      ],
      "examples": [
        "/api/v1/trends",
        "/api/v1/trends?include=crypto",
        "/api/v1/trends?series=false"
      ],
      "agent": {
        "whenToUse": "You need attention dynamics — what is accelerating or decelerating in coverage — or the crypto capital-distribution reading.",
        "nextSteps": [
          "mind",
          "batch"
        ]
      },
      "mcpTool": "get_trends_signal",
      "sdkMethod": "getTrends",
      "a2aSkill": "trends_signal",
      "schemaVersion": "1"
    },
    {
      "id": "batch",
      "path": "/api/v1/batch",
      "url": "https://negativeresistance.com/api/v1/batch",
      "methods": [
        "GET"
      ],
      "title": "Batch — every signal in one round-trip",
      "summary": "Fetch mind, hope, and trends together in a single request. Each signal is returned as its own sub-envelope so a partial upstream failure never fails the whole call.",
      "category": "compose",
      "params": [
        {
          "name": "include",
          "type": "csv of signals",
          "description": "mind, hope, trends (default all)."
        },
        {
          "name": "days",
          "type": "integer 1–120",
          "description": "Forwarded to the mind signal."
        },
        {
          "name": "series",
          "type": "boolean",
          "description": "Forwarded to the trends signal."
        },
        {
          "name": "disease",
          "type": "string",
          "description": "Forwarded to every composed signal to narrow results."
        }
      ],
      "examples": [
        "/api/v1/batch",
        "/api/v1/batch?include=mind,trends&days=90"
      ],
      "agent": {
        "whenToUse": "You want a broad orientation on the platform in one call, or you are rate-limit sensitive — batch costs ONE rate-limit slot instead of three.",
        "nextSteps": [
          "trials-search"
        ],
        "notes": [
          "A signal that fails returns a 503 sub-envelope in place of its data; the surrounding call still succeeds. Check each sub-envelope before using it."
        ]
      },
      "mcpTool": "get_batch_signals",
      "sdkMethod": "getBatch",
      "a2aSkill": null,
      "schemaVersion": "1"
    },
    {
      "id": "trials-search",
      "path": "/api/v1/trials/search",
      "url": "https://negativeresistance.com/api/v1/trials/search",
      "methods": [
        "GET"
      ],
      "title": "World trials — search",
      "summary": "Search the deduplicated multi-registry trial store. Sources are primary registries only — ClinicalTrials.gov (US NIH) and ISRCTN (UK) — never secondary aggregators. A trial registered twice is returned once. Every result carries normalized fields, its source registries, source URLs and a quotable citation block.",
      "category": "trials",
      "params": [
        {
          "name": "q",
          "type": "string",
          "description": "Free-text query matched (AND across tokens) over title, conditions, interventions and sponsor. British/American spellings and simple plurals are treated as the same token.",
          "example": "type 1 diabetes islet"
        },
        {
          "name": "condition",
          "type": "string",
          "description": "EXACT condition term as recorded by a registry. Use `q` unless you already know the registry's exact string — an exact match on a guessed term returns zero rows."
        },
        {
          "name": "topic",
          "type": "string",
          "description": "Cure Protocol topic id — one of the 15 curated disease domains. List them via /api/v1/trials/stats.",
          "example": "endocrinology"
        },
        {
          "name": "registry",
          "type": "string",
          "enumValues": [
            "clinicaltrials_gov",
            "isrctn"
          ],
          "description": "Restrict to trials carrying a record from one primary registry. Omit for full-index (all-registry) scope."
        },
        {
          "name": "status",
          "type": "string",
          "description": "Normalized recruitment status, or the shorthand `active` for the recruiting + active + not_yet_recruiting group.",
          "enumValues": [
            "active",
            "recruiting",
            "not_yet_recruiting",
            "completed",
            "terminated",
            "withdrawn",
            "halted",
            "unknown"
          ],
          "example": "active"
        },
        {
          "name": "phase",
          "type": "csv",
          "description": "One or more trial phases, comma-separated. Matches if the trial carries ANY listed phase. Phase is recorded for only part of the corpus — see fieldCompleteness before treating a phase filter as exhaustive.",
          "example": "1,2"
        },
        {
          "name": "studyType",
          "type": "string",
          "enumValues": [
            "interventional",
            "observational",
            "expanded_access",
            "other"
          ],
          "description": "Normalized study type."
        },
        {
          "name": "intervention",
          "type": "string",
          "description": "Free-text match against intervention names and descriptions — the practical way to isolate a MODALITY (e.g. \"stem cell\", \"encapsulation\", \"gene edit\", \"xenotransplant\").",
          "example": "islet transplantation"
        },
        {
          "name": "sponsor",
          "type": "string",
          "description": "Free-text match against the sponsor name.",
          "example": "Vertex"
        },
        {
          "name": "country",
          "type": "string",
          "description": "Match a recruiting country or site country (case-insensitive). Derived from registry location records; not every record declares a location.",
          "example": "United States"
        },
        {
          "name": "minEnrollment",
          "type": "integer",
          "description": "Minimum normalized enrollment (actual where reported, otherwise target)."
        },
        {
          "name": "maxEnrollment",
          "type": "integer",
          "description": "Maximum normalized enrollment."
        },
        {
          "name": "resultsAvailable",
          "type": "boolean",
          "description": "Restrict to trials with (true) or without (false) results posted. See /api/v1/trials/landscape for how each registry's results flag is derived."
        },
        {
          "name": "crossRegistry",
          "type": "boolean",
          "description": "true = only trials registered in more than one registry; false = only single-registry trials."
        },
        {
          "name": "updatedSince",
          "type": "ISO date",
          "description": "Only trials whose registry record was last updated on or after this date.",
          "example": "2026-01-01"
        },
        {
          "name": "startedAfter",
          "type": "ISO date",
          "description": "Only trials with a study start date on or after this date."
        },
        {
          "name": "startedBefore",
          "type": "ISO date",
          "description": "Only trials with a study start date on or before this date."
        },
        {
          "name": "completionAfter",
          "type": "ISO date",
          "description": "Only trials with a completion date on or after this date."
        },
        {
          "name": "completionBefore",
          "type": "ISO date",
          "description": "Only trials with a completion date on or before this date."
        },
        {
          "name": "sort",
          "type": "string",
          "enumValues": [
            "lastUpdated",
            "startDate",
            "enrollment",
            "canonicalId"
          ],
          "description": "Result ordering (descending, except canonicalId). Default lastUpdated — newest registry activity first."
        },
        {
          "name": "include",
          "type": "csv",
          "description": "Extra evidence blocks: `eligibilityText` (full inclusion/exclusion prose, large), `raw` is NOT available here — use the detail endpoint for raw payloads.",
          "enumValues": [
            "eligibilityText"
          ]
        },
        {
          "name": "page",
          "type": "integer",
          "description": "Page number, 1-based. Default 1. _meta.pagination.hasMore and _meta.pagination.nextUrl tell you whether and how to continue."
        },
        {
          "name": "pageSize",
          "type": "integer 1–100",
          "description": "Results per page (default 50). `limit` is accepted as an alias."
        }
      ],
      "examples": [
        "/api/v1/trials/search?q=type+1+diabetes&status=active&pageSize=25",
        "/api/v1/trials/search?q=type+1+diabetes&intervention=islet&status=active",
        "/api/v1/trials/search?topic=oncology&phase=3&country=United+States&resultsAvailable=false"
      ],
      "agent": {
        "whenToUse": "You need actual trial RECORDS — a list of studies matching a clinical question, with provenance you can cite.",
        "nextSteps": [
          "trials-detail",
          "trials-coverage",
          "trials-landscape",
          "trials-registrations"
        ],
        "notes": [
          "Scope is worldwide by default. Passing `registry` narrows the answer to SINGLE-REGISTRY evidence — say so if you report it.",
          "Isolate a treatment MODALITY with `intervention`, not with `q` alone: q also matches title and sponsor text.",
          "Filters compose with AND. Every filter you add can silently exclude records where that field was never reported by the registry — check data.fieldCompleteness before calling a filtered count exhaustive.",
          "Paginate with page/pageSize and follow _meta.pagination.nextUrl until hasMore is false."
        ]
      },
      "mcpTool": "search_world_trials",
      "sdkMethod": "searchTrials",
      "a2aSkill": "world_trial_search",
      "schemaVersion": "1"
    },
    {
      "id": "trials-detail",
      "path": "/api/v1/trials/{canonicalId}",
      "url": "https://negativeresistance.com/api/v1/trials/{canonicalId}",
      "methods": [
        "GET"
      ],
      "title": "World trials — canonical record",
      "summary": "One canonical trial plus every source record behind it: registry, source id, source URL, retrieval timestamp, payload checksum and the raw registry payload.",
      "category": "trials",
      "pathParams": [
        {
          "name": "canonicalId",
          "type": "string",
          "in": "path",
          "required": true,
          "description": "Canonical trial id as returned by search — e.g. NCT07093359, ISRCTN13533177 or 2023-505575-69-01."
        }
      ],
      "params": [
        {
          "name": "includeRaw",
          "type": "boolean",
          "description": "Include the full raw registry payloads (alias: raw). Default false."
        }
      ],
      "examples": [
        "/api/v1/trials/NCT07093359",
        "/api/v1/trials/NCT07093359?includeRaw=true"
      ],
      "agent": {
        "whenToUse": "You have a canonicalId and need the complete record, or you need to inspect the untouched registry payload to verify a claim.",
        "nextSteps": [
          "trials-registrations",
          "sources"
        ],
        "notes": [
          "`includeRaw=true` returns the exact registry payload we stored, after contact-field redaction, with its SHA-256. That is the strongest evidence this platform can offer."
        ]
      },
      "mcpTool": "get_world_trial",
      "sdkMethod": "getTrial",
      "a2aSkill": "world_trial_record",
      "schemaVersion": "1"
    },
    {
      "id": "trials-related",
      "path": "/api/v1/trials/{canonicalId}/related",
      "url": "https://negativeresistance.com/api/v1/trials/{canonicalId}/related",
      "methods": [
        "GET"
      ],
      "title": "World trials — related research (literature sidecar)",
      "summary": "The published research attached to one trial: the publications the registry itself declares, the Europe PMC records whose indexed text mentions the trial’s registration identifiers, and the OTHER registry identifiers those publications mention — each flagged with whether we hold it. A read-only sidecar: nothing it returns enters the index, any count, or deduplication.",
      "category": "trials",
      "sections": [
        "declared",
        "literature",
        "crossref"
      ],
      "pathParams": [
        {
          "name": "canonicalId",
          "type": "string",
          "in": "path",
          "required": true,
          "description": "Canonical trial id, or any identifier the trial is known by — e.g. NCT04333823 or ISRCTN50189673."
        }
      ],
      "params": [
        {
          "name": "include",
          "type": "string",
          "description": "Comma-separated sections: declared, literature, crossref. Default all three. crossref is derived from literature."
        },
        {
          "name": "limit",
          "type": "integer (1-100)",
          "description": "Maximum literature hits per registration identifier searched. Default 25."
        }
      ],
      "examples": [
        "/api/v1/trials/NCT04333823/related",
        "/api/v1/trials/ISRCTN50189673/related?include=crossref&limit=100"
      ],
      "agent": {
        "whenToUse": "You have a trial in the index and need the evidence published around it — results papers, secondary analyses, protocol papers — or you want to discover sibling and follow-on registrations recorded in other registries through the literature.",
        "nextSteps": [
          "trials-detail",
          "trials-registrations",
          "sources"
        ],
        "notes": [
          "This is a SIDECAR. Nothing here is part of the trial index or of any count. An identifier surfaced under crossRegistryMentions with inIndex=false is a literature mention only — we hold no record for it, so do not describe it as a trial in this index.",
          "Literature linkage is an identifier MENTION in Europe PMC indexed text or accession lists. It can be a citation, a secondary analysis or a passing reference — it is not by itself proof that the publication reports this trial’s results. Use registryDeclared items with kind=results for that.",
          "registryDeclared needs no network and is always present. If Europe PMC is unreachable the response stays 200 with _meta.degraded=true and an empty literature section — never silently zero."
        ]
      },
      "mcpTool": "get_trial_related_research",
      "sdkMethod": "getTrialRelatedResearch",
      "a2aSkill": "trial_related_research",
      "schemaVersion": "1"
    },
    {
      "id": "trials-coverage",
      "path": "/api/v1/trials/coverage",
      "url": "https://negativeresistance.com/api/v1/trials/coverage",
      "methods": [
        "GET"
      ],
      "title": "World trials — cross-registry coverage and duplicate detection",
      "summary": "How many DISTINCT trials exist for a condition across every registry in the index, how many are the same trial registered more than once, which trials are exclusive to each registry, and the count inflation you would suffer by querying each registry separately and adding the results.",
      "category": "trials",
      "params": [
        {
          "name": "q",
          "type": "string",
          "description": "Free-text query matched (AND across tokens) over title, conditions, interventions and sponsor. British/American spellings and simple plurals are treated as the same token.",
          "example": "type 1 diabetes islet"
        },
        {
          "name": "condition",
          "type": "string",
          "description": "EXACT condition term as recorded by a registry. Use `q` unless you already know the registry's exact string — an exact match on a guessed term returns zero rows."
        },
        {
          "name": "topic",
          "type": "string",
          "description": "Cure Protocol topic id — one of the 15 curated disease domains. List them via /api/v1/trials/stats.",
          "example": "endocrinology"
        },
        {
          "name": "registry",
          "type": "string",
          "enumValues": [
            "clinicaltrials_gov",
            "isrctn"
          ],
          "description": "Restrict to trials carrying a record from one primary registry. Omit for full-index (all-registry) scope."
        },
        {
          "name": "status",
          "type": "string",
          "description": "Normalized recruitment status, or the shorthand `active` for the recruiting + active + not_yet_recruiting group.",
          "enumValues": [
            "active",
            "recruiting",
            "not_yet_recruiting",
            "completed",
            "terminated",
            "withdrawn",
            "halted",
            "unknown"
          ],
          "example": "active"
        },
        {
          "name": "phase",
          "type": "csv",
          "description": "One or more trial phases, comma-separated. Matches if the trial carries ANY listed phase. Phase is recorded for only part of the corpus — see fieldCompleteness before treating a phase filter as exhaustive.",
          "example": "1,2"
        },
        {
          "name": "studyType",
          "type": "string",
          "enumValues": [
            "interventional",
            "observational",
            "expanded_access",
            "other"
          ],
          "description": "Normalized study type."
        },
        {
          "name": "intervention",
          "type": "string",
          "description": "Free-text match against intervention names and descriptions — the practical way to isolate a MODALITY (e.g. \"stem cell\", \"encapsulation\", \"gene edit\", \"xenotransplant\").",
          "example": "islet transplantation"
        },
        {
          "name": "sponsor",
          "type": "string",
          "description": "Free-text match against the sponsor name.",
          "example": "Vertex"
        },
        {
          "name": "country",
          "type": "string",
          "description": "Match a recruiting country or site country (case-insensitive). Derived from registry location records; not every record declares a location.",
          "example": "United States"
        },
        {
          "name": "minEnrollment",
          "type": "integer",
          "description": "Minimum normalized enrollment (actual where reported, otherwise target)."
        },
        {
          "name": "maxEnrollment",
          "type": "integer",
          "description": "Maximum normalized enrollment."
        },
        {
          "name": "resultsAvailable",
          "type": "boolean",
          "description": "Restrict to trials with (true) or without (false) results posted. See /api/v1/trials/landscape for how each registry's results flag is derived."
        },
        {
          "name": "crossRegistry",
          "type": "boolean",
          "description": "true = only trials registered in more than one registry; false = only single-registry trials."
        },
        {
          "name": "updatedSince",
          "type": "ISO date",
          "description": "Only trials whose registry record was last updated on or after this date.",
          "example": "2026-01-01"
        },
        {
          "name": "startedAfter",
          "type": "ISO date",
          "description": "Only trials with a study start date on or after this date."
        },
        {
          "name": "startedBefore",
          "type": "ISO date",
          "description": "Only trials with a study start date on or before this date."
        },
        {
          "name": "completionAfter",
          "type": "ISO date",
          "description": "Only trials with a completion date on or after this date."
        },
        {
          "name": "completionBefore",
          "type": "ISO date",
          "description": "Only trials with a completion date on or before this date."
        }
      ],
      "examples": [
        "/api/v1/trials/coverage?q=type+1+diabetes",
        "/api/v1/trials/coverage?topic=oncology&status=active"
      ],
      "agent": {
        "whenToUse": "Before you state a worldwide count. This is the endpoint that tells you whether a number is a true distinct count or an inflated sum.",
        "nextSteps": [
          "trials-search",
          "trials-landscape"
        ],
        "notes": [
          "`inflation` is the error you would have made by querying each registry separately and adding. Quote the distinct count, not the sum."
        ]
      },
      "mcpTool": "get_trial_coverage",
      "sdkMethod": "getTrialCoverage",
      "a2aSkill": "world_trial_coverage",
      "schemaVersion": "1"
    },
    {
      "id": "trials-landscape",
      "path": "/api/v1/trials/landscape",
      "url": "https://negativeresistance.com/api/v1/trials/landscape",
      "methods": [
        "GET"
      ],
      "title": "World trials — landscape structure and change over time",
      "summary": "The derived shape of research on a condition: phase, status and study-type mix, sponsor concentration, enrollment scale, the completed-but-unreported results gap, momentum over 30/90/365 days, and a real diff against a stored earlier snapshot. Reports per-registry field completeness so a distribution built from one registry is never mistaken for a world-scale fact.",
      "category": "trials",
      "params": [
        {
          "name": "q",
          "type": "string",
          "description": "Free-text query matched (AND across tokens) over title, conditions, interventions and sponsor. British/American spellings and simple plurals are treated as the same token.",
          "example": "type 1 diabetes islet"
        },
        {
          "name": "condition",
          "type": "string",
          "description": "EXACT condition term as recorded by a registry. Use `q` unless you already know the registry's exact string — an exact match on a guessed term returns zero rows."
        },
        {
          "name": "topic",
          "type": "string",
          "description": "Cure Protocol topic id — one of the 15 curated disease domains. List them via /api/v1/trials/stats.",
          "example": "endocrinology"
        },
        {
          "name": "registry",
          "type": "string",
          "enumValues": [
            "clinicaltrials_gov",
            "isrctn"
          ],
          "description": "Restrict to trials carrying a record from one primary registry. Omit for full-index (all-registry) scope."
        },
        {
          "name": "status",
          "type": "string",
          "description": "Normalized recruitment status, or the shorthand `active` for the recruiting + active + not_yet_recruiting group.",
          "enumValues": [
            "active",
            "recruiting",
            "not_yet_recruiting",
            "completed",
            "terminated",
            "withdrawn",
            "halted",
            "unknown"
          ],
          "example": "active"
        },
        {
          "name": "phase",
          "type": "csv",
          "description": "One or more trial phases, comma-separated. Matches if the trial carries ANY listed phase. Phase is recorded for only part of the corpus — see fieldCompleteness before treating a phase filter as exhaustive.",
          "example": "1,2"
        },
        {
          "name": "studyType",
          "type": "string",
          "enumValues": [
            "interventional",
            "observational",
            "expanded_access",
            "other"
          ],
          "description": "Normalized study type."
        },
        {
          "name": "intervention",
          "type": "string",
          "description": "Free-text match against intervention names and descriptions — the practical way to isolate a MODALITY (e.g. \"stem cell\", \"encapsulation\", \"gene edit\", \"xenotransplant\").",
          "example": "islet transplantation"
        },
        {
          "name": "sponsor",
          "type": "string",
          "description": "Free-text match against the sponsor name.",
          "example": "Vertex"
        },
        {
          "name": "country",
          "type": "string",
          "description": "Match a recruiting country or site country (case-insensitive). Derived from registry location records; not every record declares a location.",
          "example": "United States"
        },
        {
          "name": "minEnrollment",
          "type": "integer",
          "description": "Minimum normalized enrollment (actual where reported, otherwise target)."
        },
        {
          "name": "maxEnrollment",
          "type": "integer",
          "description": "Maximum normalized enrollment."
        },
        {
          "name": "resultsAvailable",
          "type": "boolean",
          "description": "Restrict to trials with (true) or without (false) results posted. See /api/v1/trials/landscape for how each registry's results flag is derived."
        },
        {
          "name": "crossRegistry",
          "type": "boolean",
          "description": "true = only trials registered in more than one registry; false = only single-registry trials."
        },
        {
          "name": "updatedSince",
          "type": "ISO date",
          "description": "Only trials whose registry record was last updated on or after this date.",
          "example": "2026-01-01"
        },
        {
          "name": "startedAfter",
          "type": "ISO date",
          "description": "Only trials with a study start date on or after this date."
        },
        {
          "name": "startedBefore",
          "type": "ISO date",
          "description": "Only trials with a study start date on or before this date."
        },
        {
          "name": "completionAfter",
          "type": "ISO date",
          "description": "Only trials with a completion date on or after this date."
        },
        {
          "name": "completionBefore",
          "type": "ISO date",
          "description": "Only trials with a completion date on or before this date."
        }
      ],
      "examples": [
        "/api/v1/trials/landscape?q=type+1+diabetes",
        "/api/v1/trials/landscape?topic=neurology&status=active"
      ],
      "agent": {
        "whenToUse": "You need the SHAPE of a field rather than its members — where the phase mass sits, who sponsors it, whether it is accelerating, how much of it went unreported.",
        "nextSteps": [
          "trials-search",
          "trials-coverage"
        ],
        "notes": [
          "`fieldCompleteness` is not decoration. If phase is recorded for 25% of a registry's records, a phase distribution describes that 25% — say so.",
          "`evidenceGap` reports completed-but-unreported trials per registry and refuses to publish a combined figure when the registries' results flags are not comparable.",
          "`changeSince` is a real diff against a stored earlier snapshot, not a recomputation."
        ]
      },
      "mcpTool": "get_trial_landscape",
      "sdkMethod": "getTrialLandscape",
      "a2aSkill": "world_trial_landscape",
      "schemaVersion": "1"
    },
    {
      "id": "trials-registrations",
      "path": "/api/v1/trials/registrations",
      "url": "https://negativeresistance.com/api/v1/trials/registrations",
      "methods": [
        "GET"
      ],
      "title": "World trials — where else is this trial registered",
      "summary": "Given any registry identifier, every registry in which that same real-world trial is registered, the exact identifier evidence linking them, and which registries it is absent from.",
      "category": "trials",
      "params": [
        {
          "name": "id",
          "type": "string",
          "required": true,
          "description": "Any known identifier, e.g. NCT07093359 or ISRCTN13533177."
        }
      ],
      "examples": [
        "/api/v1/trials/registrations?id=NCT07093359",
        "/api/v1/trials/registrations?id=ISRCTN13533177"
      ],
      "agent": {
        "whenToUse": "You have one identifier from an outside source and need to know whether it is the same study as another identifier you are holding.",
        "nextSteps": [
          "trials-detail"
        ],
        "notes": [
          "Absence from a registry is reported as absence from OUR index of that registry, which is not proof the trial was never registered there."
        ]
      },
      "mcpTool": "find_trial_registrations",
      "sdkMethod": "getTrialRegistrations",
      "a2aSkill": "world_trial_registrations",
      "schemaVersion": "1"
    },
    {
      "id": "trials-stats",
      "path": "/api/v1/trials/stats",
      "url": "https://negativeresistance.com/api/v1/trials/stats",
      "methods": [
        "GET"
      ],
      "title": "World trials — counts with attribution",
      "summary": "Source-record count, deduplicated canonical trial count, active count, the curated topic list, and per-registry attribution. Counts are never summed across registries.",
      "category": "trials",
      "examples": [
        "/api/v1/trials/stats"
      ],
      "agent": {
        "whenToUse": "First call when orienting on the trial corpus: how big it is, which registries contribute, and what topic ids exist for filtering.",
        "nextSteps": [
          "trials-search",
          "sources"
        ]
      },
      "mcpTool": "get_trial_stats",
      "sdkMethod": "getTrialStats",
      "a2aSkill": "world_trial_stats",
      "schemaVersion": "1"
    },
    {
      "id": "sources",
      "path": "/api/v1/sources",
      "url": "https://negativeresistance.com/api/v1/sources",
      "methods": [
        "GET"
      ],
      "title": "Registry sources — provenance, freshness and contract status",
      "summary": "Every upstream registry: base URL, API type, licence, last successful sync, record count, whether the source is currently degraded, and the live contract-test verdict.",
      "category": "meta",
      "examples": [
        "/api/v1/sources"
      ],
      "agent": {
        "whenToUse": "Before presenting trial evidence as current or worldwide. This endpoint tells you which registries are healthy, when each last synchronised, and which are degraded.",
        "nextSteps": [
          "trials-stats",
          "status"
        ],
        "notes": [
          "A registry with `degraded: true` or a stale `lastSuccessAt` means results are partial. Say so rather than implying full worldwide coverage."
        ]
      },
      "mcpTool": "get_registry_sources",
      "sdkMethod": "getSources",
      "a2aSkill": "registry_provenance",
      "schemaVersion": "1"
    },
    {
      "id": "status",
      "path": "/api/v1/status",
      "url": "https://negativeresistance.com/api/v1/status",
      "methods": [
        "GET"
      ],
      "title": "Status — service health",
      "summary": "Operational status, dependency health, the live endpoint catalog, and rolling SLO compliance per route.",
      "category": "meta",
      "examples": [
        "/api/v1/status"
      ],
      "agent": {
        "whenToUse": "A call failed and you need to know whether the platform is degraded before retrying or reporting an error.",
        "nextSteps": [
          "sources"
        ]
      },
      "mcpTool": null,
      "sdkMethod": "getStatus",
      "a2aSkill": null,
      "schemaVersion": "1"
    },
    {
      "id": "contract",
      "path": "/api/v1/contract",
      "url": "https://negativeresistance.com/api/v1/contract",
      "methods": [
        "GET"
      ],
      "title": "Contract integrity report",
      "summary": "Machine-readable proof that the discovery inventory, OpenAPI spec, MCP tool catalog, A2A skills, generated SDK and on-site documentation all describe the same capabilities. Returns 200 when they agree, 500 with the exact disagreements when they do not.",
      "category": "meta",
      "examples": [
        "/api/v1/contract"
      ],
      "agent": {
        "whenToUse": "You want to trust the documentation before building against it, or you are diagnosing a mismatch between the spec and real behaviour.",
        "notes": [
          "The same checks run at build time, so a drifting capability fails deployment rather than shipping."
        ]
      },
      "mcpTool": null,
      "sdkMethod": null,
      "a2aSkill": null,
      "schemaVersion": "1"
    },
    {
      "id": "openapi",
      "path": "/api/v1/openapi.json",
      "url": "https://negativeresistance.com/api/v1/openapi.json",
      "methods": [
        "GET"
      ],
      "title": "OpenAPI 3.1 spec",
      "summary": "Full machine-readable schema for every endpoint. Import into Postman, generate SDKs, or feed to a codegen tool.",
      "category": "meta",
      "examples": [
        "/api/v1/openapi.json"
      ],
      "agent": {
        "whenToUse": "You want typed access or want to generate your own client."
      },
      "mcpTool": null,
      "sdkMethod": null,
      "a2aSkill": null,
      "schemaVersion": null
    },
    {
      "id": "sdk",
      "path": "/api/v1/sdk",
      "url": "https://negativeresistance.com/api/v1/sdk",
      "methods": [
        "GET"
      ],
      "title": "TypeScript SDK",
      "summary": "Download a ready-to-use TypeScript client generated from this capability catalog. Zero dependencies, works in Node and the browser.",
      "category": "meta",
      "examples": [
        "/api/v1/sdk"
      ],
      "agent": {
        "whenToUse": "You are writing TypeScript and want method-per-capability access without hand-rolling fetch calls."
      },
      "mcpTool": null,
      "sdkMethod": null,
      "a2aSkill": null,
      "schemaVersion": null
    },
    {
      "id": "mcp",
      "path": "/api/v1/mcp",
      "url": "https://negativeresistance.com/api/v1/mcp",
      "methods": [
        "POST"
      ],
      "title": "MCP — Model Context Protocol server",
      "summary": "Streamable-HTTP MCP endpoint. Exposes every signal and the complete world-trials workflow as callable tools, plus a self-describing capability tool.",
      "category": "access",
      "agent": {
        "whenToUse": "You are an LLM client that speaks MCP. This is the lowest-friction way in — no key, read-only.",
        "notes": [
          "Call list_capabilities first to get the whole inventory, the workflows and the discovery links in one response."
        ]
      },
      "mcpTool": null,
      "sdkMethod": null,
      "a2aSkill": null,
      "schemaVersion": null
    },
    {
      "id": "keys",
      "path": "/api/v1/keys",
      "url": "https://negativeresistance.com/api/v1/keys",
      "methods": [
        "POST"
      ],
      "title": "API keys — self-serve",
      "summary": "Mint a personal API key to raise your rate-limit quota. The raw key is returned exactly once.",
      "category": "access",
      "agent": {
        "whenToUse": "You are being rate-limited as an anonymous caller and want a higher quota."
      },
      "mcpTool": null,
      "sdkMethod": null,
      "a2aSkill": null,
      "schemaVersion": null
    },
    {
      "id": "webhooks",
      "path": "/api/v1/webhooks",
      "url": "https://negativeresistance.com/api/v1/webhooks",
      "methods": [
        "POST",
        "GET",
        "DELETE"
      ],
      "title": "Webhooks — subscribe to changes",
      "summary": "Register a URL to receive an HMAC-signed POST when a signal changes. Delivery is retried up to three times with exponential backoff.",
      "category": "access",
      "params": [
        {
          "name": "events",
          "type": "csv",
          "description": "mind, hope, trends (default all) — on POST body."
        },
        {
          "name": "id",
          "type": "string",
          "description": "Subscription id — on GET (status) and DELETE."
        }
      ],
      "agent": {
        "whenToUse": "You want to be told when a signal changes instead of polling."
      },
      "mcpTool": null,
      "sdkMethod": null,
      "a2aSkill": null,
      "schemaVersion": "1"
    },
    {
      "id": "usage",
      "path": "/api/v1/keys/usage",
      "url": "https://negativeresistance.com/api/v1/keys/usage",
      "methods": [
        "GET",
        "PATCH"
      ],
      "title": "Key usage & settings",
      "summary": "GET returns per-key call volume, error rates, and latency over 7- and 30-day windows plus your current rate-limit state. PATCH lets you tune your key's rate limit (120–10 000) or rename it.",
      "category": "access",
      "params": [
        {
          "name": "window",
          "type": "string",
          "enumValues": [
            "7d",
            "30d"
          ],
          "description": "Reporting window for the usage breakdown (GET)."
        },
        {
          "name": "rateLimit",
          "type": "integer 120–10000",
          "in": "body",
          "description": "New requests-per-window limit (PATCH body)."
        },
        {
          "name": "label",
          "type": "string",
          "in": "body",
          "description": "Rename your key (PATCH body)."
        }
      ],
      "agent": {
        "whenToUse": "You need to know your own consumption or want to raise your own rate limit."
      },
      "mcpTool": null,
      "sdkMethod": "getUsage",
      "a2aSkill": null,
      "schemaVersion": "1"
    }
  ],
  "_meta": {
    "correlationId": "req_NsuB_0Z-Uzwt",
    "timestamp": "2026-09-11T11:17:55.626Z"
  }
}