![Rust Scraper avatar](https://images.apifyusercontent.com/K5-blB4zavfnANEDXxWximQXsZvZubwpwngrh-pYiLc/rs:fill:92:92/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9HRlRhQ3Y5Y3JEUEp4RXhiRC9OS2FNQ3pTZWE1bjM5cm9qRS1ydXN0LmpwZw.webp)
Rust Scraper
Try for free
No credit card required
View all Actors![Rust Scraper](https://images.apifyusercontent.com/K5-blB4zavfnANEDXxWximQXsZvZubwpwngrh-pYiLc/rs:fill:92:92/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9HRlRhQ3Y5Y3JEUEp4RXhiRC9OS2FNQ3pTZWE1bjM5cm9qRS1ydXN0LmpwZw.webp)
![Rust Scraper](https://images.apifyusercontent.com/K5-blB4zavfnANEDXxWximQXsZvZubwpwngrh-pYiLc/rs:fill:92:92/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9HRlRhQ3Y5Y3JEUEp4RXhiRC9OS2FNQ3pTZWE1bjM5cm9qRS1ydXN0LmpwZw.webp)
Rust Scraper
lukaskrivka/rust-scraper
Try for free
No credit card required
Speed of light scraping with Rust programming language! This is an early alpha version for experimenting, use at your own risk!
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 "urls": [
11 {
12 "url": "http://example.com"
13 }
14 ],
15 "extract": [
16 {
17 "field_name": "title",
18 "selector": "h1",
19 "extract_type": {
20 "type": "Text"
21 }
22 },
23 {
24 "field_name": "description",
25 "selector": "p",
26 "extract_type": {
27 "type": "Text"
28 }
29 }
30 ],
31 "proxy_settings": {
32 "useApifyProxy": true
33 }
34};
35
36(async () => {
37 // Run the Actor and wait for it to finish
38 const run = await client.actor("lukaskrivka/rust-scraper").call(input);
39
40 // Fetch and print Actor results from the run's dataset (if any)
41 console.log('Results from dataset');
42 console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43 const { items } = await client.dataset(run.defaultDatasetId).listItems();
44 items.forEach((item) => {
45 console.dir(item);
46 });
47})();
48
49// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs
Developer
Maintained by Community
Actor metrics
- 3 monthly users
- 3 stars
- 100.0% runs succeeded
- Created in Feb 2019
- Modified over 3 years ago
Categories