Website Content Crawler avatar
Website Content Crawler
Try for free

No credit card required

View all Actors
Website Content Crawler

Website Content Crawler

apify/website-content-crawler
Try for free

No credit card required

Automatically crawl and extract text content from websites with documentation, knowledge bases, help centers, or blogs. This Actor is designed to provide data to feed, fine-tune, or train large language models such as ChatGPT or LLaMA.

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://docs.apify.com/academy/web-scraping-for-beginners"
10    }
11  ],
12  "includeUrlGlobs": [],
13  "excludeUrlGlobs": [],
14  "initialCookies": [],
15  "proxyConfiguration": {
16    "useApifyProxy": true
17  },
18  "removeElementsCssSelector": "nav, footer, script, style, noscript, svg,\n[role=\"alert\"],\n[role=\"banner\"],\n[role=\"dialog\"],\n[role=\"alertdialog\"],\n[role=\"region\"][aria-label*=\"skip\" i],\n[aria-modal=\"true\"]",
19  "clickElementsCssSelector": "[aria-expanded=\"false\"]"
20}
21EOF
22
23# Run the Actor using an HTTP API
24# See the full API reference at https://docs.apify.com/api/v2
25curl "https://api.apify.com/v2/acts/apify~website-content-crawler/runs?token=$API_TOKEN" \
26  -X POST \
27  -d @input.json \
28  -H 'Content-Type: application/json'
Developer
Apify logo Maintained by Apify
Actor metrics
  • 1.7k monthly users
  • 98.5% runs succeeded
  • 3.4 days response time
  • Created in Mar 2023
  • Modified 7 days ago

You might also like these Actors