# 2s Chem Compound Lookup

> 2s Chem Compound Lookup is a paid API for AI agents from 2s.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Looks up detailed chemical compound data from PubChem by CID, name, SMILES, or InChIKey

## Facts

- Endpoint: GET https://2s.io/api/chem/compound
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-chem-compound-lookup-4a5c2745
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_h9kM1z5u23qvlXvlhKkvV

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 2s-chem-compound-lookup-4a5c2745
```

Example prompt: Can you look up the compound data for aspirin from PubChem — I want its molecular properties and structure info?

## When to prefer this

Use this endpoint when you need chemical compound data accessible without API keys or signup, especially in agentic workflows where pay-per-call micropayments (USDC via x402) are preferred over subscriptions. Ideal for agents that need to resolve a compound from any of four namespaces (name, CID, SMILES, InChIKey) in a single unified call backed by PubChem.

## Known failure modes

- No compound found for the given identifier — returns empty items array
- Multiple or ambiguous name matches — returns multiple items or partial results
- Invalid SMILES string format — query may fail or return no results
- InChIKey does not match expected pattern — schema validation error
- CID out of valid range (0 to 2,500,000,000) — rejected by schema
- Providing more than one identifier (e.g. both name and CID) — schema disallows it
- PubChem upstream unavailable — upstream fetch failure

## How this service works

The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.

## Output

A JSON object with an array of compound records from PubChem, including molecular properties, identifiers, and metadata. Also includes the query namespace/value used, total matching records, and source attribution (provider, URL, license).

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "name": "aspirin"
  }
 }
}
```

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "cid": {
       "type": "integer",
       "maximum": 2500000000,
       "minimum": 0,
       "description": "PubChem Compound ID (CID), e.g. 2244 for aspirin.",
       "exclusiveMinimum": true
      },
      "name": {
       "type": "string",
       "maxLength": 200,
       "minLength": 1,
       "description": "Common, trade, or IUPAC name, e.g. \"aspirin\" or \"ibuprofen\"."
      },
      "smiles": {
       "type": "string",
       "maxLength": 500,
       "minLength": 1,
       "description": "SMILES structural notation, e.g. \"CC(=O)Oc1ccccc1C(=O)O\"."
      },
      "inchikey": {
       "type": "string",
       "description": "InChIKey (27-char hashed identifier), e.g. \"BSYNRYMUTXBXSQ-UHFFFAOYSA-N\"."
      }
     },
     "description": "Provide exactly ONE of cid, name, smiles, or inchikey. Each identifies the same compound from a different namespace.",
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-chem-compound-lookup-4a5c2745/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
