{"openapi":"3.1.0","info":{"title":"Company Intelligence API","version":"1.0.0","description":"Independent API for company data: search by name/country, profile via LEI, ownership relationships, financial metrics, and SEC filings from GLEIF and EDGAR. 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/company-intelligence/search":{"post":{"operationId":"search_companies","summary":"Search companies","description":"Search companies by name and country using the GLEIF LEI database.","tags":["company-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50}},"required":["query","limit"],"additionalProperties":false},"example":{"query":"Apple","country":"US","limit":10}}}},"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":{"query":{"type":"string"},"country":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"lei":{"type":"string"},"legalName":{"type":"string"},"registrationNumber":{"type":"null"},"jurisdiction":{"type":"string"},"entityStatus":{"type":"string"},"leiStatus":{"type":"string"},"legalForm":{"type":"null"},"sourceUrl":{"type":"string"}},"additionalProperties":true}},"resultCount":{"type":"number"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"additionalProperties":true}},"retrievedAt":{"type":"string"},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"query":"Apple","country":"US","results":[{"lei":"5493001KJTIIGC8Y1R12","legalName":"APPLE INC","registrationNumber":null,"jurisdiction":"US","entityStatus":"ACTIVE","leiStatus":"ISSUED","legalForm":null,"sourceUrl":"https://api.gleif.org/api/v1/lei-records/5493001KJTIIGC8Y1R12"}],"resultCount":1,"sources":[{"source":"GLEIF","status":"OK","url":"https://api.gleif.org/api/v1/lei-records"}],"retrievedAt":"2026-10-29T12:00:00.000Z","limitations":["Results come from the GLEIF LEI database and may not include all private companies worldwide."]}}}},"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.01"},"protocols":[{"x402":{}}]}}},"/api/v1/company-intelligence/profile":{"post":{"operationId":"get_company_profile","summary":"Get company profile","description":"Retrieve a company profile using LEI from GLEIF.","tags":["company-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"identifier":{"type":"string","minLength":1,"maxLength":30}},"required":["identifier"],"additionalProperties":false},"example":{"identifier":"5493001KJTIIGC8Y1R12"}}}},"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":{"found":{"type":"boolean"},"profile":{"type":"object","properties":{"lei":{"type":"string"},"legalName":{"type":"string"},"alternativeNames":{"type":"array","items":{}},"registrationNumber":{"type":"null"},"entityStatus":{"type":"string"},"leiRegistrationStatus":{"type":"string"},"jurisdiction":{"type":"string"},"legalForm":{"type":"null"},"registeredAddress":{"type":"object","properties":{"firstAddressLine":{"type":"string"},"additionalAddressLine":{"type":"null"},"city":{"type":"string"},"region":{"type":"string"},"country":{"type":"string"},"postalCode":{"type":"string"}},"additionalProperties":true},"headquartersAddress":{"type":"object","properties":{"firstAddressLine":{"type":"string"},"additionalAddressLine":{"type":"null"},"city":{"type":"string"},"region":{"type":"string"},"country":{"type":"string"},"postalCode":{"type":"string"}},"additionalProperties":true},"initialRegistrationDate":{"type":"string"},"lastUpdateDate":{"type":"string"},"nextRenewalDate":{"type":"string"}},"additionalProperties":true},"identifier":{"type":"string"},"source":{"type":"object","properties":{"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"found":true,"profile":{"lei":"5493001KJTIIGC8Y1R12","legalName":"APPLE INC","alternativeNames":[],"registrationNumber":null,"entityStatus":"ACTIVE","leiRegistrationStatus":"ISSUED","jurisdiction":"US","legalForm":null,"registeredAddress":{"firstAddressLine":"ONE APPLE PARK WAY","additionalAddressLine":null,"city":"CUPERTINO","region":"CA","country":"US","postalCode":"95014"},"headquartersAddress":{"firstAddressLine":"ONE APPLE PARK WAY","additionalAddressLine":null,"city":"CUPERTINO","region":"CA","country":"US","postalCode":"95014"},"initialRegistrationDate":"2014-06-23","lastUpdateDate":"2024-09-28","nextRenewalDate":"2025-09-28"},"identifier":"5493001KJTIIGC8Y1R12","source":{"url":"https://api.gleif.org/api/v1/lei-records/5493001KJTIIGC8Y1R12","retrievedAt":"2026-10-29T12:00:00.000Z","status":"OK"},"limitations":["Profile data is from the GLEIF LEI database and may not include all company details."]}}}},"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/company-intelligence/ownership":{"post":{"operationId":"get_company_ownership","summary":"Get company ownership","description":"Retrieve parent and subsidiary relationships from GLEIF.","tags":["company-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"identifier":{"type":"string","minLength":1,"maxLength":30}},"required":["identifier"],"additionalProperties":false},"example":{"identifier":"5493001KJTIIGC8Y1R12"}}}},"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":{"identifier":{"type":"string"},"ownership":{"type":"object","properties":{"directParent":{"type":"null"},"ultimateParent":{"type":"null"},"directChildren":{"type":"array","items":{}},"ultimateChildren":{"type":"array","items":{}}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"additionalProperties":true}},"retrievedAt":{"type":"string"},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"identifier":"5493001KJTIIGC8Y1R12","ownership":{"directParent":null,"ultimateParent":null,"directChildren":[],"ultimateChildren":[]},"sources":[{"endpoint":"direct-parent","status":"OK","url":"https://api.gleif.org/api/v1/lei-records/5493001KJTIIGC8Y1R12/direct-parent"},{"endpoint":"ultimate-parent","status":"OK","url":"https://api.gleif.org/api/v1/lei-records/5493001KJTIIGC8Y1R12/ultimate-parent"},{"endpoint":"direct-children","status":"OK","url":"https://api.gleif.org/api/v1/lei-records/5493001KJTIIGC8Y1R12/direct-children"},{"endpoint":"ultimate-children","status":"OK","url":"https://api.gleif.org/api/v1/lei-records/5493001KJTIIGC8Y1R12/ultimate-children"}],"retrievedAt":"2026-10-29T12:00:00.000Z","limitations":["Ownership data comes from GLEIF relationship records.","Not all entities report parent or subsidiary relationships."]}}}},"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":{}}]}}},"/api/v1/company-intelligence/financials":{"post":{"operationId":"get_company_financials","summary":"Get company financials","description":"Retrieve and normalize financial metrics from SEC EDGAR using CIK or ticker.","tags":["company-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"identifier":{"type":"string","minLength":1,"maxLength":30}},"required":["identifier"],"additionalProperties":false},"example":{"identifier":"AAPL"}}}},"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":{"found":{"type":"boolean"},"financials":{"type":"object","properties":{"entityName":{"type":"string"},"cik":{"type":"string"},"sic":{"type":"string"},"sicDescription":{"type":"string"},"keyMetrics":{"type":"object","properties":{"Revenues":{"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"},"period":{"type":"string"},"yearOverYearChange":{"type":"number"}},"additionalProperties":true},"NetIncomeLoss":{"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"},"period":{"type":"string"},"yearOverYearChange":{"type":"number"}},"additionalProperties":true},"Assets":{"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"},"period":{"type":"string"},"yearOverYearChange":{"type":"number"}},"additionalProperties":true},"Liabilities":{"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"},"period":{"type":"string"},"yearOverYearChange":{"type":"number"}},"additionalProperties":true},"StockholdersEquity":{"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"},"period":{"type":"string"},"yearOverYearChange":{"type":"number"}},"additionalProperties":true},"CashAndCashEquivalentsAtCarryingValue":{"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"},"period":{"type":"string"},"yearOverYearChange":{"type":"number"}},"additionalProperties":true},"OperatingIncomeLoss":{"type":"object","properties":{"value":{"type":"number"},"unit":{"type":"string"},"period":{"type":"string"},"yearOverYearChange":{"type":"number"}},"additionalProperties":true}},"additionalProperties":true}},"additionalProperties":true},"identifier":{"type":"string"},"cik":{"type":"string"},"source":{"type":"object","properties":{"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"found":true,"financials":{"entityName":"CIK0000320193","cik":"0000320193","sic":"3571","sicDescription":"Electronic Computers","keyMetrics":{"Revenues":{"value":383285000000,"unit":"USD","period":"FY","yearOverYearChange":-2.1},"NetIncomeLoss":{"value":96995000000,"unit":"USD","period":"FY","yearOverYearChange":-5.4},"Assets":{"value":352755000000,"unit":"USD","period":"FY","yearOverYearChange":8.2},"Liabilities":{"value":290437000000,"unit":"USD","period":"FY","yearOverYearChange":6.5},"StockholdersEquity":{"value":62318000000,"unit":"USD","period":"FY","yearOverYearChange":15.3},"CashAndCashEquivalentsAtCarryingValue":{"value":29942000000,"unit":"USD","period":"FY","yearOverYearChange":-10.2},"OperatingIncomeLoss":{"value":114301000000,"unit":"USD","period":"FY","yearOverYearChange":-3.8}}},"identifier":"AAPL","cik":"0000320193","source":{"url":"https://data.sec.gov/api/xbrl/companyfacts/CIK0000320193.json","retrievedAt":"2026-10-29T12:00:00.000Z","status":"OK"},"limitations":["SEC EDGAR XBRL financials are available only for SEC registrants that file structured XBRL data.","Key metrics are extracted from the most recent reported fact for each concept and may span different reporting periods."]}}}},"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/company-intelligence/filings":{"post":{"operationId":"get_company_filings","summary":"Get company filings","description":"Retrieve recent company filings and significant changes from SEC EDGAR using CIK or ticker.","tags":["company-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"identifier":{"type":"string","minLength":1,"maxLength":30},"limit":{"default":20,"type":"integer","minimum":1,"maximum":100}},"required":["identifier","limit"],"additionalProperties":false},"example":{"identifier":"AAPL","limit":10}}}},"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":{"found":{"type":"boolean"},"filings":{"type":"array","items":{"type":"object","properties":{"form":{"type":"string"},"filingDate":{"type":"string"},"description":{"type":"string"},"accessionNumber":{"type":"string"},"documentUrl":{"type":"string"}},"additionalProperties":true}},"identifier":{"type":"string"},"cik":{"type":"string"},"source":{"type":"object","properties":{"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"found":true,"filings":[{"form":"10-K","filingDate":"2024-11-01","description":"10-K","accessionNumber":"0000320193-24-000123","documentUrl":"https://data.sec.gov/Archives/edgar/data/320193/000032019324000123/aapl-20240928.htm"},{"form":"10-Q","filingDate":"2024-10-25","description":"10-Q","accessionNumber":"0000320193-24-000122","documentUrl":"https://data.sec.gov/Archives/edgar/data/320193/000032019324000122/aapl-20240928.htm"}],"identifier":"AAPL","cik":"0000320193","source":{"url":"https://data.sec.gov/submissions/CIK0000320193.json","retrievedAt":"2026-10-29T12:00:00.000Z","status":"OK"},"limitations":["SEC EDGAR filings are limited to what the entity has filed with the SEC.","Document URLs point to the primary document; exhibits and attachments require separate retrieval."]}}}},"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":{}}]}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}