LLM Scraper
A TypeScript library that extracts structured data from any web page by sending its content to a large language model against a defined schema.
LLM Scraper loads a page through Playwright in one of several formats, including pre-processed or raw HTML, Markdown, extracted text, or a screenshot for multimodal models, then asks a language model to fill in a schema defined with Zod or JSON Schema. It works with model providers exposed through the Vercel AI SDK, including OpenAI, Anthropic, Google, Groq, and local models through Ollama, and keeps full type safety in TypeScript.
It supports streaming partial results as the model generates them and can generate reusable extraction code from an example run instead of calling the model on every page. Version 2.0 adds support for AI SDK 6 and updated examples.
It is distributed under the MIT license.