{"openapi":"3.1.0","info":{"title":"2s — the (most) everything API","version":"1","summary":"The (most) everything API.","description":"The (most) everything API for AI agents: 575+ pay-per-call endpoints on one origin. More live, ground-truth data than any other x402 service — public records, finance & SEC filings, crypto & web3, security & CVEs, legal, medical, weather, geocoding, and B2B/EDI. A full AI gateway: chat, image, and multi-model consensus across every major model, priced per request in the 402 before you pay. And agent infrastructure with no account: wallet-scoped storage (kv/docs/vectors/files), locks, queues, scheduled callbacks, pub/sub, and watchers that push signed webhooks when the world changes. Pay per call in USDC on Base or Solana via x402 — no API keys, no signup, no subscription. The first x402 API with upto billing: on AI endpoints, authorize the quoted max and settle only your actual usage. Try before you buy: add ?trial=1 (or header X-2s-Trial: 1) to any endpoint for one free real call per endpoint per hour — no wallet needed. New endpoints land constantly.","contact":{"name":"2s","url":"https://2s.io","email":"alley@2s.io"},"x-logo":{"url":"https://2s.io/icon-512.png","altText":"2s"},"x-guidance":"Pay-per-call REST API for AI agents — hundreds of endpoints returning ground-truth data (US public records, company & legal identifiers, finance/SEC, crypto/web3, security & CVEs, medical codes, weather & geocoding, agriculture, energy, maritime, music, and more). Every endpoint is paid per call in USDC via x402 (Base or Solana) — no API key, no signup. Call any endpoint with no auth to get a 402 PaymentRequirements envelope, sign it (EIP-3009 on Base, partial SPL transfer on Solana), and retry with the PAYMENT-SIGNATURE header. Add ?trial=1 for one free real call per endpoint per hour to test before paying. To discover the right endpoint: GET https://2s.io/api/directory for the full catalog, or GET https://2s.io/api/search/endpoints?q=<natural-language task> for a ranked match. Per-call price is on each operation as x-payment-info (from $0.001). Batch up to 50 calls behind one payment via POST https://2s.io/api/batch/run."},"servers":[{"url":"https://2s.io"}],"components":{"responses":{"BadRequest":{"description":"Bad request — invalid parameters."},"PaymentRequired":{"description":"Payment required. Body contains the x402 PaymentRequirements envelope with a multi-network accepts array; the per-call price is in accepts[].amount (and on the operation as x-2s-price). Sign for whichever rail you hold USDC on (EIP-3009 for Base, partial SPL transfer for Solana) and retry with the PAYMENT-SIGNATURE header (X-PAYMENT also accepted for v1 clients).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402PaymentRequiredV2"}}}},"MethodNotAllowed":{"description":"Method not allowed — see `Allow` header for the supported method."},"ServerError":{"description":"Internal server error."},"UpstreamError":{"description":"Upstream provider error."}},"parameters":{"TrialMode":{"name":"trial","in":"query","required":false,"description":"Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the \"X-2s-Trial: 1\" request header. Works on every endpoint.","schema":{"type":"integer","enum":[1]}}},"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 protocol v2: base64-encoded PaymentPayload. Call any paid endpoint without auth to receive a 402 with a multi-network PaymentRequirements envelope. Sign for either rail: EIP-3009 transferWithAuthorization (Base USDC) OR a partial SPL token transfer (Solana USDC). Retry with PAYMENT-SIGNATURE header. X-PAYMENT is also accepted for v1 buyer clients. See https://x402.org."}},"schemas":{"Source":{"type":"object","description":"Provenance of the data: upstream provider, source URL, and license.","properties":{"provider":{"type":"string","description":"Upstream data provider."},"url":{"type":"string","description":"Source URL or documentation link."},"license":{"type":"string","description":"License / usage terms for the data."}}},"CallMeta":{"type":"object","description":"Per-call meta envelope — endpoint id, cost, caller kind, settlement details."},"X402PaymentRequiredV2":{"type":"object","description":"x402 v2 PaymentRequired envelope. Pick any entry from accepts[], sign for that rail, retry with the PAYMENT-SIGNATURE header.","required":["x402Version","accepts"],"properties":{"x402Version":{"type":"integer","const":2},"error":{"type":"string","description":"Human-readable reason payment is required."},"resource":{"type":"string","description":"The resource URL being purchased."},"accepts":{"type":"array","description":"Payment requirement options, one per supported network (Base USDC, Solana USDC).","items":{"type":"object","required":["scheme","network","amount","asset","payTo","maxTimeoutSeconds"],"properties":{"scheme":{"type":"string","enum":["exact"]},"network":{"type":"string","description":"CAIP-2 network id, e.g. \"eip155:8453\" (Base) or \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\"."},"amount":{"type":"string","description":"Price in atomic asset units (USDC has 6 decimals)."},"asset":{"type":"string","description":"Asset contract address / mint."},"payTo":{"type":"string","description":"Treasury address to pay."},"maxTimeoutSeconds":{"type":"integer"},"extra":{"type":"object","description":"Rail-specific extras (EVM: EIP-712 domain name/version; Solana: feePayer).","additionalProperties":true}}}},"extensions":{"type":"object","description":"Optional discovery metadata (e.g. bazaar input/output schemas).","additionalProperties":true}}}}},"paths":{"/api/license/broker":{"get":{"tags":["license"],"summary":"FINRA BrokerCheck lookup - every US registered broker /...","description":"FINRA BrokerCheck lookup — every US registered broker / investment advisor (~620k current + former). Search by free-text query (name + firm) or by CRD number for a direct individual record. Each result includes CRD ID, name (with any 'doing business as' aliases), broker-check + IA scope (Active/Inactive), a hasDisclosures flag (yes/no for complaints, settlements, terminations on file), industry-start date, FINRA registration count, and current + previous employments (firm name, branch city/state, registration dates). Public per FINRA's investor-protection BrokerCheck program; pair with /api/finance/sec-filings for cross-reference.","operationId":"license_broker","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Normalized envelope: items = FINRA BrokerCheck records; total = upstream match count; meta.query echoes the search.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"crd":{"type":"string"},"firstName":{"type":"string","nullable":true},"middleName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"otherNames":{"type":"array","items":{"type":"string"}},"bcScope":{"type":"string","nullable":true},"iaScope":{"type":"string","nullable":true},"hasDisclosures":{"type":"boolean"},"yearsInIndustryStart":{"type":"string","nullable":true},"finraRegistrationCount":{"type":"integer"},"employmentCount":{"type":"integer"},"currentEmployments":{"type":"array","items":{"type":"object","properties":{"firmId":{"type":"string"},"firmName":{"type":"string"},"branchCity":{"type":"string","nullable":true},"branchState":{"type":"string","nullable":true},"registrationBeginDate":{"type":"string","nullable":true}},"required":["firmId","firmName","branchCity","branchState","registrationBeginDate"],"additionalProperties":false}},"previousEmployments":{"type":"array","items":{"type":"object","properties":{"firmId":{"type":"string"},"firmName":{"type":"string"},"registrationBeginDate":{"type":"string","nullable":true},"registrationEndDate":{"type":"string","nullable":true}},"required":["firmId","firmName","registrationBeginDate","registrationEndDate"],"additionalProperties":false}}},"required":["crd","firstName","middleName","lastName","otherNames","bcScope","iaScope","hasDisclosures","yearsInIndustryStart","finraRegistrationCount","employmentCount","currentEmployments","previousEmployments"],"additionalProperties":false}},"total":{"type":"integer","nullable":true,"description":"Total matching rows upstream; null when unknown."},"source":{"$ref":"#/components/schemas/Source"},"meta":{"type":"object","properties":{"query":{"type":"object","properties":{"query":{"type":"string","nullable":true},"crd":{"type":"string","nullable":true},"limit":{"type":"integer"},"offset":{"type":"integer"}},"required":["query","crd","limit","offset"],"additionalProperties":false},"returned":{"type":"integer"}},"required":["query","returned"],"additionalProperties":false}},"required":["ok","items","total","source"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/CallMeta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"license.broker","x-2s-version":null,"x-2s-price":{"usd":0.003},"x-2s-accepts":["x402"],"x-2s-response-shape":"normalized","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"x402":{}}]},"parameters":[{"name":"query","in":"query","required":false,"description":"Free-text search query.","schema":{"type":"string","minLength":2,"maxLength":200}},{"name":"crd","in":"query","required":false,"description":"Crd.","schema":{"type":"string","pattern":"^\\d{1,9}$"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of results to return.","schema":{"type":"integer","minimum":1,"maximum":50,"default":10}},{"name":"offset","in":"query","required":false,"description":"Number of results to skip before returning (pagination offset).","schema":{"type":"integer","minimum":0,"maximum":10000,"default":0}},{"$ref":"#/components/parameters/TrialMode"}]}},"/api/license/medical":{"get":{"tags":["license"],"summary":"US healthcare provider lookup (NPPES NPI Registry).","description":"US healthcare provider lookup (NPPES NPI Registry). Every US doctor, nurse, dentist, hospital, lab, pharmacy has an NPI — this returns the canonical record. Lookup by 10-digit NPI for a precise match, or by firstName + lastName + state for fuzzy search. Each record includes name + credentials, status, enumeration date, primary + secondary specialty taxonomies (with state license numbers), practice + mailing addresses, phone, and any cross-issuer identifiers (Medicaid, Medicare, etc.). Public-domain CMS data, free. For all three NPI datasets merged (identity + industry payments + Medicare billing) in one call, see /api/health/provider-profile.","operationId":"license_medical","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Normalized envelope: items = NPPES provider records; total = null (NPPES caps results without a true count); meta.query echoes the search.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"npi":{"type":"string"},"enumerationType":{"type":"string"},"name":{"type":"object","properties":{"first":{"type":"string","nullable":true},"last":{"type":"string","nullable":true},"middle":{"type":"string","nullable":true},"credential":{"type":"string","nullable":true},"organizationName":{"type":"string","nullable":true}},"required":["first","last","middle","credential","organizationName"],"additionalProperties":false},"status":{"type":"string","nullable":true},"enumerationDate":{"type":"string","nullable":true},"lastUpdated":{"type":"string","nullable":true},"taxonomies":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"desc":{"type":"string"},"primary":{"type":"boolean"},"licenseNumber":{"type":"string","nullable":true},"licenseState":{"type":"string","nullable":true}},"required":["code","desc","primary","licenseNumber","licenseState"],"additionalProperties":false}},"addresses":{"type":"array","items":{"type":"object","properties":{"purpose":{"type":"string"},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"telephone":{"type":"string","nullable":true},"fax":{"type":"string","nullable":true}},"required":["purpose","address1","address2","city","state","postalCode","country","telephone","fax"],"additionalProperties":false}},"identifiers":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"desc":{"type":"string"},"issuer":{"type":"string","nullable":true},"identifier":{"type":"string"},"state":{"type":"string","nullable":true}},"required":["code","desc","issuer","identifier","state"],"additionalProperties":false}}},"required":["npi","enumerationType","name","status","enumerationDate","lastUpdated","taxonomies","addresses","identifiers"],"additionalProperties":false}},"total":{"type":"integer","nullable":true,"description":"Total matching rows upstream; null when unknown."},"source":{"$ref":"#/components/schemas/Source"},"meta":{"type":"object","properties":{"query":{"type":"object","properties":{"npi":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"enumerationType":{"type":"string","nullable":true},"limit":{"type":"integer"},"skip":{"type":"integer"}},"required":["npi","name","firstName","lastName","state","enumerationType","limit","skip"],"additionalProperties":false},"returned":{"type":"integer"}},"required":["query","returned"],"additionalProperties":false}},"required":["ok","items","total","source"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/CallMeta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"license.medical","x-2s-version":null,"x-2s-price":{"usd":0.003},"x-2s-accepts":["x402"],"x-2s-response-shape":"normalized","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"x402":{}}]},"parameters":[{"name":"npi","in":"query","required":false,"description":"NPI.","schema":{"type":"string","pattern":"^\\d{10}$"}},{"name":"firstName","in":"query","required":false,"description":"First name to filter by.","schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"lastName","in":"query","required":false,"description":"Last name to filter by.","schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"name","in":"query","required":false,"description":"Name to search for.","schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"state","in":"query","required":false,"description":"US state — two-letter postal abbreviation (e.g. CA) or full name.","schema":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[A-Za-z]{2}$"}},{"name":"enumerationType","in":"query","required":false,"description":"Enumeration type.","schema":{"type":"string","enum":["1","2"]}},{"name":"limit","in":"query","required":false,"description":"Maximum number of results to return.","schema":{"type":"integer","minimum":1,"maximum":200,"default":10}},{"name":"skip","in":"query","required":false,"description":"Skip.","schema":{"type":"integer","minimum":0,"maximum":10000,"default":0}},{"$ref":"#/components/parameters/TrialMode"}]}},"/api/license/real-estate":{"get":{"tags":["license"],"summary":"Verify US real-estate licenses (brokers, sales agents...","description":"Verify US real-estate licenses (brokers, sales agents, broker companies). Currently supported state: TX (Texas Real Estate Commission license holders). Search by name (license holder, partial), licenseNumber (exact), licenseType (partial, e.g. \"Broker\", \"Sales Agent\"), status (e.g. \"Active\"). Each license: type, number, holder name, status, original license date, expiration date, and the related supervising broker (type/number/name) where applicable. Agent/broker due-diligence and KYC. Siblings: /api/license/medical, /api/license/broker, /api/license/trades. Official state open data.","operationId":"license_real-estate","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Normalized envelope: items = real-estate licenses; total = null (capped state-portal search); meta = {state, query}.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"licenseType":{"type":"string","nullable":true},"licenseNumber":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"originalLicenseDate":{"type":"string","nullable":true},"expires":{"type":"string","nullable":true},"supervisor":{"type":"object","properties":{"type":{"type":"string","nullable":true},"number":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}},"required":["type","number","name"],"additionalProperties":false,"nullable":true}},"required":["licenseType","licenseNumber","name","status","originalLicenseDate","expires","supervisor"],"additionalProperties":false}},"total":{"type":"integer","nullable":true,"description":"Total matching rows upstream; null when unknown."},"source":{"$ref":"#/components/schemas/Source"},"meta":{"type":"object","properties":{"state":{"type":"string"},"query":{"type":"object","properties":{"name":{"type":"string","nullable":true},"licenseNumber":{"type":"string","nullable":true},"licenseType":{"type":"string","nullable":true},"status":{"type":"string","nullable":true}},"required":["name","licenseNumber","licenseType","status"],"additionalProperties":false}},"required":["state","query"],"additionalProperties":false}},"required":["ok","items","total","source"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/CallMeta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"license.real-estate","x-2s-version":null,"x-2s-price":{"usd":0.0072},"x-2s-accepts":["x402"],"x-2s-response-shape":"normalized","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.007200"},"protocols":[{"x402":{}}]},"parameters":[{"name":"state","in":"query","required":true,"description":"US state — two-letter postal abbreviation (e.g. CA) or full name.","schema":{"type":"string","enum":["TX"]}},{"name":"name","in":"query","required":false,"description":"Name to search for.","schema":{"type":"string","minLength":2,"maxLength":120}},{"name":"licenseNumber","in":"query","required":false,"description":"License number.","schema":{"type":"string","minLength":1,"maxLength":20}},{"name":"licenseType","in":"query","required":false,"description":"License type.","schema":{"type":"string","minLength":2,"maxLength":60}},{"name":"status","in":"query","required":false,"description":"Filter results by status.","schema":{"type":"string","minLength":2,"maxLength":40}},{"name":"limit","in":"query","required":false,"description":"Maximum number of results to return.","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"offset","in":"query","required":false,"description":"Number of results to skip before returning (pagination offset).","schema":{"type":"integer","minimum":0,"default":0}},{"$ref":"#/components/parameters/TrialMode"}]}},"/api/license/trades":{"get":{"tags":["license"],"summary":"Verify US trade / occupational licenses (electricians, A/C...","description":"Verify US trade / occupational licenses (electricians, A/C technicians, cosmetologists, tow operators, and other state-regulated trades). Currently supported state: TX (Texas Department of Licensing & Regulation, all active licenses). Search by name (matches owner or business name, partial), licenseNumber (exact), licenseType (partial, e.g. \"Electrician\"), county. Each license: type + subtype, number, business + owner name, county, expiration date, continuing-education flag. Contractor due-diligence and KYC. Siblings: /api/license/medical (NPI), /api/license/broker (FINRA). Official state open data.","operationId":"license_trades","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Normalized envelope: items = trade/occupational licenses; total = null (capped state-portal search); meta = {state, query}.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"licenseType":{"type":"string","nullable":true},"licenseSubtype":{"type":"string","nullable":true},"licenseNumber":{"type":"string","nullable":true},"businessName":{"type":"string","nullable":true},"ownerName":{"type":"string","nullable":true},"county":{"type":"string","nullable":true},"expires":{"type":"string","nullable":true},"continuingEducation":{"type":"boolean","nullable":true}},"required":["licenseType","licenseSubtype","licenseNumber","businessName","ownerName","county","expires","continuingEducation"],"additionalProperties":false}},"total":{"type":"integer","nullable":true,"description":"Total matching rows upstream; null when unknown."},"source":{"$ref":"#/components/schemas/Source"},"meta":{"type":"object","properties":{"state":{"type":"string"},"query":{"type":"object","properties":{"name":{"type":"string","nullable":true},"licenseNumber":{"type":"string","nullable":true},"licenseType":{"type":"string","nullable":true},"county":{"type":"string","nullable":true}},"required":["name","licenseNumber","licenseType","county"],"additionalProperties":false}},"required":["state","query"],"additionalProperties":false}},"required":["ok","items","total","source"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/CallMeta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"license.trades","x-2s-version":null,"x-2s-price":{"usd":0.0072},"x-2s-accepts":["x402"],"x-2s-response-shape":"normalized","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.007200"},"protocols":[{"x402":{}}]},"parameters":[{"name":"state","in":"query","required":true,"description":"US state — two-letter postal abbreviation (e.g. CA) or full name.","schema":{"type":"string","enum":["TX"]}},{"name":"name","in":"query","required":false,"description":"Name to search for.","schema":{"type":"string","minLength":2,"maxLength":120}},{"name":"licenseNumber","in":"query","required":false,"description":"License number.","schema":{"type":"string","minLength":1,"maxLength":20}},{"name":"licenseType","in":"query","required":false,"description":"License type.","schema":{"type":"string","minLength":2,"maxLength":60}},{"name":"county","in":"query","required":false,"description":"County name to filter by.","schema":{"type":"string","minLength":2,"maxLength":40}},{"name":"limit","in":"query","required":false,"description":"Maximum number of results to return.","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"offset","in":"query","required":false,"description":"Number of results to skip before returning (pagination offset).","schema":{"type":"integer","minimum":0,"default":0}},{"$ref":"#/components/parameters/TrialMode"}]}}}}