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

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4client = ApifyClient("<YOUR_API_TOKEN>")
5
6# Prepare the Actor input
7run_input = {
8    "startUrls": [{ "url": "https://docs.apify.com/academy/web-scraping-for-beginners" }],
9    "includeUrlGlobs": [],
10    "excludeUrlGlobs": [],
11    "initialCookies": [],
12    "proxyConfiguration": { "useApifyProxy": True },
13    "removeElementsCssSelector": """nav, footer, script, style, noscript, svg,
14[role=\"alert\"],
15[role=\"banner\"],
16[role=\"dialog\"],
17[role=\"alertdialog\"],
18[role=\"region\"][aria-label*=\"skip\" i],
19[aria-modal=\"true\"]""",
20    "clickElementsCssSelector": "[aria-expanded=\"false\"]",
21}
22
23# Run the Actor and wait for it to finish
24run = client.actor("apify/website-content-crawler").call(run_input=run_input)
25
26# Fetch and print Actor results from the run's dataset (if there are any)
27for item in client.dataset(run["defaultDatasetId"]).iterate_items():
28    print(item)
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 6 days ago

You might also like these Actors