簡體   English   中英

sec-api 模塊中的ExtractorApi 可以用於10-Q 歸檔嗎?

[英]Can ExtractorApi in sec-api module be used for 10-Q filings?

我正在嘗試使用 sec-api 模塊中的 ExtractorApi 從 10-Q 報告中提取特定部分。 該模塊適用於 10-K,但在 10-Q 的某些部分會失敗。 例如,如果我想從 10-Q 中提取第 3 項,以下代碼可以完美運行:

from sec_api import ExtractorApi 
extractorApi = ExtractorApi("YOUR API KEY") #Replace this with own API key

# 10-Q filing
filing_url = "https://www.sec.gov/Archives/edgar/data/789019/000156459021002316/msft-10q_20201231.htm"

# get the standardized and cleaned text of section
section_text = extractorApi.get_section(filing_url, "3", "text")
print(section_text)

但是當我嘗試提取項目 1A 時。 風險因素,下面的代碼返回“未定義”:

from sec_api import ExtractorApi 
extractorApi = ExtractorApi("YOUR API KEY") #Replace this with own API key

# 10-Q filing
filing_url = "https://www.sec.gov/Archives/edgar/data/789019/000156459021002316/msft-10q_20201231.htm"

# get the standardized and cleaned text of section
section_text = extractorApi.get_section(filing_url, "21A", "text") #Using 21A from the documentation of sec-api 
print(section_text)

是否有一種解決方法可以從 10-Q 文件中提取這些部分?

謝謝

是的,Extractor API 也支持提取 10-Q 文件的部分。

如果要提取項目第 1A 節(風險因素),請嘗試使用part2item1a作為項目參數而不是21A

正確的代碼如下所示:

from sec_api import ExtractorApi 
extractorApi = ExtractorApi("YOUR API KEY") # Replace this with own API key

# 10-Q filing
filing_url = "https://www.sec.gov/Archives/edgar/data/789019/000156459021002316/msft-10q_20201231.htm"

# get the standardized and cleaned text of section
section_text = extractorApi.get_section(filing_url, "part2item1a", "text") # Using part2item1a from the documentation of sec-api 
print(section_text)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM