Expand description
Rust client for the Apify platform API.
Apify is a web scraping and automation cloud platform. Users publish Actors (serverless programs) to the Apify Store, run them with a JSON input, and retrieve structured results from Datasets or Key-Value Stores.
This crate mirrors the Apify REST API v2. It is organised around three primary resources:
| Resource | What it represents | Typical workflow |
|---|---|---|
actors | Scraping / automation programs | Pick an Actor and run it |
tasks | Saved Actor configurations | Create once, run many times |
runs | Single executions | Poll status, fetch output |
§Disclaimer
This project was written with the help of large language models (LLMs). It is not well tested in production, so please review and test thoroughly before using it for critical workloads.
§Quick start
ⓘ
use apify_rs::ApifyClient;
let client = ApifyClient::new(std::env::var("APIFY_TOKEN")?);
// Run a task asynchronously
let run = client.tasks().run("my-task-id", None).await?;
println!("Started run {}", run.id);
// Poll until the run finishes
let finished = client.runs().wait_for_finish(&run.id, 5, 600).await?;
println!("Run finished with status {:?}", finished.status);Re-exports§
pub use client::HttpClient;pub use error::ApifyError;pub use resources::actors::ActorClient;pub use resources::runs::RunClient;pub use resources::tasks::TaskClient;
Modules§
- client
- error
- Typed output of the Instagram Profile Scraper Actor.
- models
- resources
- Resource-oriented sub-clients for the Apify API.
Structs§
- Apify
Client - Root client for the Apify API.
- Apify
Client Builder - Fluent builder for
ApifyClient.