# Financial Data API - Stocks, ETFs, Funds, Indicators, YCharts (`nabeelbaghoor/financial-data-api-stocks-funds-indicators`) Actor

Pull stock metrics and history, mutual fund and ETF data, fund holdings, institutional and insider ownership, economic indicator values and time series, and your saved screens and watchlists from the YCharts API into a dataset. Bring your own API key.

- **URL**: https://apify.com/nabeelbaghoor/financial-data-api-stocks-funds-indicators.md
- **Developed by:** [Nabeel Hassan](https://apify.com/nabeelbaghoor) (community)
- **Categories:** Business, Developer tools, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 security snapshot returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Financial Data API - Stocks, ETFs, Funds, Indicators, YCharts

Export stock metrics and price history, mutual fund and ETF data and holdings, institutional and insider ownership, and economic indicator time series into an Apify dataset using your own YCharts API key.

This actor wraps the YCharts API v4. It turns a list of tickers, indicator codes or saved screen IDs into clean, deduplicated rows you can download as JSON, CSV or Excel, schedule, or feed into other actors, spreadsheets and AI agents.

### What it does

- **Stock data**: up to 25 YCharts metrics per stock (price, market cap, valuation ratios, fundamentals and more) for any number of tickers, as the latest value, the value on a chosen date, or one row per date over a range.
- **Stock metric catalogue**: every metric code the stock route accepts, with its display name and unit.
- **Stock ownership**: number of institutional and insider holders, buyers and sellers, and the shares they own, bought and sold, each dated by the filing it reflects.
- **Fund and ETF data**: YCharts' default fund metrics and info fields for mutual funds and ETFs, latest, dated or as a history.
- **Fund holdings**: the top 25 holdings of each fund, or every holding of one fund, with weights in percent.
- **Economic indicators**: search YCharts' indicator library by region, source, category or report, then read their info fields, latest value or full time series with resampling, fill and aggregation.
- **Your saved work**: list the security lists, company and fund screens and watchlists in your YCharts account, and export the securities each screen matches or each watchlist holds.
- **Pay only for results**: a symbol or code the API cannot find is recorded as a free row that says why, never charged.

### Input

| Field | Used by | What it does |
| --- | --- | --- |
| `mode` | all | One of `stockData`, `stockMetrics`, `stockOwnership`, `fundData`, `fundHoldings`, `fundAllHoldings`, `indicatorSearch`, `indicatorInfo`, `indicatorPoints`, `indicatorSeries`, `securityLists`, `screeners`, `screenerResults`, `watchlists`, `watchlistItems` |
| `symbols` | stock and fund modes | Tickers such as AAPL or SPY, one per line, sent 25 to a request |
| `metrics` | stock data | Up to 25 metric codes such as price or market_cap; empty means the default set |
| `date` | stock, fund, indicator value | The value on or before this date (YYYY-MM-DD; -N periods back for indicators) |
| `startDate`, `endDate` | stock, fund, indicator series | A range: one row per date |
| `indicatorCodes` | indicator modes | Codes such as I:USGDP or I:10YTR |
| `infoFields` | indicator info | Fields such as security_name and description |
| `resampleFrequency`, `resampleFunction`, `fillMethod`, `aggregateFunction`, `forceDateRange` | indicator series | Resampling and aggregation, as the API documents them |
| `regions`, `indicatorSources`, `indicatorCategories`, `indicatorReports` | indicator search | Filters such as USA, department_of_labor, gdp |
| `listSearch` | security lists | Words matched against list names |
| `screenerType`, `screenerIds` | screens | Company or fund screens, and which ones to export |
| `watchlistIds` | watchlist items | Which watchlists to export |
| `nameContains`, `includeMine`, `includeShared`, `includePublic`, `watchlistType`, `sortBy` | screens, watchlists | Narrow and order your saved items |
| `maxResults` | all | Row ceiling for the run |
| `apiKey` | all | Your YCharts API key (secret). Or set the `DATA_API_KEY` environment secret |

Inputs a mode does not use are left off the request and named in the log, so a stray filter never silently changes your results.

### How to get a YCharts API key

YCharts sells API access as an add-on to a YCharts subscription (the API V4 add-on). Once it is on your account, the key is shown, and can be regenerated, on the API page of your account at ycharts.com/api_v4. Paste it into the API key field. There is no free tier or self-serve trial for the API; contact YCharts sales for access.

### Example output

```json
{
    "mode": "stockData",
    "modeLabel": "Stock data",
    "recordType": "security",
    "identifier": "AAPL,MSFT",
    "found": true,
    "parentId": null,
    "symbol": "AAPL",
    "name": "Apple Inc",
    "date": "2026-10-07",
    "value": 251.32,
    "security_type": "stock",
    "price": 251.32,
    "price_date": "2026-10-07",
    "market_cap": 3741000000000,
    "market_cap_date": "2026-10-07",
    "pe_ratio": 37.9,
    "pe_ratio_date": "2026-10-07",
    "retrievedAt": "2026-10-08T09:00:00.000Z",
    "note": null
}
```

Every field the provider returns is kept. Each `[date, value]` metric becomes two columns, the value and `<metric>_date`. With a start date, each row is one date with a column per metric. `value` is the price for securities, the weight for holdings and the reading for indicators; `parentId` is the fund, screen or watchlist a row belongs to.

### FAQ

#### What is the YCharts API?

YCharts is an investment research platform used by financial advisors and asset managers. Its API gives programmatic access to the same data: curated stock metrics and fundamentals, mutual fund and ETF data and holdings (Lipper, NASDAQ and QUODD sourced), institutional and insider ownership, and a large library of economic indicators. This actor calls the v4 read endpoints under `https://api.ycharts.com/v4`, including `/stocks/{symbols}`, `/stocks/{symbol}/ownership`, `/funds/{symbols}`, `/funds/{symbols}/holdings`, `/indicators`, `/indicators/{codes}/series`, `/screeners` and `/watchlists`.

#### Do I need my own API key?

Yes. This actor is bring your own key: you need a YCharts subscription with the API V4 add-on. Your key is stored as an Apify secret, sent only in the `x-ychartsauthorization` header, and removed from every log line. Without a key the run stops immediately with a clear message and no charge.

#### How do I get price history for several stocks?

Choose Stock data, list the tickers, set `metrics` to codes such as price and market_cap, and set a start date such as 2025-01-01. Each stock then produces one row per date with a column per metric. Leave the dates empty for the latest values only.

#### How do I find the right metric or indicator codes?

Run the Stock metric catalogue mode for every stock metric code with its name and unit. For economic data, run Economic indicator search with a region such as USA or a category such as gdp; each result's `symbol` is the code to use, such as I:USGDP.

#### Can I export my YCharts screens and watchlists?

Yes. Saved screens and Watchlists list what your account can see (yours, shared with you and public, each switchable). Put the `id` values into Screen results or Watchlist items to export the matching securities. The actor only reads them; nothing in your account is changed.

#### What are the rate limits?

YCharts allows 10 requests per second and 10,000 per hour per key. The actor paces itself (120 requests per minute by default), groups up to 25 tickers or codes per request, waits out short 429 throttles, and ends cleanly with a message if the hourly allowance is used up.

#### What do I pay?

The actor charges per returned record: 0.01 USD per stock or fund snapshot, ownership summary or indicator info record; 0.005 USD per dated data point row, fund holding or reference record (metric definitions, indicator search results, security lists, screens, watchlists and watchlist items); and 0.008 USD per security matched by a screen. Apify platform usage is included. Symbols the API cannot find and empty results are free. YCharts bills your subscription separately.

#### What happens if my key is wrong or my plan lacks a feature?

A rejected key (401) or a feature your plan does not include, such as All Fund Holdings (403), ends the run cleanly with the provider's own explanation as the status message. A fund your licence does not cover is reported by YCharts as not found and becomes a free row.

### Keyword map

financial data API, stock market data API, stock fundamentals API, ETF data API, mutual fund holdings API, institutional ownership data, insider ownership, economic indicators API, macroeconomic time series, GDP and interest rate data, stock screener export, watchlist export, YCharts API, YCharts data export.

### Terms and data use

You need your own YCharts subscription with API access, and your use of the data is governed by your agreement with YCharts. YCharts' API documentation states that the API is for its customers' internal use only and that any redistribution or commercial use of data from the API is prohibited without YCharts' prior written consent. Keep exported data inside your organisation unless YCharts has agreed otherwise. Fund data is licensed by YCharts from third parties, and funds outside your licence are reported as not found. This actor is an independent tool and is not made or endorsed by YCharts.

# Actor input Schema

## `mode` (type: `string`):

Stock data and fund data read up to 25 tickers per request, as a snapshot or as one row per date over a range. Ownership, holdings and the metric catalogue describe stocks and funds. The indicator modes search and read YCharts' economic data. The last five read the security lists, screens and watchlists saved in your own YCharts account.

## `symbols` (type: `array`):

Stock data, ownership, fund data and holdings. Ticker symbols such as AAPL, MSFT or BRK.B for stocks, and VFIAX or SPY for funds and ETFs, one per line. Stock modes refuse funds and fund modes refuse stocks.

## `metrics` (type: `array`):

Stock data. Up to 25 metric codes such as price or market_cap, one per line. Leave empty for YCharts' default set of popular metrics. The stock metric catalogue mode lists every code.

## `date` (type: `string`):

Stock data, fund data and indicator value. Read each metric's latest value on or before this date, in the form YYYY-MM-DD. For the indicator value mode you can also give -N for N periods back. Takes precedence over a date range.

## `startDate` (type: `string`):

Stock data and fund data: a start date in the form YYYY-MM-DD turns the snapshot into one row per date. Indicator time series (required): a date or -N for N periods back.

## `endDate` (type: `string`):

Same modes as the start date. Stock and fund history defaults to today. Required for the indicator time series.

## `indicatorCodes` (type: `array`):

Indicator info, value and time series. Codes such as I:USGDP, I:10YTR or I:USICUI, one per line, read 25 to a request. The economic indicator search mode lists codes.

## `infoFields` (type: `array`):

Indicator info. Field names such as security_name, description, last_value, change_year_ago, data_type or adjustment. Defaults to security_name and description. A field the API does not know comes back empty with a note.

## `resampleFrequency` (type: `string`):

Indicator time series. Resample each series to this frequency. Needs a resample function too.

## `resampleFunction` (type: `string`):

Indicator time series. How values are combined when resampling.

## `fillMethod` (type: `string`):

Indicator time series. How missing values are filled.

## `aggregateFunction` (type: `string`):

Indicator time series. Return one statistic per indicator over the range instead of the series.

## `forceDateRange` (type: `boolean`):

Indicator time series. Peg the resampled series to exactly the requested dates.

## `regions` (type: `array`):

Economic indicator search. Region codes such as USA or CAN, one per line.

## `indicatorSources` (type: `array`):

Economic indicator search. Source internal names such as department_of_labor or department_of_the_treasury.

## `indicatorCategories` (type: `array`):

Economic indicator search. Category internal names such as gdp or interest_rates.

## `indicatorReports` (type: `array`):

Economic indicator search. Report internal names such as house_price_index or finra_margin_statistics.

## `listSearch` (type: `string`):

Security lists. Words matched against list names, such as dividend or s\&p 500. Leave empty to list everything.

## `screenerType` (type: `string`):

Saved screens and screen results. Company screens or fund screens.

## `screenerIds` (type: `array`):

Screen results. The numeric IDs of saved screens, from the id column of the saved screens mode, one per line.

## `watchlistIds` (type: `array`):

Watchlist items. The numeric IDs of watchlists, from the id column of the watchlists mode, one per line.

## `nameContains` (type: `string`):

Saved screens and watchlists. Only those whose name contains this text.

## `includeMine` (type: `boolean`):

Saved screens and watchlists. Include the ones you own.

## `includeShared` (type: `boolean`):

Saved screens and watchlists. Include the ones others shared with you.

## `includePublic` (type: `boolean`):

Saved screens and watchlists. Include public ones from YCharts.

## `watchlistType` (type: `string`):

Watchlists. Security watchlists, indicator watchlists, or both.

## `sortBy` (type: `string`):

Saved screens and watchlists. Most recently changed first, by name, or by owner.

## `maxResults` (type: `integer`):

The most rows this run returns and charges for, across all symbols and codes. Paged routes are read up to 500 or 1000 rows a page.

## `requestsPerMinute` (type: `integer`):

Pacing. YCharts allows 10 requests per second and 10,000 per hour per key; the actor waits and retries when the provider answers 429.

## `apiKey` (type: `string`):

Your own YCharts API key, from the API page of your YCharts account (needs the API V4 add-on). Stored as a secret and sent only in the x-ychartsauthorization header; it is never logged. You can instead set the DATA_API_KEY environment secret.

## Actor input object example

```json
{
  "mode": "stockData",
  "symbols": [
    "AAPL",
    "MSFT"
  ],
  "forceDateRange": false,
  "screenerType": "company",
  "includeMine": true,
  "includeShared": true,
  "includePublic": true,
  "watchlistType": "both",
  "sortBy": "recent",
  "maxResults": 100,
  "requestsPerMinute": 120
}
```

# Actor output Schema

## `records` (type: `string`):

One row per security, data point, holding, indicator, list, screen, watchlist or matched security.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "symbols": [
        "AAPL",
        "MSFT"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nabeelbaghoor/financial-data-api-stocks-funds-indicators").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "symbols": [
        "AAPL",
        "MSFT",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("nabeelbaghoor/financial-data-api-stocks-funds-indicators").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "symbols": [
    "AAPL",
    "MSFT"
  ]
}' |
apify call nabeelbaghoor/financial-data-api-stocks-funds-indicators --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nabeelbaghoor/financial-data-api-stocks-funds-indicators"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/QbThA6yK0oPfinL1i/builds/1hTouVeJY3RGmJX3w/openapi.json
