{"uid":"cap_G6BgG_H6mkaGDgVOneKkh","slug":"sec-edgar-financial-ratios-api-41d11cc6","name":"SEC EDGAR Financial Ratios API","description":"Key financial ratios computed from SEC EDGAR XBRL: margins, liquidity, leverage and growth. Give a ticker or CIK and get ratios over recent periods, each computed number citing the source facts it was derived from, plus restatement flags and simple anomaly flags.","url":"https://api.agentstools.dev/edgar/ratios?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"cik":{"type":"string","description":"SEC EDGAR CIK, any zero-padding accepted"},"freq":{"enum":["annual","quarterly"],"type":"string","description":"Reporting frequency, default annual"},"ticker":{"type":"string","description":"Stock ticker symbol, e.g. AAPL"},"periods":{"type":"integer","maximum":12,"minimum":1,"description":"Number of recent periods to return, default 8"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":{"p10Cents":"2.0000","medianCents":"2.0000","p90Cents":"2.0000","minCents":"2.0000","maxCents":"2.0000","p95Cents":"2.0000","sampleCount":1,"varies":false,"failureChargeRate":1},"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_RfM_QKnwC7zYfC9Dj12Lu","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes key financial ratios (margins, liquidity, leverage, growth) from SEC EDGAR XBRL data for a given stock ticker or CIK, with source citations and anomaly flags.","exampleAgentPrompt":"Pull the key financial ratios for AAPL — margins, liquidity, leverage, and growth — from SEC EDGAR for the last 8 annual periods, and flag any anomalies or restatements.","exampleUseCases":[{"title":"Audit leverage ratios before acquisition","prompt":"Before we move forward with this acquisition, pull the leverage and liquidity ratios for ticker SAIC directly from SEC EDGAR filings for the last 6 annual periods — I need to see the source citations for every number and whether there are any restatement flags we should know about."},{"title":"Compare gross margins across tech stocks","prompt":"Compare gross margin and operating margin trends for MSFT, GOOGL, and META over the past 8 quarters using SEC EDGAR XBRL data, and highlight any anomalies or quarters where the numbers look unusual."},{"title":"Screen for deteriorating financial health","prompt":"I'm doing due diligence on NIO — can you pull their current ratio, quick ratio, and debt-to-equity from SEC EDGAR over the last 4 annual periods and let me know if anything looks off or if there have been any restatements?"}],"resultDescription":"A structured response containing financial ratios (profit margins, liquidity ratios, leverage ratios, growth metrics) computed from EDGAR XBRL data across recent reporting periods, each ratio citing the underlying XBRL source facts it was derived from, plus boolean restatement flags and anomaly flags per period.","failureModes":["Ticker not found in EDGAR — returns error if the ticker is not mapped to a CIK","CIK not found — invalid or unrecognized CIK returns an error","Insufficient XBRL data — company may not have enough tagged XBRL periods to compute ratios","Rate limit or payment failure — x402 payment not processed, returns 402","periods parameter out of range — must be between 1 and 12","freq must be 'annual' or 'quarterly' — invalid enum returns validation error"],"whenToPreferThis":"Use this endpoint when you need auditable, source-cited financial ratios derived directly from SEC EDGAR XBRL filings rather than third-party financial data providers. Ideal for fundamental analysis, due diligence, or compliance workflows where provenance of each computed number matters. Prefer this over general financial data APIs when you need restatement detection and anomaly flags alongside ratio history.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:50:12.317Z","isFirstParty":false,"canonicalSlug":"sec-edgar-financial-ratios-api-41d11cc6"}