# AlphaScrape (`data_voyager/alphascrape`) Actor

My Apify actor analyzes earnings-day data, revenue, earnings trends, growth signals, executive commentary, and past price behavior to predict stock movement and provide confidence scores that guide investment decisions.

- **URL**: https://apify.com/data\_voyager/alphascrape.md
- **Developed by:** [Kiran Reddy](https://apify.com/data_voyager) (community)
- **Categories:** Agents, Automation, AI
- **Stats:** 32 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $50.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## NASDAQ Earnings Scraper & Swing Stock Analyzer

An Apify Actor that performs web scraping to collect upcoming earnings data from NASDAQ for companies with market capitalization of $1 billion or more. The Actor curates potential swing stocks by conducting extensive analysis on historical stock performance, company fundamentals, and forward-looking guidance to identify high-confidence trading opportunities.

### Overview

This Actor scrapes earnings calendar data from NASDAQ and performs comprehensive analysis to identify potential swing trading opportunities. By analyzing historical stock prices, quarter-over-quarter company performance metrics, and forward guidance from company leadership, the Actor filters and ranks companies to help identify stocks with the highest potential for significant price movements around earnings announcements.

The analysis includes evaluation of revenue growth, profit margins, subscription metrics (for SaaS companies), and future guidance provided by CEOs, CFOs, and other company executives. Using applied statistics, numerical analysis, and transformer-based models, the Actor computes confidence scores that indicate the likelihood of positive stock performance.

### Included Features

- **[Apify SDK](https://docs.apify.com/sdk/python/)** for Python - a toolkit for building Apify [Actors](https://apify.com/actors) and scrapers in Python
- **[Input schema](https://docs.apify.com/platform/actors/development/input-schema)** - define and easily validate a schema for your Actor's input
- **[Dataset](https://docs.apify.com/sdk/python/docs/concepts/storages#working-with-datasets)** - store structured earnings data where each object has the same attributes
- **[HTTPX](https://www.python-httpx.org)** - library for making asynchronous HTTP requests in Python
- **[Pandas](https://pandas.pydata.org/)** - powerful data manipulation and analysis library

### Analysis Methodology

The Actor performs extensive analysis to curate potential swing stocks by examining:

- **Historical Stock Price Analysis** - Evaluation of price trends and volatility patterns
- **Quarter-over-Quarter Performance** - Analysis of revenue growth, profit margins, and earnings trends
- **SaaS Metrics** - For software companies, analysis of subscription growth, churn rates, and recurring revenue
- **Forward Guidance** - Evaluation of future outlook provided by company leadership (CEO, CFO, and other executives)
- **Confidence Scoring** - Advanced statistical analysis and numerical modeling using transformers to compute confidence scores

### Output Data

The Actor returns structured data with the following fields:

- **Earning Report Date** - Date of the earnings announcement
- **Time** - Time of day (Pre-Market, After Hours, or Not Specified)
- **Symbol** - Stock ticker symbol
- **Company Name** - Full company name
- **Market Cap** - Full market capitalization value
- **Market Cap (Short)** - Abbreviated format (e.g., "2T$", "500B$", "100M$")
- **Fiscal Quarter Ending** - End date of the fiscal quarter
- **Consensus EPS Forecast** - Expected earnings per share from analysts
- **# of Ests** - Number of analyst estimates
- **Last Year's Report Date** - Date of the previous year's report
- **Last Year's EPS**\* - Earnings per share from the previous year
- **Confidence Score** - Computed score (0-100) using applied statistics, numerical analysis, and transformer models indicating confidence in potential stock performance

Data is sorted by report date (earliest first) and then by market cap (largest first).

### How It Works

1. `Actor.get_input()` retrieves the input configuration (default: 30 days ahead)
2. The Actor performs web scraping to collect earnings calendar data for the specified date range
3. Data is filtered to include only companies with market cap ≥ $1 billion
4. Extensive analysis is performed on historical performance, quarterly metrics, and forward guidance
5. Applied statistics, numerical analysis, and transformer models are used to compute confidence scores
6. Data is cleaned, formatted, and enriched with calculated fields
7. `Actor.push_data()` stores the structured earnings data in the dataset

### Input Configuration

The Actor accepts the following input parameter:

- **days\_ahead** (integer, optional, default: 30) - Number of days ahead to scrape earnings data for (range: 1-365)

### Getting Started

For complete information [see this article](https://docs.apify.com/platform/actors/development#build-actor-locally). To run the Actor locally use the following command:

```bash
apify run
```

### Deploy to Apify

#### Connect Git Repository to Apify

If you've created a Git repository for the project, you can easily connect to Apify:

1. Go to [Actor creation page](https://console.apify.com/actors/new)
2. Click on **Link Git Repository** button

#### Push Project on Your Local Machine to Apify

You can also deploy the project on your local machine to Apify without the need for the Git repository.

1. Log in to Apify. You will need to provide your [Apify API Token](https://console.apify.com/account/integrations) to complete this action.

   ```bash
   apify login
   ```

2. Deploy your Actor. This command will deploy and build the Actor on the Apify Platform. You can find your newly created Actor under [Actors -> My Actors](https://console.apify.com/actors?tab=my).

   ```bash
   apify push
   ```

### Documentation Reference

To learn more about Apify and Actors, take a look at the following resources:

- [Apify SDK for Python documentation](https://docs.apify.com/sdk/python)
- [Apify Platform documentation](https://docs.apify.com/platform)
- [Join our developer community on Discord](https://discord.com/invite/jyEM2PRvMU)

# Actor input Schema

## `days_ahead` (type: `integer`):

Number of days ahead to fetch earnings data for (default: 30).

## Actor input object example

```json
{
  "days_ahead": 30
}
```

# Actor output Schema

## `earnings` (type: `string`):

Upcoming earnings for NASDAQ companies

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("data_voyager/alphascrape").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("data_voyager/alphascrape").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 '{}' |
apify call data_voyager/alphascrape --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,data_voyager/alphascrape"
        }
    }
}

```

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/HNZrpEHXhBRcjRHrq/builds/d5VkLgdQYOAbItq4d/openapi.json
