@teichai/extractify
v0.1.0
Published
AI-powered website data extraction.
Readme
Extractify
AI-powered website data extraction with schema-validated output.
Install
npm installBasic usage
import { ExtractifyClient } from "@teichai/extractify";
const client = new ExtractifyClient({
model: "openai/gpt-oss-20b",
});
const result = await client.extractFromUrl({
url: "https://example.com",
schema: {
type: "object",
properties: {
title: { type: "string" },
price: { type: "number" },
},
required: ["title", "price"],
additionalProperties: false,
},
instructions: "Extract the product title and numeric price.",
});
console.log(JSON.stringify(result, null, 2));Notes
apiKeydefaults toprocess.env.API_KEY- Validation is on by default; set
validate: falseto disable
Configuration
baseUrl: OpenAI-compatible base URL (defaults tohttps://openrouter.ai/api/v1)model: Model name (required)flaresolverrUrl: Use FlareSolverr for all page fetches
Validation
Responses are validated against your JSON Schema by default. If the response
does not match, extractFromUrl throws an error. Use validate: false to skip
validation for a specific call.
Examples
npm run build
node examples/basic.mjsContributing
- Fork the repo
- Create a feature branch
- Add tests for your change
- Run
npm test - Open a pull request
License
Non-commercial use only. See LICENSE.
