# Stock Information (investing.com) (`pintostudio/stock-information-investing-com`) Actor

The Stock Information Data (Investing.com) Actor is a powerful web scraping tool that fetches comprehensive fundamental stock information from Investing.com.

- **URL**: https://apify.com/pintostudio/stock-information-investing-com.md
- **Developed by:** [Pinto Studio](https://apify.com/pintostudio) (community)
- **Categories:** Developer tools, AI, Automation
- **Features:** Limited permissions
- **Stats:** 131 total users, 7 monthly users, 81.8% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

$7.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?

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

## Stock Information Data (Investing.com) - Actor Documentation

### Overview

The **Stock Information Data (Investing.com)** Actor is a powerful web scraping tool that fetches comprehensive fundamental stock information from Investing.com. This Actor provides detailed financial data for stocks listed across 44 different countries, making it an essential tool for financial analysis, investment research, and market monitoring.

### Features

- **Global Coverage**: Supports stocks from 44 countries including major markets like US, UK, Germany, Spain, Japan, and more
- **Comprehensive Data**: Retrieves detailed fundamental information including financials, ratios, and market data
- **Real-time Information**: Fetches current stock prices, market cap, trading volume, and other live market data
- **Extended Market Data**: Includes pre-market and after-hours trading information
- **Structured Output**: Returns data in JSON format with metadata for easy integration
- **Error Handling**: Robust error handling with detailed logging and validation

### Input Parameters

#### Required Parameters

| Parameter | Type | Description | Example |
|-----------|------|-------------|---------|
| `stockSymbol` | string | Stock ticker symbol (1-10 characters) | `"AAPL"`, `"BBVA"`, `"MSFT"` |

#### Optional Parameters

| Parameter | Type | Description | Default | Options |
|-----------|------|-------------|---------|---------|
| `country` | string | Country where the stock is listed | `"united states"` | See supported countries below |

#### Supported Countries

The Actor supports stocks from the following 44 countries:

- **Europe**: Spain, United Kingdom, Germany, France, Italy, Netherlands, Belgium, Portugal, Austria, Switzerland, Norway, Sweden, Denmark, Finland, Poland, Czech Republic, Hungary, Greece, Turkey, Russia
- **Americas**: United States, Canada, Brazil, Mexico, Argentina, Chile, Colombia, Peru
- **Asia-Pacific**: China, Japan, South Korea, India, Australia, Malaysia, Singapore, Thailand, Indonesia, Philippines, Vietnam, Taiwan, Hong Kong, New Zealand
- **Middle East & Africa**: Israel, Saudi Arabia, United Arab Emirates, South Africa

### Output Data Structure

The Actor returns a comprehensive JSON object containing:

#### Main Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `stock` | string | Input stock symbol |
| `country` | string | Input country (lowercase) |
| `as_json` | boolean | Data format flag (always true) |
| `retrieved_at` | string | ISO timestamp of data retrieval |
| `data_format` | string | Format type ("json") |
| `stock_symbol` | string | Actual ticker symbol from source |
| `stock_information` | object | Complete stock data (see below) |
| `has_data` | boolean | Indicates if data was successfully retrieved |

#### Stock Information Object

The `stock_information` object contains detailed fundamental and market data:

##### Company Information

- `instrumentId`: Unique identifier from Investing.com
- `isin`: International Securities Identification Number
- `companyName`: Full company name
- `tickerSymbol`: Stock ticker symbol
- `exchange`: Full exchange name
- `exchangeSymbol`: Exchange abbreviation
- `employees`: Number of employees
- `description`: Detailed company description
- `industry`: Industry classification with link
- `market`: Market information with link
- `sector`: Sector classification with link

##### Price & Market Data

- `lastPrice`: Current stock price
- `change`: Price change from previous close
- `changePercent`: Percentage change from previous close
- `openPrice`: Opening price for the day
- `highPrice`: Daily high price
- `lowPrice`: Daily low price
- `currency`: Trading currency
- `52WeekHigh`: 52-week high price
- `52WeekLow`: 52-week low price
- `volume`: Trading volume
- `marketCap`: Market capitalization

##### Financial Ratios & Metrics

- `EPS(Earnings Per Share)`: Earnings per share
- `P/E_Ratio`: Price-to-earnings ratio
- `dividendYield`: Dividend yield percentage
- `beta`: Stock's beta coefficient
- `1_Year_Return`: One-year return percentage
- `next_Earnings_Date`: Next earnings announcement date

##### Extended Trading Data

The `allPrices` object includes additional market data:

- Pre-market and after-hours pricing
- Extended trading hours information
- Detailed price precision settings
- Last update timestamps

### Example Usage

#### Basic Usage

```json
{
  "stockSymbol": "AAPL"
}
```

#### With Country Specification

```json
{
  "stockSymbol": "BBVA",
  "country": "spain"
}
```

#### European Stock Example

```json
{
  "stockSymbol": "SAP",
  "country": "germany"
}
```

### Example Output

```json
{
  "stock": "AAPL",
  "country": "united states",
  "as_json": true,
  "retrieved_at": "2025-07-01T11:28:57.663299",
  "data_format": "json",
  "stock_symbol": "AAPL",
  "stock_information": {
    "instrumentId": "6408",
    "isin": "US0378331005",
    "companyName": "Apple Inc",
    "tickerSymbol": "AAPL",
    "exchange": "Nasdaq Stock Exchange",
    "exchangeSymbol": "NASDAQ",
    "employees": 164000,
    "description": "Apple Inc. designs, manufactures, and markets smartphones...",
    "industry": {
      "name": "Computers, Phones & Household Electronics",
      "link": "/stock-screener/united-states/technology/computers-phones-and-household-electronics"
    },
    "market": {
      "name": "United States",
      "link": "/markets/united-states"
    },
    "sector": {
      "name": "Technology",
      "link": "/stock-screener/united-states/technology"
    },
    "lastPrice": 205.17,
    "change": 4.09,
    "changePercent": 2.03,
    "openPrice": 202.01,
    "highPrice": 207.39,
    "lowPrice": 199.26,
    "currency": "USD",
    "52WeekHigh": 260.1,
    "52WeekLow": 169.21,
    "volume": null,
    "marketCap": "3.06T",
    "EPS(Earnings Per Share)": 6.43,
    "P/E_Ratio": 31.82,
    "dividendYield": 0.51,
    "beta": 1.27,
    "1_Year_Return": -2.59,
    "next_Earnings_Date": "2025-07-23 00:00:00",
    "allPrices": {
      "instrumentId": "6408",
      "open": 202.01,
      "lastClose": 205.17,
      "currency": "USD",
      "isDelayed": false,
      "lastUpdateTime": "1751313599000",
      "fiftyTwoWeekHigh": 260.1,
      "fiftyTwoWeekLow": 169.21,
      "last": 205.17,
      "changePcr": 2.03,
      "change": 4.09,
      "premarketPrice": 205.55,
      "premarketChange": 0.38,
      "premarketChangePercent": 0.19,
      "afterHoursPrice": 205.55,
      "afterHoursChange": 0.38,
      "afterHoursChangePercent": 0.19,
      "showExtendedHours": "PreMarket",
      "high": 207.39,
      "low": 199.26
    }
  },
  "has_data": true
}
```

### Error Handling

The Actor includes comprehensive error handling for various scenarios:

#### Input Validation Errors

- **Empty Stock Symbol**: Returns validation error if stock symbol is empty or invalid
- **Invalid Country**: Returns validation error if country parameter is invalid
- **Parameter Type Errors**: Validates that parameters are of correct data types

#### Runtime Errors

- **Connection Errors**: Handles network connectivity issues
- **IO Errors**: Manages file system and data access problems
- **Runtime Errors**: Catches unexpected runtime exceptions
- **Data Not Found**: Gracefully handles cases where stock data is unavailable

#### Error Response Format

When errors occur, the Actor returns structured error information:

```json
{
  "stock": "INVALID",
  "country": "united states",
  "has_data": false,
  "error": "Validation error: stock must be a non-empty string",
  "retrieved_at": "2025-07-01T11:28:57.663299"
}
```

### Use Cases

#### Financial Analysis

- Portfolio management and tracking
- Investment research and due diligence
- Risk assessment using beta and volatility metrics
- Comparative analysis across markets

#### Market Monitoring

- Real-time price tracking
- Market capitalization monitoring
- Volume analysis
- Pre-market and after-hours activity tracking

#### Data Integration

- Feeding financial dashboards
- Integration with trading systems
- Data warehouse population
- API backend for financial applications

#### Research & Reporting

- Fundamental analysis reports
- Market research studies
- Academic financial research
- Investment newsletter automation

### Performance & Limits

#### Rate Limiting

- The Actor respects Investing.com's rate limits
- Recommended to add delays between requests for bulk operations
- Monitor your usage to avoid being blocked

#### Data Freshness

- Real-time data during market hours
- Pre-market and after-hours data when available
- Historical reference points (52-week high/low, etc.)

#### Reliability

- Built-in retry mechanisms for transient failures
- Comprehensive logging for troubleshooting
- Graceful degradation when partial data is available

### Best Practices

#### Input Optimization

1. **Use Correct Symbols**: Ensure stock symbols match those used on Investing.com
2. **Country Matching**: Select the correct country for the stock's primary listing
3. **Symbol Validation**: Verify symbols exist before bulk processing

#### Error Handling

1. **Check `has_data` Field**: Always verify data availability before processing
2. **Handle Partial Data**: Some fields may be null or unavailable
3. **Implement Retries**: Add retry logic for transient failures

#### Data Processing

1. **Timestamp Tracking**: Use `retrieved_at` for data freshness validation
2. **Currency Awareness**: Consider currency when comparing prices across markets
3. **Market Hours**: Account for different market hours across countries

### Integration Examples

#### Python Integration

```python
import requests

## Run the Actor
response = requests.post(
    'https://api.apify.com/v2/acts/the-actor-id/runs',
    headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
    json={
        'stockSymbol': 'AAPL',
        'country': 'united states'
    }
)

## Process results
if response.status_code == 200:
    run_data = response.json()
    # Handle the stock data
```

#### JavaScript Integration

```javascript
const axios = require('axios');

async function getStockData(symbol, country = 'united states') {
    try {
        const response = await axios.post(
            'https://api.apify.com/v2/acts/the-actor-id/runs',
            {
                stockSymbol: symbol,
                country: country
            },
            {
                headers: {
                    'Authorization': 'Bearer YOUR_API_TOKEN'
                }
            }
        );
        
        return response.data;
    } catch (error) {
        console.error('Error fetching stock data:', error);
        throw error;
    }
}
```

### Support & Troubleshooting

#### Common Issues

1. **Stock Not Found**: Verify the stock symbol exists on Investing.com for the specified country
2. **Empty Results**: Check if the market is open or if the stock is actively traded
3. **Rate Limiting**: Reduce request frequency if encountering blocks

#### Debugging

- Check Actor logs for detailed error information
- Verify input parameters match expected formats
- Test with known working stock symbols first

#### Data Quality

- Cross-reference critical data points with other sources
- Monitor for unusual values that might indicate data issues
- Report persistent data quality problems

### Support

If you have any questions or encounter any issues, please consult the Apify documentation or reach out to us through one of the following channels:

- **Telegram**: [@pintoflow](https://t.me/pintoflow)
- **Apify Platform**: You can also contact us directly through this platform.

***

# Actor input Schema

## `stockSymbol` (type: `string`):

Stock symbol to retrieve historical data from (e.g., 'AAPL', 'BBVA', 'MSFT')

## `country` (type: `string`):

The country where the stock is listed

## Actor input object example

```json
{
  "stockSymbol": "AAPL",
  "country": "united states"
}
```

# Actor output Schema

## `overview` (type: `string`):

Key price and valuation metrics for the stock.

## `details` (type: `string`):

Complete dataset records including company profile, sector, industry and all price data.

## `summary` (type: `string`):

Condensed summary record saved to the key-value store.

# 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 = {
    "stockSymbol": "AAPL"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pintostudio/stock-information-investing-com").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 = { "stockSymbol": "AAPL" }

# Run the Actor and wait for it to finish
run = client.actor("pintostudio/stock-information-investing-com").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 '{
  "stockSymbol": "AAPL"
}' |
apify call pintostudio/stock-information-investing-com --silent --output-dataset

```

## MCP server setup

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

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/js1CuMwbLnhJEQeW9/builds/Cywt96DReHRbDKtPb/openapi.json
