Endpoints
/v1/financials/point-in-time
https://secfeedapi.com/v1/financials/point-in-timeFundamentals as they stood on a past date for one company: the latest XBRL value filed on or before asOf for each concept and period, with source accession and whether a later filing revised it. No cross-company as-of screens.
| Parameter | Type | Description | Example |
|---|---|---|---|
ticker | string | Ticker or CIK. | AAPL |
cik | integer | Company CIK, instead of ticker. | 320193 |
asOf | string | Date, YYYY-MM-DD. Only filings filed on or before this date are used. Default today. | 2021-01-01 |
concepts | string | Comma list of up to 12 names (the same names as key-metrics) or XBRL tags. Default revenue,netIncome,operatingIncome,assets,equity,operatingCashFlow,epsDiluted. | revenue,netIncome |
period | string | annual, quarterly, instant (balance sheet dates) or all. Default annual. | annual |
limit | integer | Periods per concept, newest first, max 20. Default 4. | 2 |
- Send ticker or cik.
- Where a company changed XBRL tags, the tag with the most recent period as of the date is used.
- laterRevisionExists is true when a filing after asOf reported a different value for the same period.
/v1/financials/restatements
https://secfeedapi.com/v1/financials/restatementsValues that changed between filings for one company: each version of a period's number with its accession, filed date and percent change.
| Parameter | Type | Description | Example |
|---|---|---|---|
ticker | string | Ticker or CIK. | AAPL |
cik | integer | Company CIK, instead of ticker. | 320193 |
concepts | string | Comma list of up to 12 names or XBRL tags. Default revenue,netIncome,operatingIncome,assets,equity,operatingCashFlow,epsDiluted. | netIncome |
period | string | annual, quarterly, instant or all. Default annual. | annual |
minChangePct | number | Only changes of at least this percent. Default 0. | 0.5 |
limit | integer | Max 100. Default 25. | 10 |
- A changed value is not always an error: accounting standard changes and reclassifications are re-reported retrospectively in later filings.
Request examples
Every response below is real output from the API, trimmed to the first records.
Revenue and net income as of a date
Only filings filed by 2021-01-01 are used; each value shows the 10-K that reported it.
curl -H "Authorization: Bearer $SECFEED_KEY" \ "https://secfeedapi.com/v1/financials/point-in-time?ticker=AAPL&asOf=2021-01-01&concepts=revenue,netIncome&limit=2"
import os, requests
r = requests.get(
"https://secfeedapi.com/v1/financials/point-in-time",
params={'ticker': 'AAPL', 'asOf': '2021-01-01', 'concepts': 'revenue,netIncome', 'limit': '2'},
headers={"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"},
timeout=60,
)
r.raise_for_status()
print(r.json()){
"cik": 320193,
"entityName": "Apple Inc.",
"asOf": "2021-01-01",
"period": "annual",
"concepts": {
"revenue": {
"tag": "RevenueFromContractWithCustomerExcludingAssessedTax",
"periods": [
{
"start": "2019-09-29",
"end": "2020-09-26",
"kind": "annual",
"unit": "USD",
"value": 274515000000,
"accessionNo": "0000320193-20-000096",
"form": "10-K",
"filed": "2020-10-30",
"fy": 2020,
"fp": "FY",
"restatedBeforeAsOf": false,
"laterRevisionExists": false
},
{
"start": "2018-09-30",
"end": "2019-09-28",
"kind": "annual",
"unit": "USD",
"value": 260174000000,
"accessionNo": "0000320193-20-000096",
"form": "10-K",
"filed": "2020-10-30",
"fy": 2020,
"fp": "FY",
"restatedBeforeAsOf": false,
"laterRevisionExists": false
}
]
},
"netIncome": {
"tag": "NetIncomeLoss",
"periods": [
{
"start": "2019-09-29",
"end": "2020-09-26",
"kind": "annual",
"unit": "USD",
"value": 57411000000,
"accessionNo": "0000320193-20-000096",
"form": "10-K",
"filed": "2020-10-30",
"fy": 2020,
"fp": "FY",
"restatedBeforeAsOf": false,
"laterRevisionExists": false
},
{
"start": "2018-09-30",
"end": "2019-09-28",
"kind": "annual",
...The same period before and after a revision
Microsoft's June 2016 and 2017 net income as first reported. laterRevisionExists marks the periods a later 10-K changed.
curl -H "Authorization: Bearer $SECFEED_KEY" \ "https://secfeedapi.com/v1/financials/point-in-time?ticker=MSFT&asOf=2017-12-31&concepts=netIncome&limit=2"
import os, requests
r = requests.get(
"https://secfeedapi.com/v1/financials/point-in-time",
params={'ticker': 'MSFT', 'asOf': '2017-12-31', 'concepts': 'netIncome', 'limit': '2'},
headers={"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"},
timeout=60,
)
r.raise_for_status()
print(r.json()){
"cik": 789019,
"entityName": "MICROSOFT CORP",
"asOf": "2017-12-31",
"period": "annual",
"concepts": {
"netIncome": {
"tag": "NetIncomeLoss",
"periods": [
{
"start": "2016-07-01",
"end": "2017-06-30",
"kind": "annual",
"unit": "USD",
"value": 21204000000,
"accessionNo": "0001564590-17-014900",
"form": "10-K",
"filed": "2017-08-02",
"fy": 2017,
"fp": "FY",
"restatedBeforeAsOf": false,
"laterRevisionExists": true
},
{
"start": "2015-07-01",
"end": "2016-06-30",
"kind": "annual",
"unit": "USD",
"value": 16798000000,
"accessionNo": "0001564590-17-014900",
"form": "10-K",
"filed": "2017-08-02",
"fy": 2017,
"fp": "FY",
"restatedBeforeAsOf": false,
"laterRevisionExists": true
}
]
}
},
"note": "Values come from the company's XBRL facts. As-of means the latest value filed on or before the date; it does not know about numbers a company stated only in press releases. Amendments are separate filings, not overwrites."
}Every revised value
Each version in filing order with accession, form, filed date and percent change.
curl -H "Authorization: Bearer $SECFEED_KEY" \ "https://secfeedapi.com/v1/financials/restatements?ticker=MSFT&concepts=netIncome&minChangePct=0.5"
import os, requests
r = requests.get(
"https://secfeedapi.com/v1/financials/restatements",
params={'ticker': 'MSFT', 'concepts': 'netIncome', 'minChangePct': '0.5'},
headers={"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"},
timeout=60,
)
r.raise_for_status()
print(r.json()){
"cik": 789019,
"entityName": "MICROSOFT CORP",
"period": "annual",
"total": 2,
"restatements": [
{
"concept": "netIncome",
"tag": "NetIncomeLoss",
"unit": "USD",
"start": "2015-07-01",
"end": "2016-06-30",
"kind": "annual",
"changePct": 22.2705,
"versions": [
{
"value": 16798000000,
"accessionNo": "0001193125-16-662209",
"form": "10-K",
"filed": "2016-07-28"
},
{
"value": 20539000000,
"accessionNo": "0001564590-18-019062",
"form": "10-K",
"filed": "2018-08-03"
}
]
},
{
"concept": "netIncome",
"tag": "NetIncomeLoss",
"unit": "USD",
"start": "2016-07-01",
"end": "2017-06-30",
"kind": "annual",
"changePct": 20.2085,
"versions": [
{
"value": 21204000000,
"accessionNo": "0001564590-17-014900",
"form": "10-K",
"filed": "2017-08-02"
},
{
"value": 25489000000,
"accessionNo": "0001564590-18-019062",
"form": "10-K",
"filed": "2018-08-03"
}
]
}
],
"note": "Values come from the company's XBRL facts. As-of means the latest value filed on or before the date; it does not know about numbers a company stated only in press releases. Amendments are separate filings, not overwrites."
}Response fields
| Field | Type | Meaning |
|---|---|---|
concepts.<name>.tag | string | XBRL tag used for the concept. |
concepts.<name>.periods[].value | number | Latest value filed on or before asOf. |
concepts.<name>.periods[].accessionNo | string | Filing that reported that value. |
concepts.<name>.periods[].restatedBeforeAsOf | boolean | True when an earlier filing before asOf showed a different value. |
concepts.<name>.periods[].firstReported | object | The first version (value, accession, filed), when restatedBeforeAsOf is true. |
concepts.<name>.periods[].laterRevisionExists | boolean | True when a filing after asOf changed the value. |
restatements[].versions[] | array | Versions oldest first: value, accessionNo, form, filed. |
restatements[].changePct | number | Change from the first to the latest version, percent. |
How to
How do I avoid look-ahead bias in a backtest?
Call point-in-time with asOf set to each rebalance date and read only the values it returns. A period that a later filing revised comes back with its original number and laterRevisionExists true.
curl -H "Authorization: Bearer $SECFEED_KEY" \ "https://secfeedapi.com/v1/financials/point-in-time?ticker=MSFT&asOf=2017-12-31&concepts=netIncome&limit=2"
Try it with your own key
Free key, no card needed.