简体   繁体   English

sec-api 模块中的ExtractorApi 可以用于10-Q 归档吗?

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

I am trying to extract specific sections from the 10-Q report using ExtractorApi from sec-api module.我正在尝试使用 sec-api 模块中的 ExtractorApi 从 10-Q 报告中提取特定部分。 The module works for 10-K, however, it fails with certain sections for the 10-Q.该模块适用于 10-K,但在 10-Q 的某些部分会失败。 For example, if I want to extract item 3 from 10-Q, the following code works perfectly:例如,如果我想从 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)

But when I try to extract Item 1A.但是当我尝试提取项目 1A 时。 Risk Factors, the code below returns 'undefined':风险因素,下面的代码返回“未定义”:

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)

Is there a workaround to extract these sections from 10-Q filings?是否有一种解决方法可以从 10-Q 文件中提取这些部分?

Thanks谢谢

Yes, the Extractor API supports the extraction of sections of 10-Q filings as well.是的,Extractor API 也支持提取 10-Q 文件的部分。

If you want to extract item section 1A (risk factors), try using part2item1a as item parameter instead of 21A .如果要提取项目第 1A 节(风险因素),请尝试使用part2item1a作为项目参数而不是21A

The correct code looks like this:正确的代码如下所示:

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