import { BulkgridClient } from '@bulkgrid/sdk';
const client = new BulkgridClient({
apiKey: process.env.BULKGRID_API_KEY ?? '',
baseUrl: process.env.BULKGRID_BASE_URL ?? '',
});
const run = await client.extract({
urls: ['https://example.com', 'https://example.com/pricing'],
query: 'Extract company name, product summary, and pricing details',
schema: {
type: 'object',
properties: {
companyName: { type: 'string' },
productSummary: { type: 'string' },
pricing: { type: 'string' },
},
required: ['companyName'],
},
maxRetries: 3,
});