Get share repurchases
curl --request GET \
--url https://api.financialdatasets.ai/financials/share-repurchases \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.financialdatasets.ai/financials/share-repurchases"
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/share-repurchases', 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/share-repurchases",
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/share-repurchases"
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/share-repurchases")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.financialdatasets.ai/financials/share-repurchases")
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{
"share_repurchases": [
{
"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
Share Repurchases API
Share repurchases (buybacks) as reported: the shares bought and what the company paid, the shares held in treasury, and each repurchase program with its size and the dollars left, from 2016 onward.
GET
/
financials
/
share-repurchases
Get share repurchases
curl --request GET \
--url https://api.financialdatasets.ai/financials/share-repurchases \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.financialdatasets.ai/financials/share-repurchases"
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/share-repurchases', 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/share-repurchases",
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/share-repurchases"
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/share-repurchases")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.financialdatasets.ai/financials/share-repurchases")
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{
"share_repurchases": [
{
"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 share repurchases API returns a company’s share repurchases (buybacks) as the company reported them in its annual and quarterly reports: the shares bought and what the company paid, the average price when the company states it, the shares held in treasury, and each repurchase program with its size and the dollars left in it. 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 many dollars are left in Home Depot’s repurchase program?
- How many shares did Apple buy back last year, and what did it pay?
- How many shares does a company hold in treasury?
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 |
quarterly to read the three months, and six_months_ytd or nine_months_ytd to read the fiscal year so far. A first-quarter report’s year so far is the quarter itself, so it is under quarterly.
A company files no separate report for its fourth quarter, so the annual report stands in for it under quarterly, with its balances only: the shares held in treasury, the size of each program, and the dollars left in it at year end. Nothing is calculated for the fourth quarter.
Repurchase Programs
The size of a repurchase program is the amount the board approved. A company states it with the day of the approval, not with the last day of the report’s period. The API returns the size of a program, the number of shares approved, and the end date of the program under everyperiod. When a report states two sizes for one program, the API returns the newest one.
The dollars left in a program are a balance on the last day of the report’s period.
Response
Each item undershare_repurchases 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. |
rows | The rows of the table. A row is usually one repurchase program. It can also be a class of stock, a column of the statement of shareholders’ equity (such as treasury stock or retained earnings), or another split the company reports. |
| 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, shares, USD/shares for a price per share, date, duration, percent, 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. An average price appears only when the company reported one.
- A sign is never changed.
- A date is a string such as
2027-12-31with the unitdate. - A length of time is a string with the unit
duration:P3Yis 3 years.
Standard Names
Usestandard_label to find the same line at every company. The most common names:
standard_label | What it is |
|---|---|
Treasury Stock, Shares, Acquired | The shares bought in the period |
Treasury Stock, Value, Acquired, Cost Method | What the company paid for the shares bought in the period |
Stock Repurchased During Period, Shares | The shares bought in the period, as the statement of shareholders’ equity states them |
Stock Repurchased During Period, Value | The value of the shares bought in the period, as the statement of shareholders’ equity states it |
Stock Repurchased and Retired During Period, Shares | The shares bought and retired in the period |
Stock Repurchased and Retired During Period, Value | The value of the shares bought and retired in the period |
Shares Acquired, Average Cost Per Share | The average price paid per share |
Treasury Stock, Common, Shares | The shares held in treasury |
Treasury Stock, Value | The cost of the shares held in treasury |
Share Repurchase Program, Authorized, Amount | The size of a repurchase program, in dollars |
Share Repurchase Program, Authorized, Number of Shares | The size of a repurchase program, in shares |
Share Repurchase Program, Remaining Authorized, Amount | The dollars left in a repurchase program |
Share Repurchase Program, Remaining Authorized, Number of Shares | The shares left in a repurchase program |
Share Repurchase Program, Excise Tax | The excise tax on the shares bought |
Example
Share Repurchases
import requests
# add your API key to the headers
headers = {
"X-API-KEY": "your_api_key_here"
}
# set your query params
params = {
"ticker": "HD", # 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/share-repurchases"
response = requests.get(url, headers=headers, params=params)
# parse the share repurchases from the response
share_repurchases = response.json().get("share_repurchases")
# 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 share_repurchases[0]["tables"]:
print(table["name"])
print_lines(table["line_items"], " ")
for row in table["rows"]:
print(" " + row["name"])
print_lines(row["line_items"], " ")
Response
{
"share_repurchases": [
{
"ticker": "HD",
"report_period": "2026-02-01",
"fiscal_period": "FY2025",
"period": "annual",
"currency": "USD",
"accession_number": "0001628280-26-019436",
"filing_url": "https://www.sec.gov/Archives/edgar/data/354950/000162828026019436/hd-20260201.htm",
"tables": [
{
"name": "CONSOLIDATED BALANCE SHEETS",
"line_items": [
{
"label": "Treasury stock, at cost, 806 shares at February 1, 2026 and February 2, 2025",
"standard_label": "Treasury Stock, Value",
"value": 95971000000,
"unit": "USD"
}
],
"rows": []
},
{
"name": "STOCKHOLDERS' EQUITY - Summary of Reconciliation of the Number of Shares of our Common Stock Outstanding and Cash Dividends Per Share (Details)",
"line_items": [
{
"label": "Repurchases of common stock (in shares)",
"standard_label": "Stock Repurchased During Period, Shares",
"value": 0,
"unit": "shares"
},
{
"label": "Shares at end of year (in shares)",
"standard_label": "Treasury Stock, Common, Shares",
"value": 806000000,
"unit": "shares"
}
],
"rows": []
},
{
"name": "STOCKHOLDERS' EQUITY - Narrative (Details)",
"line_items": [],
"rows": [
{
"name": "2023 Share Repurchase Program",
"line_items": [
{
"label": "Share repurchase amount",
"standard_label": "Share Repurchase Program, Authorized, Amount",
"value": 15000000000,
"unit": "USD"
},
{
"label": "Remaining authorized repurchase amount",
"standard_label": "Share Repurchase Program, Remaining Authorized, Amount",
"value": 11700000000,
"unit": "USD"
}
]
}
]
}
]
}
]
}
FAQ
What is the difference between this dataset and the cash flow statement?
The cash flow statement shows the cash paid for buybacks as one number. This dataset gives the detail behind it: the number of shares bought, what the company paid, the average price when the company states it, the shares held in treasury, and each repurchase program with its size and the dollars left in it.Is the data standardized?
No. The 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 the same buyback appear in two tables?
Each table is returned as the company presents it. A company can state its buybacks in the statement of shareholders’ equity and again in a table of its own. The two numbers can differ when the company measures them in two ways, for example with and without the excise tax on buybacks.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 share repurchases: a standard share repurchase or treasury stock line, or a line on the row of a repurchase program. It includes only the amounts of the report’s own period, so an amount of an earlier year is in that year’s report. The size of a program is the one exception: see Repurchase Programs.Is the average price calculated?
No. The average price per share is in the response only when the company states it.Why does six_months_ytd return few reports for some companies?
Some companies state their buybacks for each quarter alone and give no number for the fiscal year so far. Their quarterly reports are under quarterly.
What does a company with no buybacks return?
An emptyshare_repurchases 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 share_repurchases.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