# Foundry Clinical Search Set Change

> Foundry Clinical Search Set Change is a paid API for AI agents from foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-14).

Compares a set of baseline ClinicalTrials.gov NCT IDs against a fresh query for a condition, returning which trials were added, retained, or dropped from the current result page.

## Facts

- Endpoint: POST https://foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev/v2/official/clinical-search-set-change
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/foundry-clinical-search-set-change-91dccf50
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7llOHh8ezNLVmJGy_HN1E

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability foundry-clinical-search-set-change-91dccf50 -d '<json body>'
```

Example prompt: Check ClinicalTrials.gov for asthma right now with a limit of 10 results, and compare it against my baseline trial IDs NCT00110383, NCT00123456, and NCT00654321 — tell me which ones are new, which are still there, and which dropped off.

## When to prefer this

Use this endpoint when you need to detect changes between a known baseline set of clinical trial IDs and the current ClinicalTrials.gov search results for a specific condition. It is ideal for monitoring pipelines, compliance audits, or research workflows that need to know whether specific NCT IDs appeared, disappeared, or remained in recent search pages — with explicit source provenance and freshness metadata included. Prefer this over a plain clinical trial search when change-detection semantics (added/retained/not-observed classification) and baseline comparison are required.

## Known failure modes

- Invalid NCT ID format (must match ^NCT\d{8}$) returns a validation error
- Condition string too short (<2 chars) or too long (>120 chars) causes rejection
- Limit exceeding 20 or below 1 is rejected
- ClinicalTrials.gov upstream unavailability may delay or fail the request
- Payment of 0.015 USDC not provided results in HTTP 402
- Results are bounded and may not reflect the full trial universe for a condition

## How this service works

Pay-per-request evidence and data tools: CSV validation and reconciliation, DNS/email configuration evidence, and bounded official weather, earthquake, vehicle, company and study records. Exact USDC prices, explicit JSON contracts and source provenance. No mailbox, ownership, medical or safety guarantees.

## Output

Returns a JSON object with: the current query results (list of trials with NCT ID, title, phase, status, dates, and source URL), a classification of each baseline NCT ID as retained or not observed in the current page, a list of trial IDs newly added to the observed page, absence interpretation metadata, freshness/cache timestamps, and source provenance including license and attribution to ClinicalTrials.gov.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "type": "integer",
   "default": 20,
   "maximum": 20,
   "minimum": 1
  },
  "condition": {
   "type": "string",
   "maxLength": 120,
   "minLength": 2
  },
  "baseline_nct_ids": {
   "type": "array",
   "items": {
    "type": "string",
    "pattern": "^NCT\\d{8}$"
   },
   "maxItems": 20
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "route": "clinical-search-set-change",
  "result": {
   "current": {
    "query": {
     "limit": 5,
     "condition": "asthma"
    },
    "source": "ClinicalTrials.gov",
    "freshness": {
     "state": "CURRENT_RETRIEVAL",
     "retrievedAt": "2026-09-06T00:00:00Z",
     "cacheAgeSeconds": 0,
     "maximumCacheSeconds": 0,
     "recordAgeIsNotRetrievalAge": true
    },
    "sourceUrl": "https://clinicaltrials.gov",
    "observedAt": "2026-09-06T00:00:00Z",
    "provenance": {
     "license": "ClinicalTrials.gov terms; bounded factual study metadata only",
     "termsUrl": "https://clinicaltrials.gov/about-site/terms-conditions",
     "truncated": false,
     "attribution": "ClinicalTrials.gov, US National Library of Medicine",
     "limitations": [
      "Synthetic example only; identifiers and null values illustrate fields, not a live observation."
     ],
     "modifications": "Selected factual fields, normalized names and bounded result count; no source ownership claimed.",
     "upstreamCalls": 1,
     "documentationUrl": "https://clinicaltrials.gov/data-api/api"
    },
    "sourceUpdatedAt": null,
    "normalizedResult": [
     {
      "nctId": "NCT00110383",
      "title": null,
      "phases": [],
      "sourceUrl": "https://clinicaltrials.gov/study/NCT00110383",
      "startDate": null,
      "studyType": null,
      "overallStatus": null,
      "completionDate": null,
      "lastUpdatePostDate": null
     }
    ],
    "sourceProcessedAt": null,
    "rawSourceIdentifiers": []
   },
   "condition": "asthma",
   "limitations": [
    "Synthetic example only. A missing identifier is not proof a study was deleted."
   ],
   "observed_at": "2026-09-06T00:00:00Z",
   "absence_interpretation": "NOT_IN_CURRENT_QUERY",
   "added_to_observed_page": [],
   "not_observed_baseline_ids": [],
   "retained_in_observed_page": [
    "NCT00110383"
   ]
  },
  "observed_at": "2026-09-06T00:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/foundry-clinical-search-set-change-91dccf50/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev](https://www.zero.xyz/host/foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev/llms.txt)
