# Investopedia Scraper (`glitch_404/investopedia-scraper`) Actor

Investopedia Scraper will enable you to get all the Articles you want from Investopedia.com.

- **URL**: https://apify.com/glitch_404/investopedia-scraper.md
- **Developed by:** [Yousif Wael](https://apify.com/glitch_404) (community)
- **Categories:** News, Open source
- **Security:** Full permissions
- **Stats:** 103 total users, 0 monthly users, 100.0% runs succeeded, 9 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/actors/running/actors-in-store.md#pay-per-usage

## 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

### What does Investopedia Scraper do?

Investopedia Scraper will enable you to get all the Articles you want from Investopedia.com since they have no API.

This **FREE** Investopedia Scraper will let you scrape and extract large datasets as often as you need to. The structured data can be downloaded as XML, JSON, CSV, HTML, and Excel, so that you can use it in your own applications, spreadsheets, reports, or other tools.

Investopedia Scraper will scrape:

- Title           -     The title of the article
- Category        -     The Category that the article belongs to
- Author          -     Name of the writer of the article
- Reviewer        -     The Name of the guy who reviewed the article
- Facts Checker   -     the guy who checked the fact in the articles
- Contributors    -     links of profiles and socials of every body who engaged in writing the article
- Date            -     Publishing date of article and the website might replace it with last article update date
- Paragraph       -     All text of the article body, and it is filtered to perfection "almost" ;)
- Link            -     The url of scraped article
- any null or empty field means the website didn't provide that value ( value doesn't exist in the article )

### Why should I use Investopedia Scraper ?

- Investopedia.com has **50Million** visits per month and is a great data source for Finance and Investing news articles.
- Saves time if You have no time to build your own scraper from scratch
- Alot of **FREE**! data
- It doesn't need any proxies.
- 950 articles took 75 seconds, so you can scrape at a rate of 760/min.

### Here are just some of the ways you could use that data

- Market research and marketing camping's targeting finance
- Analyze Article and extract keywords
- Food for machine learning and AI modules
- Generating content about finance

