@arcede/extract
v0.1.1
Published
Typed client for the AIR Extract API — turn any URL into structured JSON
Maintainers
Readme
@arcede/extract
Typed client for the AIR Extract API. Turn any URL into structured JSON in one function call.
Install
npm install @arcede/extractQuick Start
import { extract } from '@arcede/extract';
const data = await extract('https://example.com/article', {
apiKey: process.env.AIR_API_KEY!,
});
console.log(data.title); // "The Future of APIs"
console.log(data.content.items); // [{ title, author, publishedDate, ... }]
console.log(data.metadata.jsonLd); // Structured data from the pageClass Usage
import { ExtractClient } from '@arcede/extract';
const client = new ExtractClient({ apiKey: process.env.AIR_API_KEY! });
// Basic extraction
const result = await client.extract('https://example.com');
// Force fresh (bypass cache)
const fresh = await client.extract('https://example.com', { force: true });
// Get full response with credits info
const raw = await client.extractRaw('https://example.com');
console.log(raw.credits_used, raw.credits_remaining);Docs
Full documentation at agentinternetruntime.com/docs/extract
License
MIT
