Skip to content

Commit 6e1fd32

Browse files
committed
update openapi file
1 parent 8bd3473 commit 6e1fd32

File tree

2 files changed

+150
-1
lines changed

2 files changed

+150
-1
lines changed

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

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,93 @@
1919
}
2020
],
2121
"paths": {
22+
"/v1/download": {
23+
"get": {
24+
"tags": [
25+
"File Download"
26+
],
27+
"summary": "Download file from SEC EDGAR archive",
28+
"description": "Downloads a specific file from the SEC EDGAR archive using the accession number and filename.\nThe file is streamed directly from the SEC servers to the client.\n\n### Accession Number Format\nAccession numbers must be in the format: 0000000000-00-000000 (10 digits, dash, 2 digits, dash, 6 digits)\n\n### File Name Examples\n- Primary documents: `d123456d10k.htm`, `d789012d8k.htm`\n- XBRL files: `d123456d10k_htm.xml`, `FilingSummary.xml`\n- Exhibits: `d123456dexhibit99.htm`, `d123456dex101.htm`\n\n### File Types\nThe endpoint supports downloading various file types from SEC filings:\n- HTML documents (.htm, .html)\n- XBRL files (.xml, .xsd)\n- Text files (.txt)\n- PDF files (.pdf)\n- Other document formats as submitted to SEC\n\n:::tip\nYou can find available filenames for a specific filing using the `/v1/filings` endpoint first\n:::\n\n:::warning\nThis endpoint streams files directly from the SEC. Large files may take longer to download.\n:::",
29+
"parameters": [
30+
{
31+
"name": "accession_no",
32+
"in": "query",
33+
"description": "SEC filing accession number in format: 0000000000-00-000000",
34+
"required": true,
35+
"schema": {
36+
"pattern": "^\\d{10}-\\d{2}-\\d{6}$",
37+
"type": "string"
38+
}
39+
},
40+
{
41+
"name": "file_name",
42+
"in": "query",
43+
"description": "Name of the file to download from the filing",
44+
"required": true,
45+
"schema": {
46+
"type": "string"
47+
}
48+
}
49+
],
50+
"responses": {
51+
"200": {
52+
"description": "File downloaded successfully",
53+
"content": {
54+
"application/octet-stream": { },
55+
"text/html": { },
56+
"application/xml": { },
57+
"text/plain": { },
58+
"application/pdf": { }
59+
}
60+
},
61+
"400": {
62+
"description": "Invalid request parameters",
63+
"content": {
64+
"application/octet-stream": {
65+
"schema": {
66+
"$ref": "#/components/schemas/Mvc.ValidationProblemDetails"
67+
}
68+
},
69+
"application/json": {
70+
"schema": {
71+
"$ref": "#/components/schemas/Mvc.ValidationProblemDetails"
72+
}
73+
}
74+
}
75+
},
76+
"404": {
77+
"description": "Filing or file not found",
78+
"content": {
79+
"application/octet-stream": {
80+
"schema": {
81+
"$ref": "#/components/schemas/Mvc.ProblemDetails"
82+
}
83+
},
84+
"application/json": {
85+
"schema": {
86+
"$ref": "#/components/schemas/Mvc.ProblemDetails"
87+
}
88+
}
89+
}
90+
},
91+
"500": {
92+
"description": "Server error",
93+
"content": {
94+
"application/octet-stream": {
95+
"schema": {
96+
"$ref": "#/components/schemas/Mvc.ProblemDetails"
97+
}
98+
},
99+
"application/json": {
100+
"schema": {
101+
"$ref": "#/components/schemas/Mvc.ProblemDetails"
102+
}
103+
}
104+
}
105+
}
106+
}
107+
}
108+
},
22109
"/v1/extractor": {
23110
"get": {
24111
"tags": [
@@ -973,6 +1060,10 @@
9731060
{
9741061
"name": "XbrlConverter",
9751062
"description": "Provides endpoints for converting XBRL data to JSON format from various SEC filing sources."
1063+
},
1064+
{
1065+
"name": "Download",
1066+
"description": "Provides endpoints for downloading files directly from the SEC EDGAR archive.\nAllows users to download specific filing documents by accession number and filename."
9761067
}
9771068
]
9781069
}

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

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,62 @@ info:
1212
servers:
1313
- url: https://api.sec.finfeedapi.com
1414
paths:
15+
/v1/download:
16+
get:
17+
tags:
18+
- File Download
19+
summary: Download file from SEC EDGAR archive
20+
description: "Downloads a specific file from the SEC EDGAR archive using the accession number and filename.\nThe file is streamed directly from the SEC servers to the client.\n\n### Accession Number Format\nAccession numbers must be in the format: 0000000000-00-000000 (10 digits, dash, 2 digits, dash, 6 digits)\n\n### File Name Examples\n- Primary documents: `d123456d10k.htm`, `d789012d8k.htm`\n- XBRL files: `d123456d10k_htm.xml`, `FilingSummary.xml`\n- Exhibits: `d123456dexhibit99.htm`, `d123456dex101.htm`\n\n### File Types\nThe endpoint supports downloading various file types from SEC filings:\n- HTML documents (.htm, .html)\n- XBRL files (.xml, .xsd)\n- Text files (.txt)\n- PDF files (.pdf)\n- Other document formats as submitted to SEC\n\n:::tip\nYou can find available filenames for a specific filing using the `/v1/filings` endpoint first\n:::\n\n:::warning\nThis endpoint streams files directly from the SEC. Large files may take longer to download.\n:::"
21+
parameters:
22+
- name: accession_no
23+
in: query
24+
description: 'SEC filing accession number in format: 0000000000-00-000000'
25+
required: true
26+
schema:
27+
pattern: '^\d{10}-\d{2}-\d{6}$'
28+
type: string
29+
- name: file_name
30+
in: query
31+
description: Name of the file to download from the filing
32+
required: true
33+
schema:
34+
type: string
35+
responses:
36+
'200':
37+
description: File downloaded successfully
38+
content:
39+
application/octet-stream: { }
40+
text/html: { }
41+
application/xml: { }
42+
text/plain: { }
43+
application/pdf: { }
44+
'400':
45+
description: Invalid request parameters
46+
content:
47+
application/octet-stream:
48+
schema:
49+
$ref: '#/components/schemas/Mvc.ValidationProblemDetails'
50+
application/json:
51+
schema:
52+
$ref: '#/components/schemas/Mvc.ValidationProblemDetails'
53+
'404':
54+
description: Filing or file not found
55+
content:
56+
application/octet-stream:
57+
schema:
58+
$ref: '#/components/schemas/Mvc.ProblemDetails'
59+
application/json:
60+
schema:
61+
$ref: '#/components/schemas/Mvc.ProblemDetails'
62+
'500':
63+
description: Server error
64+
content:
65+
application/octet-stream:
66+
schema:
67+
$ref: '#/components/schemas/Mvc.ProblemDetails'
68+
application/json:
69+
schema:
70+
$ref: '#/components/schemas/Mvc.ProblemDetails'
1571
/v1/extractor:
1672
get:
1773
tags:
@@ -712,4 +768,6 @@ tags:
712768
- name: FullText
713769
description: "Provides endpoints for performing full-text searches on historical SEC filing documents.\nAllows users to query filings based on various criteria such as form type, date ranges, and text content."
714770
- name: XbrlConverter
715-
description: Provides endpoints for converting XBRL data to JSON format from various SEC filing sources.
771+
description: Provides endpoints for converting XBRL data to JSON format from various SEC filing sources.
772+
- name: Download
773+
description: "Provides endpoints for downloading files directly from the SEC EDGAR archive.\nAllows users to download specific filing documents by accession number and filename."

0 commit comments

Comments
 (0)