# PubChem Compound Lookup by Name (PUG REST)

> PubChem Compound Lookup by Name (PUG REST) is a paid API for AI agents from api.healthtravel-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Looks up a chemical compound by name in NIH PubChem and returns its CID, title, molecular formula, molecular weight, and IUPAC name for the best match.

## Facts

- Endpoint: GET https://api.healthtravel-api.workers.dev/api/health/pubchem-chemical-cid?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pubchem-compound-lookup-by-name-pug-rest-aa735436
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OCsagAJYpRoxTCDoKq2DM

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 pubchem-compound-lookup-by-name-pug-rest-aa735436
```

Example prompt: Can you look up the PubChem compound data for caffeine — I need its CID, molecular formula, molecular weight, and IUPAC name?

## When to prefer this

Use this endpoint when you need quick, structured chemical identity data (CID, formula, weight, IUPAC name) for a single named compound from the authoritative NIH PubChem database. Prefer it over general web search when you need machine-readable chemical metadata. Note it does not return safety, hazard, or toxicity data — use a different source for those.

## Known failure modes

- Compound name not found in PubChem — returns no match or empty result
- Ambiguous or misspelled compound name yields an unexpected best-match
- Input name outside allowed character set or length (2–100 chars) triggers validation error
- Network or upstream PubChem PUG REST API unavailability causes timeout or error response

## How this service works

NIH PubChem compound lookup by name (PUG REST): PubChem CID, title, molecular formula, molecular weight and IUPAC name for the best match. Safety and hazard data are not included. One compound per call.

## Output

Returns the best-matching PubChem compound record for the given name, including: PubChem CID (integer identifier), compound title, molecular formula (e.g. C8H10N4O2), molecular weight (numeric, in g/mol), and IUPAC name. Safety and hazard data are not included. One compound per call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "name"
     ],
     "properties": {
      "name": {
       "type": "string",
       "description": "Compound name, letters, digits, spaces, commas, hyphens and parentheses, 2 to 100 characters"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pubchem-compound-lookup-by-name-pug-rest-aa735436/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.healthtravel-api.workers.dev](https://www.zero.xyz/host/api.healthtravel-api.workers.dev/llms.txt)
