
Actor in Rust Example
Under maintenance
Pricing
Pay per usage
Go to Store

Actor in Rust Example
Under maintenance
Example actor built in Rust programming language. Downloads HTML from any page. Works on Apify platform and locally.
0.0 (0)
Pricing
Pay per usage
3
Monthly users
3
Last modified
a year ago
Example Apify actor in Rust
Minimal example for developing Apify actor in Rust programming language. The code is open source.
The example:
- Reads user provided URL from input
- Does HTTP request to get HTML from this URL
- Saves HTML into OUTPUT record in Key Value Store
This actor works both on Apify platform and locally.
Local usage
For local usage, you need to:
- Clone the repository
- Install Rust
- Create local storage with
apify init
or manually create folder pathapify_storage/key_value_stores/default/
- Add
INPUT.json
file input inside this path that looks like this:
1{ 2 "url": "https://apify.com" 3}
- Build and run the solution with
cargo run
- You can find
OUTPUT.html
next toINPUT.json
Current problems
- Apify currently doesn't allow increasing memory for builds so they sometimes fails by running out of memory
- Apify caches the Docker images on its servers. Rust is not yet used much there so a lot of runs have slow cold starts.
Where next?
If you want to see more complex scraping project in Rust, check Rust Scraper which is also open source
Pricing
Pricing model
Pay per usageThis Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage.