POST
/extract
AI搭載の構造化抽出

AIを使用してWebページから構造化データを抽出します。JSONスキーマで希望する出力構造を定義すると、AIがインテリジェントに情報を抽出します。

ユースケース:

  • ECサイトから商品情報を抽出
  • 求人情報を構造化フォーマットにパース
  • 連絡先情報とビジネス詳細を抽出
  • ニュース記事を構造化データに変換
  • 価格表や仕様をスクレイピング

動作の仕組み:

  1. URLと希望する構造を定義するJSONスキーマを提供
  2. AIがページコンテンツを分析
  3. スキーマに一致するデータを抽出
  4. 検証済みのJSON出力を返却

スキーマ定義:

JSONスキーマを使用して希望する出力構造を定義します:

  • フィールドタイプ: string、number、boolean、array、object
  • フィールド説明: AIが何を抽出するか理解するのに役立つ
  • 必須フィールド: 重要なフィールドを必須としてマーク
  • ネスト構造: 複雑なネストデータのサポート

スキーマ例:

{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "商品名またはタイトル"
    },
    "price": {
      "type": "number",
      "description": "現在の価格(USD)"
    },
    "availability": {
      "type": "boolean",
      "description": "商品が在庫にあるかどうか"
    },
    "features": {
      "type": "array",
      "items": {"type": "string"},
      "description": "主要な商品機能のリスト"
    }
  },
  "required": ["title", "price"]
}

認証

YOUR_API_KEY
認証Bearer <token>

Thunderbit Dashboard から API キーを取得してください。ヘッダー形式:Authorization: Bearer YOUR_API_KEY

位置: header

ボディ

application/json

TypeScript Definitions

Use the request body type in TypeScript.

url*string必須

データを抽出するWebページのURL

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

JSON Schema。省略可 — 省略された場合、Thunderbit はページの内容からスキーマを自動生成します。

例:
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Product name"
    },
    "price": {
      "type": "number",
      "description": "Product price"
    },
    "currency": {
      "type": "string",
      "description": "Currency unit"
    }
  },
  "required": [
    "name",
    "price"
  ]
}
timeoutnumberデフォルト:60000

リクエストタイムアウト(ミリ秒)、デフォルト30000

範囲:5000 <= x <= 120000
例:
60000
waitFornumberデフォルト:0

ページ読み込み後、動的コンテンツのレンダリングを待機する時間(ミリ秒、デフォルト: 0、最大: 10000)

範囲:0 <= x <= 10000
例:
2000
renderModestringデフォルト:"none"

JavaScript レンダリングモード。none = JS レンダリングなし(デフォルト)、basic = 標準レンダリング、full = 動的コンテンツの待機時間を延長

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

出力形式(Distill の formats 配列と同じ構造)。

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

レスポンス

application/json

Success response

successboolean
例:
true
dataobject
子属性を表示
urlstring
例:https://thunderbit.com/playground
dataobject[]

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

例:
[
  {
    "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[]

ページから抽出されたリンク。

子属性を表示
textstring

Visible link text.

例:Read more
hrefstring

Resolved absolute URL.

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

ページから抽出された画像。

子属性を表示
srcstring

Image source URL.

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

Image alt text.

例:Hero banner
widthinteger

Image width in pixels.

heightinteger

Image height in pixels.

summarystring

ページの要約(LLM 形式)。

answerstring

question 形式で指定された質問への回答。

highlightsstring[]

ハイライトされた一節。

metadataobject
子属性を表示
titlestring

Page title extracted from tag or Open Graph

例:iPhone 15 Pro - Apple
descriptionstring

Meta description or excerpt

例:The ultimate iPhone with A17 Pro chip.
languagestring

Detected language code (ISO 639-1)

例:en
authorstring

Article author if available

例:
null
publishedDatestring

Publication date if available

例:
null
imagestring

Featured image URL from Open Graph or Twitter Card

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

ソースURL

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

HTTPステータスコード

例:
200
contentLengthinteger

Length of the markdown content in characters

例:
5000