Investopedia Scraper avatar
Investopedia Scraper
Try for free

No credit card required

View all Actors
Investopedia Scraper

Investopedia Scraper

glitch_404/investopedia-scraper
Try for free

No credit card required

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

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn mode

Node.js

Python

curl

1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4const client = new ApifyClient({
5    token: '<YOUR_API_TOKEN>',
6});
7
8// Prepare Actor input
9const input = {
10    "startUrls": [
11        {
12            "url": "https://www.investopedia.com/stocks-4427785"
13        },
14        {
15            "url": "https://www.investopedia.com/savings-accounts-4689728"
16        },
17        {
18            "url": "https://www.investopedia.com/personal-finance-4427760"
19        },
20        {
21            "url": "https://www.investopedia.com/markets-news-4427704"
22        },
23        {
24            "url": "https://www.investopedia.com/best-online-brokers-4587872"
25        }
26    ],
27    "dateRange": "anytime",
28    "maxArticles": 100,
29    "proxyConfiguration": {
30        "useApifyProxy": true
31    }
32};
33
34(async () => {
35    // Run the Actor and wait for it to finish
36    const run = await client.actor("glitch_404/investopedia-scraper").call(input);
37
38    // Fetch and print Actor results from the run's dataset (if any)
39    console.log('Results from dataset');
40    const { items } = await client.dataset(run.defaultDatasetId).listItems();
41    items.forEach((item) => {
42        console.dir(item);
43    });
44})();
Developer
Community logoMaintained by Community
Actor metrics
  • 3 monthly users
  • 100.0% runs succeeded
  • Created in Jan 2024
  • Modified 28 days ago
Categories

You might also like these Actors