Description
LLM Scraper is a TypeScript library that extracts structured data from any web page using a large language model. You define the shape of the data you want with a Zod or JSON Schema, point the scraper at a page, and it returns objects that match your schema, with full type safety in TypeScript. It is built on the Playwright browser automation framework and works with models from several families, including GPT, Claude-style Sonnet models, Gemini, Llama and Qwen, through the Vercel AI SDK, which version 2 of the library supports. The page can be given to the model in several formats: processed HTML, raw HTML, Markdown, extracted text using Readability, a screenshot for multimodal models, or custom content produced by your own function. Results can be streamed as partial objects as they are produced. A generate function produces a reusable Playwright script that scrapes the page according to your schema, so you can avoid calling the model every time. The repository includes examples, including extracting top stories from Hacker News. The project is open source, and contributions are welcome through issues and pull requests.…
Highlights
- Extract structured data from any web page
- Zod or JSON Schema, with TypeScript types
- Playwright-based browsing
- Six input formats including screenshots
- Reusable scraper code generation
Ratings & Reviews
No ratings yet
Be the first to rate LLM Scraper.
People also visit
LLM Scraper FAQ
What is LLM Scraper?
It is a TypeScript library that uses a language model to pull structured data from web pages, following a schema you define.
Which models can it use?
The README says it supports GPT, Sonnet, Gemini, Llama and Qwen model families through the Vercel AI SDK.
How do I define the output?
You describe the output with a Zod schema or a JSON Schema, and the results are typed in TypeScript.
Can it stream results?
Yes. Replacing run with stream returns a partial object stream as the model produces it.
Can I avoid calling the model every time?
Yes. The generate function creates a reusable Playwright script that scrapes according to your schema.
Is it free?
The library is open source on GitHub. The model provider you connect to may charge for usage.
What are the best LLM Scraper alternatives?
Popular alternatives to LLM Scraper include Crawl4AI, DataFuel.dev and WebReaper. See all LLM Scraper alternatives
.png?auto=compress&fit=max&w=128)




.png?auto=compress&fit=max&w=128)

