edgecrawl 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +25 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -166,9 +166,17 @@ const result = await scrapeAndExtract("https://example.com");
166
166
  // Custom schema
167
167
  const product = await scrapeAndExtract("https://shop.example.com/item", {
168
168
  schema: {
169
- title: "Product name (string)",
170
- price: "Current price (string)",
171
- features: "Key features (array of strings)",
169
+ type: "object",
170
+ properties: {
171
+ name: { type: "string", description: "Product name" },
172
+ price: { type: "number", description: "Price (numeric)" },
173
+ features: {
174
+ type: "array",
175
+ items: { type: "string" },
176
+ description: "Key features or specs",
177
+ },
178
+ },
179
+ required: ["name", "price"],
172
180
  },
173
181
  });
174
182
 
@@ -213,12 +221,20 @@ Define what data to extract by providing a JSON schema file:
213
221
 
214
222
  ```json
215
223
  {
216
- "title": "Product name (string)",
217
- "price": "Current price (string)",
218
- "currency": "Currency code (string)",
219
- "description": "Product description (string)",
220
- "features": "Key features (array of strings)",
221
- "availability": "In stock or out of stock (string)"
224
+ "type": "object",
225
+ "properties": {
226
+ "name": { "type": "string", "description": "Product name" },
227
+ "price": { "type": "number", "description": "Price (numeric)" },
228
+ "currency": { "type": "string", "description": "Currency code (e.g. USD, EUR, JPY)" },
229
+ "description": { "type": "string", "description": "Product description (1-3 sentences)" },
230
+ "features": {
231
+ "type": "array",
232
+ "items": { "type": "string" },
233
+ "description": "Key features or specs"
234
+ },
235
+ "availability": { "type": "string", "description": "Stock status (in stock, out of stock, etc.)" }
236
+ },
237
+ "required": ["name", "price", "currency"]
222
238
  }
223
239
  ```
224
240
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edgecrawl",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Local AI-powered web scraper. Extract structured JSON from any website using on-device ONNX LLMs. No API keys, no cloud, no Python.",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",