# 📈 IEX Cloud Replacement — Stock Data API (`nexgendata/iex-cloud-replacement`) Actor

Drop-in IEX Cloud replacement. Quote, stats, chart, news endpoints. IEX-compatible response shape, Yahoo Finance backend.

- **URL**: https://apify.com/nexgendata/iex-cloud-replacement.md
- **Developed by:** [Stephan Corbeil](https://apify.com/nexgendata) (community)
- **Categories:** Business, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 📈 IEX Cloud Replacement — Stock Data API

> **Drop-in replacement for IEX Cloud.** Quote, stats, chart, news endpoints — same response shape, free-tier pricing, no API key juggling. Built for devs whose integrations broke when IEX Cloud shut down.

**Why this exists:** IEX Cloud shut down August 31, 2024 after being acquired by IEXSD. Thousands of finance dashboards, Slack bots, Zapier workflows, trading journals, and portfolio trackers went dark overnight. The official replacement path (IEX Cloud → Intrinio, Polygon, or Tiingo) is either expensive ($79+/mo), requires code rewrites, or has a much narrower free tier.

This actor returns data in IEX Cloud's **exact JSON field shape** so existing code that expects `latestPrice`, `marketCap`, `week52High`, `changePercent`, etc. continues to work with a single base-URL change.

### 🔑 Features

- **IEX-compatible response shape** — `latestPrice`, `companyName`, `changePercent`, `week52High`, `marketcap`, `peRatio`, and all the fields your code already parses
- **4 endpoint families** — `quote`, `stats`, `chart_*` (1d/5d/1m/6m/1y), `news`
- **Batch-friendly** — pass up to 50 symbols in one call, pay per symbol returned
- **Yahoo Finance backend** — free upstream source, no IEX token or monthly fee
- **Pay-per-event pricing** — $0.001 per symbol. Cheaper than any paid stock API on the market at low volume.
- **Zero browser, zero scraping** — uses the public `yfinance` library. Millisecond-latency per call.

### 💼 Common Use Cases

- **Resurrect old dashboards** — Grafana, Metabase, Retool boards that died when IEX Cloud went dark
- **Portfolio trackers** — personal finance spreadsheets using IEX Cloud /quote endpoint
- **Slack / Discord price bots** — `/price AAPL` commands wired through Zapier → Apify
- **Trading journals** — nightly snapshots of holdings with latestPrice + ytdChange
- **Robo-advisor prototypes** — factor screens based on peRatio, marketcap, beta
- **Algorithmic trading notebooks** — historical OHLCV pulled through `chart_1y`
- **News sentiment pipelines** — pull recent headlines per ticker for NLP analysis

### 📥 Input Example — Real-Time Quotes

```json
{
  "symbols": ["AAPL", "MSFT", "TSLA", "NVDA"],
  "endpoint": "quote"
}
````

### 📥 Input Example — Key Statistics

```json
{
  "symbols": ["AAPL"],
  "endpoint": "stats"
}
```

### 📥 Input Example — 1 Year Historical

```json
{
  "symbols": ["AAPL", "MSFT"],
  "endpoint": "chart_1y"
}
```

### 📥 Input Example — News Headlines

```json
{
  "symbols": ["NVDA"],
  "endpoint": "news",
  "newsLimit": 20
}
```

### 📤 Output — Quote (IEX-compatible shape)

```json
{
  "symbol": "AAPL",
  "companyName": "Apple Inc.",
  "primaryExchange": "NMS",
  "latestPrice": 228.52,
  "latestSource": "Yahoo Finance",
  "previousClose": 226.34,
  "change": 2.18,
  "changePercent": 0.00963,
  "open": 226.80,
  "high": 229.87,
  "low": 225.97,
  "volume": 48720311,
  "avgTotalVolume": 52334120,
  "marketCap": 3452893000000,
  "peRatio": 34.82,
  "week52High": 237.49,
  "week52Low": 164.08,
  "ytdChange": 0.142,
  "currency": "USD"
}
```

### 🐍 Python SDK Example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("nexgendata/iex-cloud-replacement").call(run_input={
    "symbols": ["AAPL", "MSFT", "GOOGL"],
    "endpoint": "quote"
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["symbol"], item["latestPrice"], item["changePercent"])
```

### 🌐 cURL Example

```bash
curl -X POST "https://api.apify.com/v2/acts/nexgendata~iex-cloud-replacement/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "symbols": ["AAPL", "MSFT", "TSLA"],
    "endpoint": "quote"
  }'
```

### 🔄 Migrating from IEX Cloud

If your old code looked like this:

```python
r = requests.get(f"https://cloud.iexapis.com/stable/stock/{sym}/quote?token={IEX_TOKEN}")
```

Replace with:

```python
r = requests.post(
    f"https://api.apify.com/v2/acts/nexgendata~iex-cloud-replacement/run-sync-get-dataset-items?token={APIFY_TOKEN}",
    json={"symbols": [sym], "endpoint": "quote"}
)
```

The response field names are identical (`latestPrice`, `companyName`, `marketCap`, `week52High`, etc.), so your downstream parsing code keeps working.

### 🔗 Zapier / Make.com Integration

- Google Sheets row added → Run actor with symbol → Append price data to row
- Daily trigger → Fetch watchlist quotes → Post to Slack
- Notion database → Sync market cap + PE ratio nightly

### ❓ FAQ

**Q: What data provider is behind this?**
Yahoo Finance, accessed through the public `yfinance` Python library. Data quality matches IEX Cloud's free tier.

**Q: Is this real-time or delayed?**
Near real-time during market hours (Yahoo provides 15-minute delayed quotes for most US equities; exchange-delayed or live for some). For institutional-grade real-time, use Polygon or IEX's enterprise successor.

**Q: Can I use this for algo trading?**
For paper trading, research, and non-latency-critical strategies — yes. For live production trading with tight latency requirements, use a dedicated market data feed.

**Q: What tickers are supported?**
Anything Yahoo Finance covers: US equities, international equities (with .L, .TO, .DE suffixes), ETFs, mutual funds, currency pairs, crypto. Index tickers need `^` prefix (e.g. `^GSPC`).

**Q: What happens if Yahoo Finance changes their API?**
`yfinance` is actively maintained and handles Yahoo's occasional API changes. We pin a version range that's proven stable.

**Q: Is there a rate limit?**
Apify platform sets the limit (typically hundreds of symbols per minute are fine). Yahoo Finance may throttle if you hammer 1000+ symbols back-to-back — batch sensibly.

### 💰 Pricing (Pay-Per-Event)

- **Actor start:** $0.005
- **Symbol returned:** $0.001

Typical run cost: $0.005 + $0.001 × (num symbols). A 50-symbol watchlist = $0.055. Cheaper than any tiered subscription at low volume.

### 🔗 Related NexGenData Actors

- [SaaS Pricing Tracker](https://apify.com/nexgendata/saas-pricing-tracker?fpr=2ayu9b) — track competitor SaaS pricing
- [Shopify Spy](https://apify.com/nexgendata/shopify-spy?fpr=2ayu9b) — Shopify competitive analysis
- [Google Trends Scraper](https://apify.com/nexgendata/google-trends-scraper?fpr=2ayu9b) — trend-adjust stock signals with search volume

### 🚀 Apify Affiliate Program

New to Apify? Sign up with our [referral link](https://www.apify.com/?fpr=2ayu9b) for free platform credits.

***

*An IEX Cloud drop-in for finance devs, quant hobbyists, and anyone whose dashboard died on August 31, 2024. Built by NexGenData.*

# Actor input Schema

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

List of stock tickers to fetch (e.g. AAPL, MSFT, TSLA). Up to 50 per run for best performance.

## `endpoint` (type: `string`):

Which IEX Cloud endpoint shape to return: quote (real-time price), stats (key statistics), chart\_1d/5d/1m/6m/1y (historical OHLCV), or news (headlines).

## `newsLimit` (type: `integer`):

Max number of news articles to return per symbol when endpoint=news. Ignored for other endpoints.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "MSFT",
    "TSLA"
  ],
  "endpoint": "quote",
  "newsLimit": 10
}
```

# 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",
        "TSLA"
    ],
    "endpoint": "quote",
    "newsLimit": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/iex-cloud-replacement").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",
        "TSLA",
    ],
    "endpoint": "quote",
    "newsLimit": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/iex-cloud-replacement").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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",
    "TSLA"
  ],
  "endpoint": "quote",
  "newsLimit": 10
}' |
apify call nexgendata/iex-cloud-replacement --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nexgendata/iex-cloud-replacement",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "📈 IEX Cloud Replacement — Stock Data API",
        "description": "Drop-in IEX Cloud replacement. Quote, stats, chart, news endpoints. IEX-compatible response shape, Yahoo Finance backend.",
        "version": "0.0",
        "x-build-id": "hizaboAOydQ7xypwC"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nexgendata~iex-cloud-replacement/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nexgendata-iex-cloud-replacement",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/nexgendata~iex-cloud-replacement/runs": {
            "post": {
                "operationId": "runs-sync-nexgendata-iex-cloud-replacement",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/nexgendata~iex-cloud-replacement/run-sync": {
            "post": {
                "operationId": "run-sync-nexgendata-iex-cloud-replacement",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "symbols"
                ],
                "properties": {
                    "symbols": {
                        "title": "Ticker symbols",
                        "type": "array",
                        "description": "List of stock tickers to fetch (e.g. AAPL, MSFT, TSLA). Up to 50 per run for best performance.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "endpoint": {
                        "title": "IEX Cloud endpoint",
                        "enum": [
                            "quote",
                            "stats",
                            "chart_1d",
                            "chart_5d",
                            "chart_1m",
                            "chart_6m",
                            "chart_1y",
                            "news"
                        ],
                        "type": "string",
                        "description": "Which IEX Cloud endpoint shape to return: quote (real-time price), stats (key statistics), chart_1d/5d/1m/6m/1y (historical OHLCV), or news (headlines).",
                        "default": "quote"
                    },
                    "newsLimit": {
                        "title": "News article limit (only for endpoint=news)",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Max number of news articles to return per symbol when endpoint=news. Ignored for other endpoints.",
                        "default": 10
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
