Created
July 21, 2021 16:09
-
-
Save janlukasschroeder/8be8a0a299f6c5ba68939a92a82945aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
api_endpoint = "https://api.sec-api.io/extractor" | |
# 10-K filing URL | |
filing_url = "https://www.sec.gov/Archives/edgar/data/1318605/000156459021004599/tsla-10k_20201231.htm" | |
# list the items you want to extract. | |
# seperate multiple items with comma, e.g. "1A,2,5" | |
item = "1A" | |
# add your API key | |
api_key = "YOUR_API_KEY" | |
url = api_endpoint + "?url=" + filing_url + "&item=" + item + "&token=" + api_key | |
# perform an API request to get all items | |
response = requests.get(url) | |
print(response.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment