Smart Article Extractor avatar
Smart Article Extractor
Try for free

No credit card required

View all Actors
Smart Article Extractor

Smart Article Extractor

lukaskrivka/article-extractor-smart
Try for free

No credit card required

📰 Smart Article Extractor extracts articles from any scientific, academic, or news website with just one click. The extractor crawls the whole website and automatically distinguishes articles from other web pages. Download your data as HTML table, JSON, Excel, RSS feed, and more.

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

1# Set API token
2API_TOKEN=<YOUR_API_TOKEN>
3
4# Prepare Actor input
5cat > input.json <<'EOF'
6{
7  "startUrls": [
8    {
9      "url": "https://www.theguardian.com"
10    }
11  ],
12  "isUrlArticleDefinition": {
13    "minDashes": 4,
14    "hasDate": true,
15    "linkIncludes": [
16      "article",
17      "storyid",
18      "?p=",
19      "id=",
20      "/fpss/track",
21      ".html",
22      "/content/"
23    ]
24  },
25  "proxyConfiguration": {
26    "useApifyProxy": true
27  },
28  "extendOutputFunction": "($) => {\n    const result = {};\n    // Uncomment to add a title to the output\n    // result.pageTitle = $('title').text().trim();\n\n    return result;\n}"
29}
30EOF
31
32# Run the Actor using an HTTP API
33# See the full API reference at https://docs.apify.com/api/v2
34curl "https://api.apify.com/v2/acts/lukaskrivka~article-extractor-smart/runs?token=$API_TOKEN" \
35  -X POST \
36  -d @input.json \
37  -H 'Content-Type: application/json'
Developer
Apify logo Maintained by Apify
Actor metrics
  • 198 monthly users
  • 56.9% runs succeeded
  • 1.3 days response time
  • Created in Nov 2019
  • Modified 4 months ago
Categories

You might also like these Actors