Investing.com Scraper avatar
Investing.com Scraper
Deprecated
View all Actors
This Actor is deprecated

This Actor is unavailable because the developer has decided to deprecate it. Would you like to try a similar Actor instead?

See alternative Actors
Investing.com Scraper

Investing.com Scraper

glitch_404/investing-scraper

Scrape Investing.com daily news and 250K of archived news and articles

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 more

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.investing.com/indices/eu-stoxx50-news/"
13        },
14        {
15            "url": "https://www.investing.com/news/latest-news/"
16        },
17        {
18            "url": "https://www.investing.com/news/most-popular-news/"
19        },
20        {
21            "url": "https://www.investing.com/news/headlines/"
22        },
23        {
24            "url": "https://www.investing.com/news/cryptocurrency-news/"
25        },
26        {
27            "url": "https://www.investing.com/news/stock-market-news/"
28        },
29        {
30            "url": "https://www.investing.com/news/commodities-news/"
31        },
32        {
33            "url": "https://www.investing.com/news/forex-news/"
34        },
35        {
36            "url": "https://www.investing.com/news/economy/"
37        },
38        {
39            "url": "https://www.investing.com/news/economic-indicators/"
40        },
41        {
42            "url": "https://www.investing.com/news/politics/"
43        },
44        {
45            "url": "https://www.investing.com/news/world-news/"
46        }
47    ],
48    "dateRange": "2023/1/5 - 2020/1/5",
49    "maxArticles": 50,
50    "maxDepth": 20,
51    "proxyConfiguration": {
52        "useApifyProxy": false
53    }
54};
55
56(async () => {
57    // Run the Actor and wait for it to finish
58    const run = await client.actor("glitch_404/investing-scraper").call(input);
59
60    // Fetch and print Actor results from the run's dataset (if any)
61    console.log('Results from dataset');
62    console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
63    const { items } = await client.dataset(run.defaultDatasetId).listItems();
64    items.forEach((item) => {
65        console.dir(item);
66    });
67})();
68
69// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs
Developer
Maintained by Community