# MedAPI Compare Drugs

> MedAPI Compare Drugs is a paid API for AI agents from mamujamedapi.vercel.app, paid per call via x402, $0.35/call, status unknown (last checked 2026-09-14).

Compares two or more drugs side-by-side using FDA adverse event data, clinical trial data, and AI-powered analysis

## Facts

- Endpoint: POST https://mamujamedapi.vercel.app/api/compare-drugs
- Price: $0.35/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/medapi-compare-drugs-ebf91779
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RrPUCQha4lmImBPFnOWne

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 medapi-compare-drugs-ebf91779 -d '<json body>'
```

Example prompt: Can you compare metformin and glipizide for me — I want to see their side-by-side safety profiles, adverse events, and an AI analysis of the key differences between the two?

## When to prefer this

Use this endpoint when you need a structured, AI-interpreted side-by-side comparison of two or more drugs rather than a single drug lookup. It combines FDA adverse event data, clinical trial data, and PubMed literature into one synthesized analysis — prefer this over single-drug endpoints when the user's question is inherently comparative (e.g. 'which drug is safer', 'what are the differences between X and Y').

## Known failure modes

- Invalid or unrecognized drug names return empty or partial drug data
- Fewer than two drugs provided may result in a meaningless comparison
- LLM analysis may time out or return null for ambiguous drug names
- API returns success: false if the drugs array is missing or malformed
- Rate limiting or payment failure via x402 on Base blockchain could block the request

## How this service works

Drug data, adverse events, clinical trials, PubMed. AI-powered medical analysis. 17 endpoints. x402 on Base.

## Output

Returns a JSON object containing individual drug data for each submitted drug, a structured comparison object summarizing key differences, and an LLM-generated comparative analysis covering safety, adverse events, and clinical relevance. The 'success' boolean confirms whether the request was processed correctly.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "drugs"
 ],
 "properties": {
  "drugs": {
   "type": "array",
   "description": "drugs"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "success"
 ],
 "properties": {
  "data": {
   "type": "object",
   "properties": {
    "drugs": {
     "type": "array",
     "items": {
      "type": "object"
     }
    },
    "comparison": {
     "type": "object"
    }
   }
  },
  "success": {
   "type": "boolean"
  },
  "analysis": {
   "type": "object",
   "description": "LLM comparative analysis"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/medapi-compare-drugs-ebf91779/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mamujamedapi.vercel.app](https://www.zero.xyz/host/mamujamedapi.vercel.app/llms.txt)
