POST
/extract
Estrazione Strutturata con IA

Estrai dati strutturati dalle pagine web utilizzando l'IA. Definisci la struttura di output desiderata con JSON Schema, e la nostra IA estrarra intelligentemente le informazioni.

Casi d'Uso:

  • Estrarre informazioni prodotto da pagine e-commerce
  • Analizzare annunci di lavoro in formato strutturato
  • Estrarre informazioni di contatto e dettagli aziendali
  • Convertire articoli di notizie in dati strutturati
  • Estrarre tabelle prezzi e specifiche

Come Funziona:

  1. Fornisci un URL e uno JSON Schema che definisce la struttura desiderata
  2. La nostra IA analizza il contenuto della pagina
  3. Estrae i dati corrispondenti al tuo schema
  4. Restituisce output JSON validato

Definizione dello Schema:

Usa JSON Schema per definire la struttura di output desiderata:

  • Tipi di campo: string, number, boolean, array, object
  • Descrizioni dei campi: Aiutano l'IA a capire cosa estrarre
  • Campi obbligatori: Contrassegna i campi critici come required
  • Strutture annidate: Supporto per dati complessi e annidati

Esempio di Schema:

{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Nome o titolo del prodotto"
    },
    "price": {
      "type": "number",
      "description": "Prezzo corrente in USD"
    },
    "availability": {
      "type": "boolean",
      "description": "Se il prodotto e disponibile"
    },
    "features": {
      "type": "array",
      "items": {"type": "string"},
      "description": "Lista delle caratteristiche principali del prodotto"
    }
  },
  "required": ["title", "price"]
}

Autorizzazione

YOUR_API_KEY
AutorizzazioneBearer <token>

Ottieni la tua API key dal Thunderbit Dashboard. Formato header: Authorization: Bearer YOUR_API_KEY

In: header

Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

url*stringobbligatorio

L'URL della pagina web da cui estrarre i dati

Esempio:https://thunderbit.com/playground
schemaobject

JSON Schema. Opzionale — se omesso, Thunderbit genera automaticamente uno schema dal contenuto della pagina.

Esempio:
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Product name"
    },
    "price": {
      "type": "number",
      "description": "Product price"
    },
    "currency": {
      "type": "string",
      "description": "Currency unit"
    }
  },
  "required": [
    "name",
    "price"
  ]
}
timeoutnumberpredefinito:60000

Timeout della richiesta in millisecondi, predefinito 30000

Intervallo richiesto:5000 <= x <= 120000
Esempio:
60000
waitFornumberpredefinito:0

Tempo di attesa (in millisecondi) dopo il caricamento della pagina per il rendering dei contenuti dinamici (predefinito: 0, max: 10000)

Intervallo richiesto:0 <= x <= 10000
Esempio:
2000
renderModestringpredefinito:"none"

Modalità di rendering JavaScript. none = nessun rendering JS (predefinito); basic = rendering standard; full = attesa estesa per contenuti dinamici

Valore in"none" | "basic" | "full"
formatsany[]

Formati di output (stessa struttura dell'array formats di Distill).

Esempio:
[
  "markdown",
  "links",
  "images"
]

Risposta

application/json

Success response

successboolean
Esempio:
true
dataobject
Mostra attributi figli
urlstring
Esempio:https://thunderbit.com/playground
dataobject[]

Extracted structured data matching your schema, returned as an array where each item is a key-value map

Esempio:
[
  {
    "name": "iPhone 15 Pro",
    "price": 999,
    "currency": "USD",
    "availability": true,
    "rating": 4.7,
    "features": [
      "A17 Pro chip with 6-core GPU",
      "Pro camera system with 48MP main camera",
      "Titanium design with textured matte glass"
    ]
  }
]
linksobject[]

Link estratti dalla pagina.

Mostra attributi figli
textstring

Visible link text.

Esempio:Read more
hrefstring

Resolved absolute URL.

Esempio:https://example.com/article
imagesobject[]

Immagini estratte dalla pagina.

Mostra attributi figli
srcstring

Image source URL.

Esempio:https://example.com/hero.png
altstring

Image alt text.

Esempio:Hero banner
widthinteger

Image width in pixels.

heightinteger

Image height in pixels.

summarystring

Riepilogo della pagina (formato LLM).

answerstring

Risposta alla domanda fornita nel formato question.

highlightsstring[]

Passaggi evidenziati.

metadataobject
Mostra attributi figli
titlestring

Page title extracted from tag or Open Graph

Esempio:iPhone 15 Pro - Apple
descriptionstring

Meta description or excerpt

Esempio:The ultimate iPhone with A17 Pro chip.
languagestring

Detected language code (ISO 639-1)

Esempio:en
authorstring

Article author if available

Esempio:
null
publishedDatestring

Publication date if available

Esempio:
null
imagestring

Featured image URL from Open Graph or Twitter Card

Esempio:https://example.com/product/iphone-15-pro.jpg
sourceURLstring

URL sorgente

Esempio:https://example.com/product/iphone-15-pro
statusCodeinteger

Codice di stato HTTP

Esempio:
200
contentLengthinteger

Length of the markdown content in characters

Esempio:
5000