Getting SEC EDGAR Filings via API Without Scraping
When working on financial applications that require real-time access to SEC filings such as 10-K and 10-Q documents, you might be tempted to scrape data from the SEC's EDGAR system. However, this approach can be cumbersome and may not always provide up-to-date information due to delays in updates.
A more practical solution is to use an API that provides these filings directly. One such API endpoint is api.verilexdata.com/api/v1/sec/sample. This service claims to update its data every 15 minutes, allowing you to search by company or form type and receiving real-time updates without the need for manual scraping.
Example Python Code
Here’s a simple example of how you can use this API in a Python script:
python
import requests
def get_sec_filings(company_name=None, form_type='10-K'):
url = 'https://api.verilexdata.com/api/v1/sec/sample'
params = {
'company': company_name,
'formType': form_type
}
response = requests.get(url, params=params)
if response.status_code != 200:
raise Exception(f"Request failed with status {response.status_code}")
return response.json()
# Example usage to get filings for a specific
Top comments (0)