polygon.io Scraper avatar
polygon.io Scraper

Pricing

$1.00 / 1,000 results

Go to Apify Store
polygon.io Scraper

polygon.io 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. ormance: Efficient data fetching and processing

Pricing

$1.00 / 1,000 results

Rating

4.0

(1)

Developer

Matthias Nitsch

Matthias Nitsch

Maintained by Community

Actor stats

1

Bookmarked

2

Total users

1

Monthly active users

a month ago

Last modified

Share

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! πŸ“ˆπŸ“Š