{"uid":"cap_h9kM1z5u23qvlXvlhKkvV","slug":"2s-chem-compound-lookup-4a5c2745","name":"2s Chem Compound Lookup","description":"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.","url":"https://2s.io/api/chem/compound","method":"GET","headers":{},"bodySchema":{"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}}}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"name":"aspirin"}}},"response":{"data":{"ok":true,"meta":{"query":{"value":"aspirin","namespace":"name"}},"items":[{"cid":2244,"url":"https://pubchem.ncbi.nlm.nih.gov/compound/2244","inchi":"InChI=1S/C9H8O4/c1-6(10)13-8-5-3-2-4-7(8)9(11)12/h2-5H,1H3,(H,11,12)","xLogP":1.2,"charge":0,"smiles":"CC(=O)OC1=CC=CC=C1C(=O)O","source":{"license":"Public Domain (US Government Work, 17 USC §105)","provider":"NIH PubChem","licenseUrl":"https://pubchem.ncbi.nlm.nih.gov/docs/programmatic-access","attribution":"Data from PubChem, National Center for Biotechnology Information, US National Library of Medicine."},"inchiKey":"BSYNRYMUTXBXSQ-UHFFFAOYSA-N","synonyms":["aspirin","ACETYLSALICYLIC ACID","50-78-2","2-Acetoxybenzoic acid","2-(Acetyloxy)benzoic acid","Acylpyrin","O-Acetylsalicylic acid","o-Acetoxybenzoic acid","Acenterine","Acetophen"],"exactMass":180.04225873,"iupacName":"2-acetyloxybenzoic acid","preferredName":"aspirin","molecularWeight":180.16,"molecularFormula":"C9H8O4","connectivitySmiles":"CC(=O)OC1=CC=CC=C1C(=O)O"}],"total":1,"source":{"url":"https://pubchem.ncbi.nlm.nih.gov/docs/programmatic-access","license":"Public domain (US government work)","provider":"NIH PubChem"}},"meta":{"cost":{"usd":0.001,"tier":0},"caller":"x402","version":null,"endpoint":"chem.compound","settlement":{"txHash":"0x3249fb0478470bc593bf2bda7d7a3f287d619271a651b1f4b458b1a120743fa3","network":"eip155:8453","success":true}}}},"exampleRequest":{"name":"aspirin"},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_RM2n3P7jiSx2d9RlOb4hv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Looks up detailed chemical compound data from PubChem by CID, name, SMILES, or InChIKey","exampleAgentPrompt":"Can you look up the compound data for aspirin from PubChem — I want its molecular properties and structure info?","exampleUseCases":null,"resultDescription":"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).","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:52:49.363Z","isFirstParty":false}