| Crates.io | serpscraper |
| lib.rs | serpscraper |
| version | 0.1.3 |
| created_at | 2025-12-26 22:21:15.442699+00 |
| updated_at | 2025-12-26 22:25:16.067973+00 |
| description | A CLI tool to fetch and convert search results into Markdown. |
| homepage | |
| repository | https://github.com/hghalebi/serpscraper |
| max_upload_size | |
| id | 2006345 |
| size | 58,886 |
A CLI tool to fetch and convert search results into Markdown.
SERPER_API_KEY: API key for SerpApi.# Set your API key
export SERPER_API_KEY="your_secret_key"
# Run the search
serpscraper "how to write better rust code"
Add serpscraper to your Cargo.toml:
[dependencies]
serpscraper = "0.1"
tokio = { version = "1", features = ["full"] }
Use it in your Rust code:
use serpscraper::get_markdown_for_query;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let api_key = std::env::var("SERPER_API_KEY")?;
let query = "rust async tutorial";
let markdown = get_markdown_for_query(query, &api_key).await?;
println!("{}", markdown);
Ok(())
}
anyhow: Error handling.html-to-markdown-rs: HTML to Markdown conversion.only_scraper: Web scraping.readability-js: Article extraction.serde & serde_json: JSON serialization/deserialization.serpapi-search-rust: Google Search API client.tokio: Async runtime.