{"openapi":"3.1.0","info":{"title":"Web & Page Intelligence API","version":"1.0.0","description":"Independent public-page reads for agents: Markdown conversion, schema extraction, change detection, metadata, displayed contacts, and sitemap indexes. Pages are fetched directly over HTTP. No browser session is used. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nPayment uses the x402 protocol with exact USDC on Base (chain id 8453). Each POST operation has a fixed USD price.\nHow to call an operation:\n1. POST a JSON body matching the operation's requestBody schema to the operation path. Include an Idempotency-Key header (64 hex characters, 32 random bytes).\n2. If you have not paid, the server responds 402 with payment requirements in the body. Pay the exact amount to the payTo address on Base.\n3. Retry the identical request with the same Idempotency-Key and add a payment-signature header containing the x402 payment payload. On success (200) the operation result is returned.\n4. Reuse the same Idempotency-Key only for retries of the same operation and request body; it will not be charged twice.\nAll outputs are compliance prechecks, drafts, or data lookups for human review. They are not official determinations, legal advice, identity confirmation, or certified filings. Verify time-sensitive or official data with the cited source before acting."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/web-intelligence/url-to-markdown":{"post":{"operationId":"convert_url_to_markdown","summary":"Convert URL to Markdown","description":"Fetch one public webpage and convert its readable HTML into Markdown. Scripts are not run, and missing text is not filled in.","tags":["web-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","minLength":8,"maxLength":2000,"pattern":"^https?:\\/\\/\\S+$"}},"required":["url"],"additionalProperties":false},"example":{"url":"https://example.com/"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"retrievedAt":{"type":"string"},"requestedUrl":{"type":"string"},"finalUrl":{"type":"string"},"httpStatus":{"type":"number"},"contentType":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}},"markdown":{"type":"string"},"contentHash":{"type":"string"}},"additionalProperties":true},"example":{"retrievedAt":"2026-11-02T18:00:00.000Z","requestedUrl":"https://example.com/","finalUrl":"https://example.com/","httpStatus":200,"contentType":"text/html","warnings":["Embedded frames were not fetched."],"sources":[{"source":"Public HTTP response","url":"https://example.com/","retrievedAt":"2026-11-02T18:00:00.000Z"}],"limitations":["Only the bytes from one public HTTP GET are read. JavaScript is not executed."],"markdown":"# Example Domain\n\nThis domain is for use in documentation examples.","contentHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/web-intelligence/structured-page-extract":{"post":{"operationId":"extract_structured_page_data","summary":"Extract structured page data","description":"Extract caller-defined fields from one public webpage. A field is returned only when a selector, JSON-LD property, or matching meta tag contains it. Otherwise the value is null.","tags":["web-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","minLength":8,"maxLength":2000,"pattern":"^https?:\\/\\/\\S+$"},"schema":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,40}$"},"type":{"type":"string","enum":["string","number","boolean","url"]},"selector":{"type":"string","minLength":1,"maxLength":160},"attribute":{"type":"string","pattern":"^[A-Za-z_:][A-Za-z0-9_:-]{0,40}$"}},"required":["name","type"],"additionalProperties":false}}},"required":["url","schema"],"additionalProperties":false},"example":{"url":"https://example.com/","schema":[{"name":"heading","type":"string","selector":"h1"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"retrievedAt":{"type":"string"},"requestedUrl":{"type":"string"},"finalUrl":{"type":"string"},"httpStatus":{"type":"number"},"contentType":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}}},"additionalProperties":true},"example":{"retrievedAt":"2026-11-02T18:00:00.000Z","requestedUrl":"https://example.com/","finalUrl":"https://example.com/","httpStatus":200,"contentType":"text/html","warnings":["A JSON-LD script could not be parsed."],"sources":[{"source":"Public HTTP response","url":"https://example.com/","retrievedAt":"2026-11-02T18:00:00.000Z"}],"limitations":["Without a selector, a field is filled only from a JSON-LD property, a meta name or property, or the document title when the field name is title."],"fields":[{"name":"heading","type":"string","value":"Example Domain","warnings":["2 elements matched; the first was used."]}]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/web-intelligence/page-change-detect":{"post":{"operationId":"detect_page_changes","summary":"Detect page changes","description":"Fetch a public page and compare its Markdown with a caller-supplied previous snapshot. The snapshot is not stored. The result lists added and removed lines and does not rank their importance.","tags":["web-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","minLength":8,"maxLength":2000,"pattern":"^https?:\\/\\/\\S+$"},"previousMarkdown":{"type":"string","maxLength":200000},"previousRetrievedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["url","previousMarkdown"],"additionalProperties":false},"example":{"url":"https://example.com/","previousMarkdown":"Previous snapshot","previousRetrievedAt":"2026-11-01T18:00:00.000Z"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"retrievedAt":{"type":"string"},"requestedUrl":{"type":"string"},"finalUrl":{"type":"string"},"httpStatus":{"type":"number"},"contentType":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}},"changed":{"type":"boolean"},"previousRetrievedAt":{"type":"string"},"previousHash":{"type":"string"},"currentHash":{"type":"string"},"currentMarkdown":{"type":"string"},"changes":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"text":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":true},"example":{"retrievedAt":"2026-11-02T18:00:00.000Z","requestedUrl":"https://example.com/","finalUrl":"https://example.com/","httpStatus":200,"contentType":"text/html","warnings":["Only the first 40 added or removed lines are listed."],"sources":[{"source":"Public HTTP response","url":"https://example.com/","retrievedAt":"2026-11-02T18:00:00.000Z"}],"limitations":["The previous snapshot is supplied by the caller and is not stored."],"changed":true,"previousRetrievedAt":"2026-11-01T18:00:00.000Z","previousHash":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","currentHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","currentMarkdown":"# Example Domain\n\nThis domain is for use in documentation examples.","changes":[{"kind":"removed","text":"Previous snapshot"},{"kind":"added","text":"Example Domain"}]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/web-intelligence/website-metadata-extract":{"post":{"operationId":"extract_website_metadata","summary":"Extract website metadata","description":"Read title, description, canonical URL, Open Graph tags, language, and robots directives from one public page. Absent tags are null. robots.txt is not fetched.","tags":["web-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","minLength":8,"maxLength":2000,"pattern":"^https?:\\/\\/\\S+$"}},"required":["url"],"additionalProperties":false},"example":{"url":"https://example.com/"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"retrievedAt":{"type":"string"},"requestedUrl":{"type":"string"},"finalUrl":{"type":"string"},"httpStatus":{"type":"number"},"contentType":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}},"title":{"type":"string"},"description":{"type":"string"},"canonicalUrl":{"type":"string"},"language":{"type":"string"},"robots":{"type":"object","properties":{"meta":{"type":"string"},"header":{"type":"string"}},"additionalProperties":true},"openGraph":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"},"image":{"type":"string"},"siteName":{"type":"string"},"locale":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true},"example":{"retrievedAt":"2026-11-02T18:00:00.000Z","requestedUrl":"https://example.com/","finalUrl":"https://example.com/","httpStatus":200,"contentType":"text/html","warnings":["A canonical link was present but was not an http or https URL."],"sources":[{"source":"Public HTTP response","url":"https://example.com/","retrievedAt":"2026-11-02T18:00:00.000Z"}],"limitations":["robots.txt was not fetched. Robots values come from the page meta tag and the X-Robots-Tag header."],"title":"Example Domain","description":"Illustrative description from the description meta tag.","canonicalUrl":"https://example.com/","language":"en","robots":{"meta":"index,follow","header":"noarchive"},"openGraph":{"title":"Example Domain","description":"Illustrative description","type":"website","url":"https://example.com/","image":"https://example.com/image.png","siteName":"Example","locale":"en"}}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]}}},"/api/v1/web-intelligence/website-contact-extract":{"post":{"operationId":"extract_website_contacts","summary":"Extract website contacts","description":"Read publicly displayed emails, tel: links, address elements, and structured contact data from one public page. Linked pages are not crawled, and missing contacts are not guessed.","tags":["web-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","minLength":8,"maxLength":2000,"pattern":"^https?:\\/\\/\\S+$"}},"required":["url"],"additionalProperties":false},"example":{"url":"https://example.com/"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"retrievedAt":{"type":"string"},"requestedUrl":{"type":"string"},"finalUrl":{"type":"string"},"httpStatus":{"type":"number"},"contentType":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}},"emails":{"type":"array","items":{"type":"string"}},"phones":{"type":"array","items":{"type":"string"}},"addresses":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"retrievedAt":"2026-11-02T18:00:00.000Z","requestedUrl":"https://example.com/","finalUrl":"https://example.com/","httpStatus":200,"contentType":"text/html","warnings":["No publicly displayed email, telephone, or address was found in the fetched HTML."],"sources":[{"source":"Public HTTP response","url":"https://example.com/","retrievedAt":"2026-11-02T18:00:00.000Z"}],"limitations":["Phone numbers are taken from tel: links and structured contact data, not from arbitrary digit strings."],"emails":["info@example.com"],"phones":["+1-202-555-0100"],"addresses":["123 Example Street, Example City"]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/web-intelligence/sitemap-content-index":{"post":{"operationId":"index_sitemap_content","summary":"Index sitemap content","description":"Fetch one public sitemap or sitemap index and return the listed URLs with lastmod, changefreq, and priority when those fields are present. Page URLs are not fetched.","tags":["web-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sitemapUrl":{"type":"string","minLength":8,"maxLength":2000,"pattern":"^https?:\\/\\/\\S+$"}},"required":["sitemapUrl"],"additionalProperties":false},"example":{"sitemapUrl":"https://www.sitemaps.org/sitemap.xml"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"retrievedAt":{"type":"string"},"requestedUrl":{"type":"string"},"finalUrl":{"type":"string"},"httpStatus":{"type":"number"},"contentType":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}},"kind":{"type":"string"},"entryKind":{"type":"string"},"truncated":{"type":"boolean"},"entries":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"string"},"lastmod":{"type":"string"},"changefreq":{"type":"string"},"priority":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":true},"example":{"retrievedAt":"2026-11-02T18:00:00.000Z","requestedUrl":"https://www.sitemaps.org/sitemap.xml","finalUrl":"https://www.sitemaps.org/sitemap.xml","httpStatus":200,"contentType":"application/xml","warnings":["Only the first 100 URLs are returned."],"sources":[{"source":"Public HTTP response","url":"https://www.sitemaps.org/sitemap.xml","retrievedAt":"2026-11-02T18:00:00.000Z"}],"limitations":["Listed page URLs are not fetched. Metadata is only what each sitemap entry contained."],"kind":"urlset","entryKind":"page","truncated":false,"entries":[{"loc":"https://example.com/","lastmod":"2026-11-01","changefreq":"weekly","priority":"0.8"}]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{}}]}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}