polygon.io Scraper avatar
polygon.io Scraper

Pricing

$5.00 / 1,000 results

Go to Apify Store
polygon.io Scraper

polygon.io Scraper

Developed by

Matthias Nitsch

Matthias Nitsch

Maintained by Community

This Apify Actor fetches time series data for stock ticker symbols using the Polygon.io API. It provides historical and real-time OHLCV (Open, High, Low, Close, Volume) data with customizable time frames and parameters. ormance: Efficient data fetching and processing

4.0 (1)

Pricing

$5.00 / 1,000 results

0

1

1

Last modified

2 days ago

Polygon.io Time Series Data Scraper

This Apify Actor fetches time series data for stock ticker symbols using the Polygon.io API. It provides historical and real-time OHLCV (Open, High, Low, Close, Volume) data with customizable time frames and parameters.

๐Ÿš€ Features

  • ๐Ÿ“ˆ Comprehensive Stock Data: Get OHLCV data for any US stock ticker
  • โฑ๏ธ Flexible Time Frames: Support for minute, hour, day, week, month, quarter, and year data
  • ๐Ÿ“Š Data Insights: Automatic calculation of price ranges, volume statistics, and summary metrics
  • ๐Ÿ”ง Customizable Parameters: Adjust multipliers, date ranges, and sorting options
  • ๐Ÿ’พ Structured Output: Clean, normalized JSON data suitable for analysis and visualization
  • ๐Ÿ›ก๏ธ Error Handling: Robust error handling with detailed logging
  • ๐Ÿš€ High Performance: Efficient data fetching and processing

๐Ÿ“ฅ Input Configuration

Required Fields

  • Ticker Symbol (ticker): Stock ticker symbol (e.g., AAPL, MSFT, GOOGL)
  • Polygon.io API Key (polygonApiKey): Your API key from Polygon.io
  • From Date (fromDate): Start date in YYYY-MM-DD format
  • To Date (toDate): End date in YYYY-MM-DD format

Optional Fields

  • Timespan (timespan): Time frame for each data point (default: day)
  • Multiplier (multiplier): Multiplier for the timespan (default: 1)
  • Adjusted Prices (adjusted): Include adjusted prices for splits/dividends (default: true)
  • Sort Order (sort): Result sorting - asc or desc (default: asc)
  • Limit (limit): Maximum number of data points (default: 5000)

๐ŸŽฏ Example Input

{
"ticker": "AAPL",
"polygonApiKey": "YOUR_POLYGON_API_KEY_HERE",
"fromDate": "2023-01-01",
"toDate": "2023-01-31",
"timespan": "day",
"multiplier": 1,
"adjusted": true,
"sort": "asc",
"limit": 1000
}

๐Ÿ“Š Output Format

Summary Data

{
"ticker": "AAPL",
"totalResults": 21,
"priceRange": {
"highestPrice": 150.12,
"lowestPrice": 142.53
},
"volumeStats": {
"totalVolume": 1234567890,
"avgVolume": 58789423
}
}

Individual Data Points

{
"ticker": "AAPL",
"date": "2023-01-01",
"open": 145.23,
"high": 147.89,
"low": 144.56,
"close": 146.78,
"volume": 45632178
}

๐Ÿ› ๏ธ Quick Start

  1. Get API Key: Sign up at Polygon.io for a free API key
  2. Configure Input: Set your ticker, API key, and date range
  3. Run Actor: Execute and download your financial data
  4. Analyze: Use the structured JSON output for your analysis

๐Ÿ’ก Use Cases

  • Financial Analysis: Analyze stock price movements and trends
  • Backtesting: Test trading strategies with historical data
  • Portfolio Tracking: Monitor portfolio performance over time
  • Risk Assessment: Calculate volatility and risk metrics
  • Data Visualization: Create charts and dashboards
  • Machine Learning: Train models with financial time series data

๐Ÿ”ง Local Development

# Install dependencies
npm install
# Set your API key in INPUT.json
# Run locally
npm start

๐Ÿš€ Deployment

# Deploy to Apify
apify login
apify push

โ— Important Notes

  • Free Polygon.io accounts include 2 years of historical data
  • Rate limits apply to free accounts
  • All timestamps are in UTC
  • Data includes pre-market, regular, and after-hours sessions

๐Ÿ“ž Support

For issues or questions:

  1. Check Polygon.io API docs
  2. Review Actor logs for error details
  3. Verify your API key permissions

Happy Trading! ๐Ÿ“ˆ๐Ÿ“Š