Skip to content

Commit 3727923

Browse files
committed
update openapi file
1 parent fe654fa commit 3727923

File tree

2 files changed

+450
-72
lines changed

2 files changed

+450
-72
lines changed

finfeedapi/sec-api-rest/spec/openapi.json

Lines changed: 240 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"content": {
4848
"application/json": {
4949
"schema": {
50-
"$ref": "#/components/schemas/DTO.FilingExtractResultDto"
50+
"type": "object",
51+
"additionalProperties": { }
5152
},
5253
"examples": {
5354
"Example Filing Extract": {
@@ -484,6 +485,240 @@
484485
}
485486
}
486487
}
488+
},
489+
"/v1/xbrl-converter": {
490+
"get": {
491+
"tags": [
492+
"XBRL Conversion"
493+
],
494+
"summary": "Convert XBRL data to JSON format",
495+
"description": "Converts XBRL data to JSON format using one of three possible input methods.\r\n\r\n### Input Methods\r\n\r\n1. HTML URL (htm-url)\r\n - URL of the filing ending with .htm or .html\r\n - Both filing URLs and index page URLs are accepted\r\n - Example: https://www.sec.gov/Archives/edgar/data/1318605/000156459021004599/tsla-10k_20201231.htm\r\n\r\n2. XBRL URL (xbrl-url)\r\n - URL of the XBRL file ending with .xml\r\n - Can be found in the dataFiles array from Query API\r\n - Example: https://www.sec.gov/Archives/edgar/data/1318605/000156459021004599/tsla-10k_20201231_htm.xml\r\n\r\n3. Accession Number (accession-no)\r\n - The SEC filing accession number\r\n - Example: 0001564590-21-004599\r\n\r\n:::note\r\nOnly one of the three parameters should be provided. If multiple parameters are provided, the priority order is:\r\n1. htm-url\r\n2. xbrl-url\r\n3. accession-no\r\n:::\r\n\r\n### Supported Filing Types\r\n\r\n- Annual Reports (10-K)\r\n- Quarterly Reports (10-Q)\r\n- Current Reports (8-K)\r\n- Registration Statements (S-1, S-3)\r\n- Foreign Private Issuer Reports (20-F, 40-F)\r\n\r\n### Response Format\r\n\r\nThe API returns a JSON object containing:\r\n- Financial statements (Income Statement, Balance Sheet, Cash Flow Statement)\r\n- Accounting policies and footnotes\r\n- Company information\r\n- Filing metadata\r\n\r\n### Example Response\r\n```json\r\n{\r\n \"StatementsOfIncome\": {\r\n \"RevenueFromContractWithCustomerExcludingAssessedTax\": [\r\n {\r\n \"decimals\": \"-6\",\r\n \"unitRef\": \"U_USD\",\r\n \"period\": {\r\n \"startDate\": \"2023-07-01\",\r\n \"endDate\": \"2024-06-30\"\r\n },\r\n \"value\": \"245122000000\"\r\n }\r\n ]\r\n }\r\n}\r\n```",
496+
"parameters": [
497+
{
498+
"name": "htm-url",
499+
"in": "query",
500+
"description": "URL of the filing ending with .htm or .html",
501+
"schema": {
502+
"type": "string"
503+
}
504+
},
505+
{
506+
"name": "xbrl-url",
507+
"in": "query",
508+
"description": "URL of the XBRL file ending with .xml",
509+
"schema": {
510+
"type": "string"
511+
}
512+
},
513+
{
514+
"name": "accession-no",
515+
"in": "query",
516+
"description": "SEC filing accession number",
517+
"schema": {
518+
"type": "string"
519+
}
520+
}
521+
],
522+
"responses": {
523+
"200": {
524+
"description": "Successful conversion",
525+
"content": {
526+
"application/json": {
527+
"schema": {
528+
"type": "object",
529+
"additionalProperties": { }
530+
},
531+
"examples": {
532+
"Example XBRL Filing Extract": {
533+
"value": {
534+
"CoverPage": {
535+
"DocumentType": "10-K",
536+
"DocumentAnnualReport": "true",
537+
"DocumentPeriodEndDate": "2020-09-26",
538+
"DocumentTransitionReport": "false",
539+
"EntityFileNumber": "001-36743",
540+
"EntityRegistrantName": "Apple Inc.",
541+
"EntityIncorporationStateCountryCode": "CA",
542+
"EntityTaxIdentificationNumber": "94-2404110",
543+
"EntityAddressAddressLine1": "One Apple Park Way",
544+
"EntityAddressCityOrTown": "Cupertino",
545+
"EntityAddressStateOrProvince": "CA",
546+
"EntityAddressPostalZipCode": "95014",
547+
"CityAreaCode": "408",
548+
"LocalPhoneNumber": "996-1010",
549+
"Security12bTitle": [
550+
{
551+
"period": {
552+
"startDate": "2019-09-29",
553+
"endDate": "2020-09-26"
554+
},
555+
"segment": {
556+
"dimension": "us-gaap:StatementClassOfStockAxis",
557+
"value": "us-gaap:CommonStockMember"
558+
},
559+
"value": "Common Stock, $0.00001 par value per share"
560+
}
561+
],
562+
"TradingSymbol": {
563+
"period": {
564+
"startDate": "2019-09-29",
565+
"endDate": "2020-09-26"
566+
},
567+
"segment": {
568+
"dimension": "us-gaap:StatementClassOfStockAxis",
569+
"value": "us-gaap:CommonStockMember"
570+
},
571+
"value": "AAPL"
572+
},
573+
"NoTradingSymbolFlag": [
574+
{
575+
"period": {
576+
"startDate": "2019-09-29",
577+
"endDate": "2020-09-26"
578+
},
579+
"segment": {
580+
"dimension": "us-gaap:StatementClassOfStockAxis",
581+
"value": "aapl:A1.000NotesDue2022Member"
582+
},
583+
"value": "true"
584+
}
585+
],
586+
"SecurityExchangeName": [
587+
{
588+
"period": {
589+
"startDate": "2019-09-29",
590+
"endDate": "2020-09-26"
591+
},
592+
"segment": {
593+
"dimension": "us-gaap:StatementClassOfStockAxis",
594+
"value": "us-gaap:CommonStockMember"
595+
},
596+
"value": "NASDAQ"
597+
}
598+
],
599+
"EntityWellKnownSeasonedIssuer": "Yes",
600+
"EntityVoluntaryFilers": "No",
601+
"EntityCurrentReportingStatus": "Yes",
602+
"EntityInteractiveDataCurrent": "Yes",
603+
"EntityFilerCategory": "Large Accelerated Filer",
604+
"EntitySmallBusiness": "false",
605+
"EntityEmergingGrowthCompany": "false",
606+
"IcfrAuditorAttestationFlag": "true",
607+
"EntityShellCompany": "false",
608+
"EntityPublicFloat": {
609+
"decimals": "-6",
610+
"unitRef": "usd",
611+
"period": {
612+
"instant": "2020-03-27"
613+
},
614+
"value": "1070633000000"
615+
},
616+
"EntityCommonStockSharesOutstanding": {
617+
"decimals": "-3",
618+
"unitRef": "shares",
619+
"period": {
620+
"instant": "2020-10-16"
621+
},
622+
"value": "17001802000"
623+
},
624+
"AmendmentFlag": "false",
625+
"DocumentFiscalYearFocus": "2020",
626+
"DocumentFiscalPeriodFocus": "FY",
627+
"EntityCentralIndexKey": "0000320193",
628+
"CurrentFiscalYearEndDate": "--09-26"
629+
},
630+
"StatementsOfIncome": {
631+
"RevenueFromContractWithCustomerExcludingAssessedTax": [
632+
{
633+
"decimals": "-6",
634+
"unitRef": "usd",
635+
"period": {
636+
"startDate": "2019-09-29",
637+
"endDate": "2020-09-26"
638+
},
639+
"segment": {
640+
"dimension": "srt:ProductOrServiceAxis",
641+
"value": "us-gaap:ProductMember"
642+
},
643+
"value": "220747000000"
644+
}
645+
],
646+
"CostOfGoodsAndServicesSold": [],
647+
"GrossProfit": [],
648+
"ResearchAndDevelopmentExpense": [],
649+
"SellingGeneralAndAdministrativeExpense": [],
650+
"OperatingExpenses": [],
651+
"OperatingIncomeLoss": [],
652+
"NonoperatingIncomeExpense": [],
653+
"IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest": [],
654+
"IncomeTaxExpenseBenefit": [],
655+
"NetIncomeLoss": [],
656+
"EarningsPerShareBasic": [],
657+
"EarningsPerShareDiluted": [],
658+
"WeightedAverageNumberOfSharesOutstandingBasic": [],
659+
"WeightedAverageNumberOfDilutedSharesOutstanding": []
660+
},
661+
"StatementsOfComprehensiveIncome": {
662+
"NetIncomeLoss": [],
663+
"OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax": [],
664+
"OtherComprehensiveIncomeLossDerivativeInstrumentGainLossbeforeReclassificationafterTax": {
665+
"decimals": "-6",
666+
"unitRef": "usd",
667+
"period": {
668+
"startDate": "2019-09-29",
669+
"endDate": "2020-09-26"
670+
},
671+
"value": "79000000"
672+
}
673+
},
674+
"BalanceSheets": {},
675+
"BalanceSheetsParenthetical": {},
676+
"StatementsOfShareholdersEquity": {},
677+
"StatementsOfCashFlows": {},
678+
"SummaryofSignificantAccountingPolicies": {},
679+
"SummaryofSignificantAccountingPoliciesPolicies": {},
680+
"SummaryofSignificantAccountingPoliciesTables": {},
681+
"SummaryofSignificantAccountingPoliciesAdditionalInformationDetails": {},
682+
"SummaryofSignificantAccountingPoliciesComputationofBasicandDilutedEarningsPerShareDetails": {},
683+
"RevenueRecognition": {},
684+
"RevenueRecognitionTables": {},
685+
"RevenueRecognitionAdditionalInformationDetails": {},
686+
"RevenueRecognitionDeferredRevenueExpectedTimingofRealizationDetails": {},
687+
"RevenueRecognitionNetSalesDisaggregatedbySignificantProductsandServicesDetails": {},
688+
"FinancialInstruments": {},
689+
"FinancialInstrumentsTables": {},
690+
"FinancialInstrumentsCashCashEquivalentsandMarketableSecuritiesDetails": {}
691+
}
692+
}
693+
}
694+
}
695+
}
696+
},
697+
"400": {
698+
"description": "Invalid request - check parameter format",
699+
"content": {
700+
"application/json": {
701+
"schema": {
702+
"$ref": "#/components/schemas/Mvc.ValidationProblemDetails"
703+
}
704+
}
705+
}
706+
},
707+
"404": {
708+
"description": "Filing or XBRL data not found"
709+
},
710+
"500": {
711+
"description": "Server error",
712+
"content": {
713+
"application/json": {
714+
"schema": {
715+
"$ref": "#/components/schemas/Mvc.ProblemDetails"
716+
}
717+
}
718+
}
719+
}
720+
}
721+
}
487722
}
488723
},
489724
"components": {
@@ -495,46 +730,6 @@
495730
],
496731
"type": "string"
497732
},
498-
"DTO.FilingExtractResultDto": {
499-
"type": "object",
500-
"properties": {
501-
"accession_number": {
502-
"type": "string",
503-
"nullable": true
504-
},
505-
"form_type": {
506-
"type": "string",
507-
"nullable": true
508-
},
509-
"items": {
510-
"type": "array",
511-
"items": {
512-
"$ref": "#/components/schemas/DTO.FilingItemDto"
513-
},
514-
"nullable": true
515-
}
516-
},
517-
"additionalProperties": false,
518-
"description": "Represents the result of a filing extraction."
519-
},
520-
"DTO.FilingItemDto": {
521-
"type": "object",
522-
"properties": {
523-
"item_number": {
524-
"type": "string",
525-
"nullable": true
526-
},
527-
"item_title": {
528-
"type": "string",
529-
"nullable": true
530-
},
531-
"content": {
532-
"type": "string",
533-
"nullable": true
534-
}
535-
},
536-
"additionalProperties": false
537-
},
538733
"DTO.FilingMetadataDto": {
539734
"type": "object",
540735
"properties": {
@@ -759,6 +954,10 @@
759954
{
760955
"name": "FullText",
761956
"description": "Provides endpoints for performing full-text searches on historical SEC filing documents.\r\nAllows users to query filings based on various criteria such as form type, date ranges, and text content."
957+
},
958+
{
959+
"name": "XbrlConverter",
960+
"description": "Provides endpoints for converting XBRL data to JSON format from various SEC filing sources."
762961
}
763962
]
764963
}

0 commit comments

Comments
 (0)