The SEC API allows you to search millions of SEC filings from thousands of public companies.
HTTP GET
Returns a list of SEC filing information (including the submission URL) corresponding to the given search parameters.
ticker
(required) - ticker symbol of the company to search (e.g. AAPL
for Apple).
filing
(required) - SEC filing form type.
start
(optional) - start date to search. Must be in YYYY-MM-DD
format (e.g. 2023-04-01
).
end
(optional) - end date to search. Must be in YYYY-MM-DD
format (e.g. 2023-04-01
).
contains
(optional) - query text to search within filings. Only filings containing the text will be returned.
limit
(optional) - number of results to return (by default is all results will be returned, but if you want to save bandwidth and increase response speed you can use this parameter).
X-Api-Key
(required) - API Key associated with your account.
Live Demo!
https://api.api-ninjas.com/v1/sec?ticker=
&filing=
[
{
"accession_number": "0000320193-22-000108",
"submission_url": "https://www.sec.gov/Archives/edgar/data/0000320193/000032019322000108/0000320193-22-000108.txt",
"filing_url": "https://www.sec.gov/Archives/edgar/data/0000320193/000032019322000108/aapl-20220924.htm"
},
{
"accession_number": "0000320193-21-000105",
"submission_url": "https://www.sec.gov/Archives/edgar/data/0000320193/000032019321000105/0000320193-21-000105.txt",
"filing_url": "https://www.sec.gov/Archives/edgar/data/0000320193/000032019321000105/aapl-20210925.htm"
},
{
"accession_number": "0000320193-20-000096",
"submission_url": "https://www.sec.gov/Archives/edgar/data/0000320193/000032019320000096/0000320193-20-000096.txt",
"filing_url": "https://www.sec.gov/Archives/edgar/data/0000320193/000032019320000096/aapl-20200926.htm"
},
{
"accession_number": "0000320193-19-000119",
"submission_url": "https://www.sec.gov/Archives/edgar/data/0000320193/000032019319000119/0000320193-19-000119.txt",
"filing_url": "https://www.sec.gov/Archives/edgar/data/0000320193/000032019319000119/a10-k20199282019.htm"
},
...
]
import requests
api_url = 'https://api.api-ninjas.com/v1/sec?ticker=AAPL&symbol=10-K'
response = requests.get(api_url, headers={'X-Api-Key': 'YOUR_API_KEY'})
if response.status_code == requests.codes.ok:
print(response.text)
else:
print("Error:", response.status_code, response.text)
$.ajax({
method: 'GET',
url: 'https://api.api-ninjas.com/v1/sec?ticker=AAPL&symbol=10-K',
headers: { 'X-Api-Key': 'YOUR_API_KEY'},
contentType: 'application/json',
success: function(result) {
console.log(result);
},
error: function ajaxError(jqXHR) {
console.error('Error: ', jqXHR.responseText);
}
});
const request = require('request');
request.get({
url: 'https://api.api-ninjas.com/v1/sec?ticker=AAPL&symbol=10-K',
headers: {
'X-Api-Key': 'YOUR_API_KEY'
},
}, function(error, response, body) {
if(error) return console.error('Request failed:', error);
else if(response.statusCode != 200) return console.error('Error:', response.statusCode, body.toString('utf8'));
else console.log(body)
});
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import com.fasterxml.jackson.databind.ObjectMapper;
URL url = new URL("https://api.api-ninjas.com/v1/sec?ticker=AAPL&symbol=10-K");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestProperty("accept", "application/json");
InputStream responseStream = connection.getInputStream();
ObjectMapper mapper = new ObjectMapper();
JsonNode root = mapper.readTree(responseStream);
System.out.println(root.path("fact").asText());
let url = URL(string: "https://api.api-ninjas.com/v1/sec?ticker=AAPL&symbol=10-K")!
var request = URLRequest(url: url)
request.setValue("YOUR_API_KEY", forHTTPHeaderField: "X-Api-Key")
let task = URLSession.shared.dataTask(with: request) {(data, response, error) in
guard let data = data else { return }
print(String(data: data, encoding: .utf8)!)
}
task.resume()