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

Crawl websites and extract text content to feed AI models, LLM applications, vector databases, or RAG pipelines. The Actor supports rich formatting using Markdown, cleans the HTML, downloads files, and integrates well with 🦜🔗LangChain, LlamaIndex, and the wider LLM ecosystem.

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

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  "crawlerType": "playwright:adaptive",
13  "includeUrlGlobs": [],
14  "excludeUrlGlobs": [],
15  "initialCookies": [],
16  "proxyConfiguration": {
17    "useApifyProxy": true
18  },
19  "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\"]",
20  "clickElementsCssSelector": "[aria-expanded=\"false\"]"
21}
22EOF
23
24# Run the Actor using an HTTP API
25# See the full API reference at https://docs.apify.com/api/v2
26curl "https://api.apify.com/v2/acts/apify~website-content-crawler/runs?token=$API_TOKEN" \
27  -X POST \
28  -d @input.json \
29  -H 'Content-Type: application/json'
Developer
Maintained by Apify
Actor metrics
  • 2.8k monthly users
  • 318 stars
  • 100.0% runs succeeded
  • 4 days response time
  • Created in Mar 2023
  • Modified 1 day ago