If you would like more inspiration on how scraping Investopedia.com Will help your business or organization, check out our [industry pages](https://apify.com/industries).

### How to scrape Investopedia.com

It's easy to scrape [Investopedia](https://www.Investopedia.com/) with Investopedia Scraper.
Just follow these steps to get your data at the speed of light.

1. Click on Try for free.
2. Use the default start URLs or customize them to only scrape a section or category on Investopedia.com.
3. Select the maximum number of items you want to scrape default is 100.
4. Click on Run.
5. preview or export your data from the Dataset tab.

### How much will it cost to use my sophisticated Investopedia Scraper?

- This Scraper is **FREE**! so you only pay for the usage of Apify platform.
- 1000 articles could potentially cost $0.06 of platform usage
  - you can scrape the whole website articles and data with the free apify account
  - since it is a very small website you can get all of there articles in one run but that still post content daily

### A sample of the results that will be provided as requested by the Scraper

```
[
    {"Image": "ARTICLE_IMAGE_URL", "link": "ARTICLE_URL", "title": "ARTICLE_TITLE", "category": "ARTICLE_CATEGORY", "author": "NAME", "reviewer": "NAME", "facts_checker": "NAME", "contributors": "CONTRIBUTORS_PROFILES_LINKS", "date": "ARTICLE_DATE", "paragraph": "All_ARTICLE_TEXT"},
    {
      "image": "https://www.investopedia.com/thmb/GNMk6e8Q_pdmV7pIxeF92AHDnaQ=/1920x1440/filters:no_upscale():max_bytes(150000):strip_icc()/blur-1853262_19201-9c37ff95cabd45b2b869ec41e8c88412.jpg",
      "title": "Alpha vs. Beta: What's the Difference?",
      "category": "Investing,Quantitative Analysis",
      "author": "Caroline Banton",
      "reviewer": "Gordon Scott",
      "facts_checker": "Suzanne Kvilhaug",
      "contributors": [
        "https://www.investopedia.com/contributors/99535/",
        "https://www.investopedia.com/contributors/99535/",
        "https://www.linkedin.com/in/caroline-banton-624b9445/",
        "https://twitter.com/CarolineBanton",
        "https://www.investopedia.com/contributors/82594/",
        "https://www.investopedia.com/contributors/82594/",
        "https://www.linkedin.com/in/gordonbscott/",
        "https://twitter.com/gordonscottcmt",
        "https://www.investopedia.com/suzanne-kvilhaug-5197828",
        "https://www.investopedia.com/suzanne-kvilhaug-5197828"
      ],
      "date": "2023-09-29",
      "link": "https://www.investopedia.com/ask/answers/102714/whats-difference-between-alpha-and-beta.asp",
      "paragraph": "Alpha vs. Beta: An Overview  \nAlpha and beta are two of the key measurements used to evaluate the performance of a stock, a fund, or an investment portfolio.\nAlpha measures the amount that the investment has returned in comparison to the market index or other broad benchmark that it is compared against.\nBeta measures the relative volatility of an investment. It is an indication of its relative risk.\nAlpha and beta are standard calculations that are used to evaluate an investment portfolio’s returns, along with standard deviation, R-squared, and the Sharpe ratio.\nKey Takeaways\nBoth alpha and beta are historical measures of past performances.Alpha shows how well (or badly) a stock has performed in comparison to a benchmark index.Beta indicates how volatile a stock's price has been in comparison to the market as a whole.A high alpha is always good.A high beta may be preferred by an investor in growth stocks but shunned by investors who seek steady returns and lower risk.\n   Alpha  \nThe alpha figure for a stock is represented as a single number, like 3 or -5. However, the number actually indicates the percentage above or below a benchmark index that the stock or fund price achieved. In this case, the stock or fund did 3% better and 5% worse, respectively, than the index.\nAn alpha of 1.0 means the investment outperformed its benchmark index by 1%. An alpha of -1.0 means the investment underperformed its benchmark index by 1%. If the alpha is zero, its return matched the benchmark.\nNote, alpha is a historical number. It's useful to track a stock's alpha over time to see how it did, but it can't tell you how it will do tomorrow.\n  Alpha for Portfolio Managers  \nFor individual investors, alpha helps reveal how a public or private stock or fund might perform in relation to its peers or to the market as a whole.\nProfessional portfolio managers calculate alpha as the rate of return that exceeds the model's prediction or comes short of it. They use a capital asset pricing model (CAPM) to project the potential returns of an investment portfolio.\nThat is generally a higher bar. If the CAPM analysis indicates that the portfolio should have earned 5%, based on risk, economic conditions, and other factors, but instead the portfolio earned just 3%, the alpha of the portfolio would be a discouraging -2%. \n  Formula for Alpha:  \nAlpha\n=\nEnd Price\n+\nDPS\n−\nStart Price\nStart Price\nwhere:\nDPS\n=\nDistribution per share\n\\begin{aligned} &\\text{Alpha} = \\frac{ \\text{End Price} + \\text{DPS} - \\text{Start Price} }{ \\text{Start Price} } \\\\ &\\textbf{where:}\\\\ &\\text{DPS} = \\text{Distribution per share} \\\\ \\end{aligned}\n​Alpha=Start PriceEnd Price+DPS−Start Price​where:DPS=Distribution per share​\nPortfolio managers seek to generate a higher alpha by diversifying their portfolios to balance risk.\nBecause alpha represents the performance of a portfolio relative to a benchmark, it represents the value that a portfolio manager adds or subtracts from a fund's return. The baseline number for alpha is zero, which indicates that the portfolio or fund is tracking perfectly with the benchmark index. In this case, the investment manager has neither added nor lost any value. \n   Beta  \nOften referred to as the beta coefficient, beta is an indication of the volatility of a stock, a fund, or a stock portfolio in comparison with the market as a whole. A benchmark index (most commonly the S&P 500) is used as the proxy measurement for the market. Knowing how volatile a stock's price is can help an investor decide whether it is worth the risk.\nThe baseline number for beta is one, which indicates that the security's price moves exactly as the market moves. A beta of less than 1 means that the security is less volatile than the market, while a beta greater than 1 indicates that its price is more volatile than the market.\nIf a stock's beta is 1.5, it is considered to be 50% more volatile than the overall market.\nLike alpha, beta is a historical number.\n  Beta Examples  \nHere are the betas for three well-known stocks on November 2021: \nMicron Technology Inc. (MU): 1.27Coca-Cola Company (KO): 0.64SPDR S&P 500 ETY (SPY): 1.00\nWe can see that Micron was 27% more volatile than the market as a whole, while Coca-Cola was 36% less volatile than the broader market. The SPDRs, or SPYs, have a beta of 1.00 because this ETF itself tracks the S&P 500 index.\nAcceptable betas vary across companies and sectors. Many utility stocks have a beta of less than 1, while many high-tech Nasdaq-listed stocks have a beta of greater than 1. To investors, this signals that tech stocks offer the possibility of higher returns but generally pose more risks, while utility stocks are steady earners.\nWhile a positive alpha is always more desirable than a negative alpha, beta isn’t as clear-cut. Risk-averse investors such as retirees seeking a steady income are attracted to lower beta. Risk-tolerant investors who seek bigger returns are often willing to invest in higher beta stocks.\n  Formula for Beta  \nHere is a useful formula for calculating beta:\nBeta\n=\nCR\nVariance of Market’s Return\nwhere:\nCR\n=\nCovariance of asset’s return with market’s return\n\\begin{aligned} &\\text{Beta} = \\frac{ \\text{CR} }{ \\text{Variance of Market's Return} } \\\\ &\\textbf{where:}\\\\ &\\text{CR} = \\text{Covariance of asset's return with market's return} \\\\ \\end{aligned}\n​Beta=Variance of Market’s ReturnCR​where:CR=Covariance of asset’s return with market’s return​\nCovariance is used to measure the correlation in price moves of any two stocks. A positive covariance means the stocks tend to move in lockstep, while a negative covariance means they move in opposite directions.Variance refers to how far a stock moves relative to its mean. It is frequently used to measure the volatility of a stock's price over time."
    }
]
```

### Tips for scraping Investopedia.com using my sophisticated Investopedia Scraper for the best results

- Date Range is an excellent feature you should try it to scrape all the articles that pleases you
- scrape as much as you love to it is almost **FREE**! especially with the **FREE** account apify provides

### Is it legal to scrape Investopedia.com?

- Webscraping is legal and scraping any publicly available data is legal
- You might want to review the terms of service for any website you want to scrape in general
- Note that personal data is protected by GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. We also recommend that you read our blog post: [is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

### Contact me

- I would love to hear from you in the issues tab for any suggetions
- Feel free to contact me on my [GitHub](https://github.com/G-Glitch404)

#### More Scrapers and More News and More and More Data

- [investing.com scraper](https://apify.com/glitch_404/investing-scraper)

# Actor input Schema

## `startUrls` (type: `array`):

URLs to start with

## `dateRange` (type: `string`):

Scrape only in specific date range
Date Can Only be is the formats

- YYYY/M/D e.g. 2023/5/23 to get all the articles that have the same day

- from YYYY/M/D to YYYY/M/D e.g. 2024/1/25 - 2024/1/30 to get a range of 5 days
  pay attention to the formate (spaces and characters) YYYY/M/D - YYYY/M/D

- 25 days or 5 weeks or 3 months or 2 years
  only supported formates (day, week, month, year)
  this feature will always scrape from today's date till the date specified
  e.g. 2024/1/30 is today and you entered 5 days this will scrape from 2024/1/25 to 2024/1/30

- if you don't care about the date and just want 100 aritcles, more or less just enter 'anytime' as a value e.g. anytime

- Allowed Formats: 2023/1/25 - 2023/1/30 or 2020/5/26 or 3 days or anytime

- Leave blank to scrape today's date articles

## `maxArticles` (type: `integer`):

Choose how many articles do you want

## `proxyConfiguration` (type: `object`):

Specifies proxy servers that will be used by the scraper in order to hide its origin.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.investopedia.com/stocks-4427785"
    },
    {
      "url": "https://www.investopedia.com/savings-accounts-4689728"
    },
    {
      "url": "https://www.investopedia.com/personal-finance-4427760"
    },
    {
      "url": "https://www.investopedia.com/markets-news-4427704"
    },
    {
      "url": "https://www.investopedia.com/best-online-brokers-4587872"
    }
  ],
  "dateRange": "anytime",
  "maxArticles": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://www.investopedia.com/stocks-4427785"
        },
        {
            "url": "https://www.investopedia.com/savings-accounts-4689728"
        },
        {
            "url": "https://www.investopedia.com/personal-finance-4427760"
        },
        {
            "url": "https://www.investopedia.com/markets-news-4427704"
        },
        {
            "url": "https://www.investopedia.com/best-online-brokers-4587872"
        }
    ],
    "dateRange": "anytime",
    "maxArticles": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("glitch_404/investopedia-scraper").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 = {
    "startUrls": [
        { "url": "https://www.investopedia.com/stocks-4427785" },
        { "url": "https://www.investopedia.com/savings-accounts-4689728" },
        { "url": "https://www.investopedia.com/personal-finance-4427760" },
        { "url": "https://www.investopedia.com/markets-news-4427704" },
        { "url": "https://www.investopedia.com/best-online-brokers-4587872" },
    ],
    "dateRange": "anytime",
    "maxArticles": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("glitch_404/investopedia-scraper").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 '{
  "startUrls": [
    {
      "url": "https://www.investopedia.com/stocks-4427785"
    },
    {
      "url": "https://www.investopedia.com/savings-accounts-4689728"
    },
    {
      "url": "https://www.investopedia.com/personal-finance-4427760"
    },
    {
      "url": "https://www.investopedia.com/markets-news-4427704"
    },
    {
      "url": "https://www.investopedia.com/best-online-brokers-4587872"
    }
  ],
  "dateRange": "anytime",
  "maxArticles": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call glitch_404/investopedia-scraper --silent --output-dataset

```

## MCP server setup

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

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/Hgujfk0QYjjaDqBQA/builds/6LTHHminptdGIqTQh/openapi.json
