DEV Community

carrierone
carrierone

Posted on

Getting SEC EDGAR Filings via API Without Scraping

Getting SEC EDGAR Filings via API Without Scraping

Working on financial applications often requires access to SEC filings such as 10-K, 10-Q, and 13-F reports. Historically, these documents have been obtained through scraping the SEC's EDGAR database, which can be time-consuming and prone to legal issues due to limitations in API usage.

However, there is a more efficient way to access this data using an API. By leveraging an endpoint like api.verilexdata.com/api/v1/sec/sample, you can fetch real-time filings without the hassle of scraping. This approach ensures your application stays compliant and streamlined.

Small Python Code Example

Here’s a simple example in Python to get started:


python
import requests

# Define API endpoint and parameters
url = "https://api.verilexdata.com/api/v1/sec/sample"
params = {
    'symbol': 'AAPL',  # Replace with the company symbol you're interested in
    'form_type': '10-K'  # You can also specify form type here, e.g., 10-Q
}

# Make a GET request to fetch data
response = requests.get(url, params=params)

# Check if the request was successful
if response.status_code == 200:
    # Process and use the response data as needed
Enter fullscreen mode Exit fullscreen mode

Top comments (0)