Get investment securities
curl --request GET \
--url https://api.financialdatasets.ai/financials/investment-securities \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.financialdatasets.ai/financials/investment-securities"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.financialdatasets.ai/financials/investment-securities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.financialdatasets.ai/financials/investment-securities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.financialdatasets.ai/financials/investment-securities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.financialdatasets.ai/financials/investment-securities")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.financialdatasets.ai/financials/investment-securities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"investment_securities": [
{
"ticker": "<string>",
"report_period": "2023-12-25",
"fiscal_period": "<string>",
"period": "annual",
"currency": "<string>",
"accession_number": "<string>",
"filing_url": "<string>",
"tables": [
{
"name": "<string>",
"line_items": [
{
"label": "<string>",
"standard_label": "<string>",
"value": 123,
"unit": "<string>"
}
],
"rows": [
{
"name": "<string>",
"line_items": [
{
"label": "<string>",
"standard_label": "<string>",
"value": 123,
"unit": "<string>"
}
]
}
]
}
]
}
],
"next_page_url": "<string>"
}{
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"error": "Unauthorized",
"message": "Invalid API key provided"
}{
"error": "Payment Required",
"message": "This endpoint requires a paid subscription. Please upgrade your plan."
}Datasets
Investment Securities API
Investment securities as reported: the bonds and shares a company holds as investments, by kind of security, with cost, unrealized gains and losses, fair value, and when the bonds come due, from 2016 onward.
GET
/
financials
/
investment-securities
Get investment securities
curl --request GET \
--url https://api.financialdatasets.ai/financials/investment-securities \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.financialdatasets.ai/financials/investment-securities"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.financialdatasets.ai/financials/investment-securities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.financialdatasets.ai/financials/investment-securities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.financialdatasets.ai/financials/investment-securities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.financialdatasets.ai/financials/investment-securities")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.financialdatasets.ai/financials/investment-securities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"investment_securities": [
{
"ticker": "<string>",
"report_period": "2023-12-25",
"fiscal_period": "<string>",
"period": "annual",
"currency": "<string>",
"accession_number": "<string>",
"filing_url": "<string>",
"tables": [
{
"name": "<string>",
"line_items": [
{
"label": "<string>",
"standard_label": "<string>",
"value": 123,
"unit": "<string>"
}
],
"rows": [
{
"name": "<string>",
"line_items": [
{
"label": "<string>",
"standard_label": "<string>",
"value": 123,
"unit": "<string>"
}
]
}
]
}
]
}
],
"next_page_url": "<string>"
}{
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"error": "Unauthorized",
"message": "Invalid API key provided"
}{
"error": "Payment Required",
"message": "This endpoint requires a paid subscription. Please upgrade your plan."
}Overview
The Financial Datasets investment securities API returns the bonds and shares a company holds as investments, as the company reported them in its annual and quarterly reports: each kind of security (US Treasury securities, corporate bonds, mortgage-backed securities) with its cost, its unrealized gains and losses, and its fair value, when the bonds come due, the bonds that are worth less than their cost and for how long, and the gains and losses on what the company sold. Stakes that give the company a say in another company, and shares of private companies, are in Equity Investments. You can call it as a REST endpoint with an API key, or from Claude, ChatGPT, Cursor, and other AI apps through the MCP server, or pay per request with x402. Pricing starts at $20. Use it to answer questions like:- How much does Apple hold in US Treasury securities, and what did it pay for them?
- How large are JPMorgan’s unrealized losses on the bonds it holds to maturity?
- When do Nvidia’s bonds come due?
Coverage
| Companies | History | Updated |
|---|---|---|
| US companies | From 2016 | Within minutes of each new report |
Filtering the Data
tickerorcik: one is required.period(required):annual,quarterly,six_months_ytd, ornine_months_ytd. There is nottm.limit: the maximum number of report periods to return, newest first (default 4, maximum 20). Each page holds up to 10 periods, linked bynext_page_url.report_period,report_period_gte,report_period_lte,report_period_gt,report_period_lt: filter by report period date (YYYY-MM-DD).
Periods
period | Reports | Lines of each item | fiscal_period |
|---|---|---|---|
annual | Each annual report | All lines | FY2025 |
quarterly | Each quarterly report, and the annual report as the fourth quarter | The balances, and the numbers of the three months | 2025-Q3 |
six_months_ytd | Each second-quarter report | The balances, and the numbers of the first six months of the fiscal year | 2025-6M |
nine_months_ytd | Each third-quarter report | The balances, and the numbers of the first nine months of the fiscal year | 2025-9M |
period returns them. The gains and losses on securities the company sold, and the interest it earned, are numbers for a span of time. A quarterly report can state those for the three months, for the fiscal year so far, or both. Use quarterly to read the three months, and six_months_ytd or nine_months_ytd to read the fiscal year so far.
A company files no separate report for its fourth quarter, so the annual report stands in for it under quarterly, with its balances only. Nothing is calculated for the fourth quarter.
Available for Sale and Held to Maturity
A company sorts its bonds into two main groups, and the standard names keep them apart:| Group | On the balance sheet at | Names start with |
|---|---|---|
| Available for sale | Fair value | Debt Securities, Available-for-Sale |
| Held to maturity | Cost | Debt Securities, Held-to-Maturity |
With and Without Accrued Interest
A company can state the cost and the fair value of its bonds with the interest earned and not yet received, or without it. The standard names differ:Debt Securities, Available-for-Sale and Debt Securities, Available-for-Sale, Excluding Accrued Interest are two lines, and a company reports one of them. To find the fair value at every company, look for both names.
Rows
A row is usually one kind of security. Apple’s report at September 26, 2026 has the rowU.S. Treasury securities | Level 2, with the cost, the unrealized gains, the unrealized losses, and the fair value of those bonds. The parts of a row name and their order are the company’s own; Level 2 says how the fair value was measured.
Response
Each item underinvestment_securities is one report. It carries ticker, report_period, fiscal_period, period, currency, accession_number, and filing_url (a link to the report), and tables, in the company’s own order.
A table:
| Field | Meaning |
|---|---|
name | The company’s own title of the table. |
line_items | The lines for the company as a whole, such as the totals of all securities. |
rows | The rows of the table. A row is usually one kind of security. |
| Field | Meaning |
|---|---|
name | The company’s own words for the row. When the company names a row in two or more parts, the parts are joined with |. |
line_items | The lines of that row. |
| Field | Meaning |
|---|---|
label | The company’s own words for the line. |
standard_label | The standard accounting name of the line, the same at every company. null for a line the company defined itself. |
value | The value as the company filed it. |
unit | The unit of the value: a currency code such as USD, percent, duration, date, pure for a plain number such as a ratio, or a unit the company defined itself. |
"rows": [], and a table with rows only has "line_items": [].
Every value is the number the company filed:
- Nothing is calculated. A total appears only when the company reported one.
- A sign is never changed. An unrealized loss is usually filed as a positive number.
Standard Names
Usestandard_label to find the same line at every company. The most common names:
standard_label | What it is |
|---|---|
Debt Securities, Available-for-Sale | The fair value of the bonds available for sale |
Debt Securities, Available-for-Sale, Amortized Cost | The cost of those bonds |
Debt Securities, Available-for-Sale, Accumulated Gross Unrealized Gain, before Tax | The unrealized gains on those bonds |
Debt Securities, Available-for-Sale, Accumulated Gross Unrealized Loss, before Tax | The unrealized losses on those bonds |
Debt Securities, Available-for-Sale, Excluding Accrued Interest | The fair value of those bonds, without accrued interest |
Debt Securities, Available-for-Sale, Continuous Unrealized Loss Position, Less than 12 Months | The fair value of the bonds that have been worth less than their cost for under a year |
Debt Securities, Available-for-Sale, Fair Value, Maturity, Allocated and Single Maturity Date, Year One | The fair value of the bonds that come due within one year. Later bands follow |
Debt Securities, Available-for-Sale, Realized Gain (Loss) | The gain or loss on the bonds the company sold |
Debt Securities, Held-to-Maturity, Fair Value | The fair value of the bonds held to maturity |
Debt Securities, Held-to-Maturity, Accumulated Unrecognized Loss | The unrealized losses on the bonds held to maturity |
Equity Securities, FV-NI | The listed shares the company holds, at the market price |
Marketable Securities | Bonds and listed shares stated as one line |
Example
Investment Securities
import requests
# add your API key to the headers
headers = {
"X-API-KEY": "your_api_key_here"
}
# set your query params
params = {
"ticker": "AAPL", # stock ticker
"period": "annual", # annual, quarterly, six_months_ytd, or nine_months_ytd
"limit": 1, # number of report periods to return
}
# make API request
url = "https://api.financialdatasets.ai/financials/investment-securities"
response = requests.get(url, headers=headers, params=params)
# parse the investment securities from the response
investment_securities = response.json().get("investment_securities")
# print the latest report: each table, its lines, and its rows
def print_lines(line_items, indent):
for line in line_items:
print(f"{indent}{line['label']}: {line['value']} {line['unit']}")
for table in investment_securities[0]["tables"]:
print(table["name"])
print_lines(table["line_items"], " ")
for row in table["rows"]:
print(" " + row["name"])
print_lines(row["line_items"], " ")
Response
{
"investment_securities": [
{
"ticker": "AAPL",
"report_period": "2026-09-26",
"fiscal_period": "FY2026",
"period": "annual",
"currency": "USD",
"accession_number": "0000320193-26-000026",
"filing_url": "https://www.sec.gov/Archives/edgar/data/320193/000032019326000026/aapl-20260926.htm",
"tables": [
{
"name": "Financial Instruments - Cash, Cash Equivalents and Marketable Securities (Details)",
"line_items": [
{
"label": "Current Marketable Securities",
"standard_label": "Marketable Securities, Current",
"value": 20417000000,
"unit": "USD"
},
{
"label": "Non-Current Marketable Securities",
"standard_label": "Marketable Securities, Noncurrent",
"value": 80213000000,
"unit": "USD"
}
],
"rows": [
{
"name": "U.S. Treasury securities | Level 2",
"line_items": [
{
"label": "Marketable Securities, Debt, Adjusted Cost",
"standard_label": "Debt Securities, Available-for-Sale, Amortized Cost",
"value": 19413000000,
"unit": "USD"
},
{
"label": "Marketable Securities, Debt, Unrealized Gains",
"standard_label": "Debt Securities, Available-for-Sale, Accumulated Gross Unrealized Gain, before Tax",
"value": 1000000,
"unit": "USD"
},
{
"label": "Marketable Securities, Debt, Unrealized Losses",
"standard_label": "Debt Securities, Available-for-Sale, Accumulated Gross Unrealized Loss, before Tax",
"value": 507000000,
"unit": "USD"
},
{
"label": "Marketable Securities, Debt, Fair Value",
"standard_label": "Debt Securities, Available-for-Sale",
"value": 18907000000,
"unit": "USD"
},
{
"label": "Current Marketable Securities",
"standard_label": "Marketable Securities, Current",
"value": 4793000000,
"unit": "USD"
},
{
"label": "Non-Current Marketable Securities",
"standard_label": "Marketable Securities, Noncurrent",
"value": 14087000000,
"unit": "USD"
}
]
},
{
"name": "U.S. agency securities | Level 2",
"line_items": [
{
"label": "Marketable Securities, Debt, Adjusted Cost",
"standard_label": "Debt Securities, Available-for-Sale, Amortized Cost",
"value": 5164000000,
"unit": "USD"
},
{
"label": "Marketable Securities, Debt, Unrealized Gains",
"standard_label": "Debt Securities, Available-for-Sale, Accumulated Gross Unrealized Gain, before Tax",
"value": 0,
"unit": "USD"
},
{
"label": "Marketable Securities, Debt, Unrealized Losses",
"standard_label": "Debt Securities, Available-for-Sale, Accumulated Gross Unrealized Loss, before Tax",
"value": 106000000,
"unit": "USD"
},
{
"label": "Marketable Securities, Debt, Fair Value",
"standard_label": "Debt Securities, Available-for-Sale",
"value": 5058000000,
"unit": "USD"
},
{
"label": "Current Marketable Securities",
"standard_label": "Marketable Securities, Current",
"value": 2459000000,
"unit": "USD"
},
{
"label": "Non-Current Marketable Securities",
"standard_label": "Marketable Securities, Noncurrent",
"value": 2034000000,
"unit": "USD"
}
]
},
{
"name": "Corporate debt securities | Level 2",
"line_items": [
{
"label": "Marketable Securities, Debt, Adjusted Cost",
"standard_label": "Debt Securities, Available-for-Sale, Amortized Cost",
"value": 48229000000,
"unit": "USD"
},
{
"label": "Marketable Securities, Debt, Unrealized Gains",
"standard_label": "Debt Securities, Available-for-Sale, Accumulated Gross Unrealized Gain, before Tax",
"value": 29000000,
"unit": "USD"
},
{
"label": "Marketable Securities, Debt, Unrealized Losses",
"standard_label": "Debt Securities, Available-for-Sale, Accumulated Gross Unrealized Loss, before Tax",
"value": 1323000000,
"unit": "USD"
},
{
"label": "Marketable Securities, Debt, Fair Value",
"standard_label": "Debt Securities, Available-for-Sale",
"value": 46935000000,
"unit": "USD"
},
{
"label": "Current Marketable Securities",
"standard_label": "Marketable Securities, Current",
"value": 9875000000,
"unit": "USD"
},
{
"label": "Non-Current Marketable Securities",
"standard_label": "Marketable Securities, Noncurrent",
"value": 36960000000,
"unit": "USD"
}
]
}
]
}
]
}
]
}
FAQ
What is the difference between this dataset and the balance sheet?
The balance sheet shows the securities as one or two numbers. This dataset gives the detail: each kind of security, its cost, its unrealized gains and losses, its fair value, and when the bonds come due.What is the difference between this dataset and Equity Investments?
This dataset holds the bonds and the listed shares a company holds as a portfolio. Equity Investments holds the stakes that give the company a say in another company, such as a joint venture, and the shares of private companies.Is the data standardized?
No. The rows and lines are the company’s own, in the company’s own order. Each standard line also carriesstandard_label, a name that is the same at every company, so you can find the same line across companies.
Why does a bank report a loss here that is not on its balance sheet?
A bond held to maturity is on the balance sheet at its cost. When interest rates rise, its fair value falls below the cost, and the company reports the difference as an unrealized loss in its report, not on the balance sheet.Why is a number from the report not in the response?
The dataset includes a line only when it is certain that the line is about investment securities: a standard line of such securities, or a line the company defined itself in a table of such lines. A line the company defined itself in a table of several subjects, such as a table that also lists cash, is left out. The dataset includes only the amounts of the report’s own period, so an amount of an earlier year is in that year’s report.What does a company with no investment securities return?
An emptyinvestment_securities list. An empty response is not charged.
How far back does the data go?
To 2016.Which periods are available?
Annual, quarterly, the first six months, and the first nine months of the fiscal year. There is no TTM.Can an AI agent use this data?
Yes. Claude, ChatGPT, Cursor, and other MCP clients reach it through the Financial Datasets MCP server, with theget_financials tool and the dataset investment_securities.
Related
Announcement
Introducing the Investment Securities API, on the Financial Datasets news page.
MCP server
Use Investment Securities from Claude, ChatGPT, Cursor, and other AI apps.
Query Parameters
The kind of report. annual returns each annual report. quarterly returns each quarterly report, and the annual report as the fourth quarter with its balances only. six_months_ytd and nine_months_ytd return the second-quarter and third-quarter reports with the numbers of the fiscal year so far.
Available options:
annual, quarterly, six_months_ytd, nine_months_ytd