{"id":30610277,"url":"https://github.com/ztgx/llmweb","last_synced_at":"2025-08-30T04:39:45.814Z","repository":{"id":303207104,"uuid":"1014753277","full_name":"zTgx/llmweb","owner":"zTgx","description":"Webpage to structured data in Rust \u0026 LLM","archived":false,"fork":false,"pushed_at":"2025-07-17T11:15:54.000Z","size":187,"stargazers_count":14,"open_issues_count":3,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-28T21:25:40.445Z","etag":null,"topics":["automation","browser","data-analysis","gemini","headless","headless-chrome","llama","llm","openai","rust","scraper","twitter","web","web-scraping","web3"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zTgx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-06T10:53:17.000Z","updated_at":"2025-07-23T12:04:32.000Z","dependencies_parsed_at":"2025-07-06T11:16:26.864Z","dependency_job_id":"1c4b9678-fceb-4ca2-b33f-a6eb43927dab","html_url":"https://github.com/zTgx/llmweb","commit_stats":null,"previous_names":["ztgx/llmweb.rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zTgx/llmweb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2Fllmweb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2Fllmweb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2Fllmweb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2Fllmweb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zTgx","download_url":"https://codeload.github.com/zTgx/llmweb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2Fllmweb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272805487,"owners_count":24995909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","browser","data-analysis","gemini","headless","headless-chrome","llama","llm","openai","rust","scraper","twitter","web","web-scraping","web3"],"created_at":"2025-08-30T04:39:44.936Z","updated_at":"2025-08-30T04:39:45.799Z","avatar_url":"https://github.com/zTgx.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# llmweb   \n**Extract any webpage to structured data in Rust \u0026 LLM**\n\n[![Version](https://img.shields.io/crates/v/llmweb)](https://crates.io/crates/llmweb)\n[![Downloads](https://img.shields.io/crates/d/llmweb?logo=rust)](https://crates.io/crates/llmweb)\n[![License](https://img.shields.io/crates/l/llmweb)](LICENSE)\n[![Documentation](https://img.shields.io/docsrs/llmweb)](https://docs.rs/llmweb)\n\n\u003c/div\u003e\n\n\u003e [!IMPORTANT]\n\u003e ***This project is under active development and APIs may change.***\n\n## ✨ Key Features\n \n- **🤖 Schema-Driven Extraction**\n- **🌐 Multi-Provider LLM Support**\n- **⚡ High-Performance \u0026 Async**\n- **💻 Simple \u0026 Powerful CLI** \n- **🦀 Rust-Powered Reliability**\n- **📄 Streaming**\n\n## Installation\nAdd to your `Cargo.toml`:\n```toml\n[dependencies]\nllmweb = \"0.1\"\n```\n\n1. Configure API Key(different providers choose one):\n```bash\nexport OPENAI_API_KEY=\"sk-your-key-here\"         # OpenAI\nexport ANTHROPIC_API_KEY=\"sk-ant-your-key\"       # Claude\nexport GEMINI_API_KEY=\"your-google-key\"          # Gemini\nexport COHERE_API_KEY=\"your-cohere-key\"          # Cohere\nexport GROQ_API_KEY=\"gsk-your-key\"               # Groq\nexport XAI_API_KEY=\"xai-your-key\"               # xAI\nexport DEEPSEEK_API_KEY=\"your-deepseek-key\"     # DeepSeek\n# Ollama typically requires no API key for local usage\n```\n\n2. Pick the model you want to use:\n```rust\nlet model = \"gemini-2.0-flash\";\n```\n\n3. Create `LlmWeb` instance with the model:\n```rust\nlet llmweb = LlmWeb::new(model);\n```\n\n## Example - V2EX\n```rust\nuse llmweb::LlmWeb;\nuse serde::{Deserialize, Serialize};\n\n#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct VXNA {\n    pub username: String,\n    pub avatar_url: String,\n    pub profile_url: String,\n    pub title: String,\n    pub topic_url: String,\n    pub topic_id: u64,\n    pub relative_time: String,\n    pub reply_count: u32,\n    pub last_replier: Option\u003cString\u003e,\n}\n\n#[tokio::main]\nasync fn main() {\n    let schema_str = include_str!(\"../schemas/v2ex_schema.json\");\n\n    let llmweb = LlmWeb::new(\"gemini-2.0-flash\");\n    let structed_value: Vec\u003cVXNA\u003e = llmweb\n        .exec_from_schema_str(\"https://v2ex.com/go/vxna\", schema_str)\n        .await\n        .unwrap();\n    println!(\"{:#?}\", structed_value);\n}\n```\n\n## Streaming\n```rust\n#[tokio::main]\nasync fn main() {\n    // Load the schema from an external file as a string.\n    let schema_str = include_str!(\"../schemas/v2ex_schema.json\");\n    let schema: Value = serde_json::from_str(schema_str).unwrap();\n\n    let structed_value: Vec\u003cVXNA\u003e = LlmWeb::new(\"gemini-2.0-flash\")\n        .stream(\"https://v2ex.com/go/vxna\", schema)\n        .await\n        .unwrap();\n    println!(\"{:#?}\", structed_value);\n}\n```\n\n## Example - HN\n```rust\nuse llmweb::LlmWeb;\nuse serde::{Deserialize, Serialize};\n\n#[derive(Debug, Serialize, Deserialize)]\nstruct Story {\n    title: String,\n    points: f32,\n    by: Option\u003cString\u003e,\n    comments_url: Option\u003cString\u003e,\n}\n\n#[tokio::main]\nasync fn main() {\n    // Load the schema from an external file as a string.\n    let schema_str = include_str!(\"../schemas/hn_schema.json\");\n\n    let llmweb = LlmWeb::new(\"gemini-2.0-flash\");\n    eprintln!(\"Fetching from Hacker News and extracting stories...\");\n\n    // Use the convenience method `exec_from_schema_str` which handles\n    // parsing the schema string internally.\n    let structed_value: Vec\u003cStory\u003e = llmweb\n        .exec_from_schema_str(\"https://news.ycombinator.com\", schema_str)\n        .await\n        .unwrap();\n    println!(\"{:#?}\", structed_value);\n}\n```\n\n## Cli\n```bash\n# Run the CLI\n./target/debug/llmweb-cli --schema-file schemas/hn_schema.json https://news.ycombinator.com\n```\n\n## Output\n```json\n[\n  {\n    \"by\": \"sandslash\",\n    \"comments_url\": \"item?id=44455175\",\n    \"points\": 43.0,\n    \"title\": \"François Chollet: The Arc Prize and How We Get to AGI [video]\"\n  },\n  {\n    \"by\": \"bravomartin\",\n    \"comments_url\": \"item?id=44479502\",\n    \"points\": 24.0,\n    \"title\": \"When Figma starts designing us\"\n  },\n  {\n    \"by\": \"tejohnso\",\n    \"comments_url\": \"item?id=44489797\",\n    \"points\": 15.0,\n    \"title\": \"New Quantum Paradox Clarifies Where Our Views of Reality Go Wrong\"\n  },\n  {\n    \"by\": \"ananddtyagi\",\n    \"comments_url\": \"item?id=44485342\",\n    \"points\": 480.0,\n    \"title\": \"Bitchat – A decentralized messaging app that works over Bluetooth mesh networks\"\n  },\n  {\n    \"by\": \"PaulHoule\",\n    \"comments_url\": \"item?id=44489690\",\n    \"points\": 5.0,\n    \"title\": \"Mercury: Ultra-Fast Language Models Based on Diffusion\"\n  }\n]\n```\n\n## Examples\nMore examples can be found in the [Examples](./examples/) directory.\n\n## Schemas\nMore schemas can be found in the [Schemas](./schemas/) directory.\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=zTgx/llmweb\u0026type=Date)](https://www.star-history.com/#zTgx/llmweb\u0026Date)\n\n## Contributing\n\nWe welcome contributions! Please see our CONTRIBUTING.md for more details on how to get started.\n\n## License\n\nThis project is licensed under the MIT License - see the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fztgx%2Fllmweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fztgx%2Fllmweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fztgx%2Fllmweb/lists"}