メインコンテンツへスキップ
Olostepの/v1/scrapesエンドポイントを使用すると、任意のURLからリアルタイムでLLM対応のMarkdown、HTML、テキスト、スクリーンショット、または構造化JSONを抽出できます。
  • クリーンなMarkdown、構造化データ、スクリーンショット、またはHTMLを出力
  • ParsersまたはLLM extractionを通じてJSONを抽出
  • 動的コンテンツを処理:jsでレンダリングされたサイト、アクションを介したログインフロー、PDF
APIの詳細については、スクレイプエンドポイントAPIリファレンスを参照してください。

URLのスクレイピング

/v1/scrapesエンドポイントを使用して単一のURLをスクレイプし、出力形式を選択します。

インストール

pip install olostep
npm install olostep
# curlはmacOS、Linux、Windowsでデフォルトで利用可能
npm install node-fetch
pip install requests

使用方法

このエンドポイントを使用して単一のURLをスクレイプし、出力形式を選択できます。必須パラメータはurl_to_scrapeformatsです。 他の一般的なパラメータには、wait_before_scraping(ミリ秒単位)、remove_css_selectors(デフォルト、なし、またはセレクタの配列)、およびcountryがあります。
from olostep import Olostep

client = Olostep(api_key="YOUR_REAL_KEY")

result = client.scrapes.create(
    url_to_scrape="https://en.wikipedia.org/wiki/Alexander_the_Great",
    formats=["markdown", "html"],
)

print(result.markdown_content)
print(result.html_content)
import Olostep from 'olostep'

const client = new Olostep({ apiKey: 'YOUR_REAL_KEY' })

const result = await client.scrapes.create({
  url: 'https://en.wikipedia.org/wiki/Alexander_the_Great',
  formats: ['markdown', 'html'],
})

console.log(result.markdown_content)
console.log(result.html_content)
curl -s -X POST "https://api.olostep.com/v1/scrapes" \
  -H "Authorization: Bearer $OLOSTEP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url_to_scrape": "https://en.wikipedia.org/wiki/Alexander_the_Great",
    "formats": ["markdown", "html"]
  }'
olostep scrape "https://en.wikipedia.org/wiki/Alexander_the_Great" \
  --formats markdown,html
const endpoint = 'https://api.olostep.com/v1/scrapes'
const payload = {
  url_to_scrape: 'https://en.wikipedia.org/wiki/Alexander_the_Great',
  formats: ['markdown', 'html']
}
const res = await fetch(endpoint, {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <YOUR_API_KEY>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(payload)
})
const data = await res.json()
console.log(data)
import requests
import json

endpoint = "https://api.olostep.com/v1/scrapes"
payload = {
    "url_to_scrape": "https://en.wikipedia.org/wiki/Alexander_the_Great",
    "formats": ["markdown", "html"]
}
headers = {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
}

response = requests.post(endpoint, json=payload, headers=headers)
print(json.dumps(response.json(), indent=2))

レスポンス

APIはレスポンスとしてscrapeオブジェクトを返します。 scrapeにはidresultなどのプロパティがあります。 resultオブジェクトには次のフィールドがあります(formatsパラメータに応じて一部はnullになる可能性があります):
  • html_content: ページのHTMLコンテンツ。これを取得するにはformats: ["html"]を指定します。
  • markdown_content: ページのMDコンテンツ。これを取得するにはformats: ["markdown"]を指定します。
  • text_content: ページのテキストコンテンツ。これを取得するにはformats: ["text"]を指定します。
  • json_content: ページのJSONコンテンツ。これを取得するにはformats: ["json"]を指定し、さらにparserまたはllm_extractパラメータを提供します。
  • screenshot_hosted_url: スクリーンショットのホストされたURL。
  • html_hosted_url: HTMLコンテンツのホストされたURL
  • markdown_hosted_url: MarkdownコンテンツのホストされたURL
  • json_hosted_url: JSONコンテンツのホストされたURL
  • text_hosted_url: テキストコンテンツのホストされたURL
  • links_on_page: ページ上のリンク
  • page_metadata: ページのメタデータ
{
  "id": "scrape_6h89o8u1kt",
  "object": "scrape",
  "created": 1745673871,
  "metadata": {},
  "retrieve_id": "6h89o8u1kt",
  "url_to_scrape": "https://en.wikipedia.org/wiki/Alexander_the_Great",
  "result": {
    "html_content": "<html...",
    "markdown_content": "## Alexander the Great...",
    "text_content": null,
    "json_content": null,
    "screenshot_hosted_url": null,
    "html_hosted_url": "https://olostep-storage.s3.us-east-1.amazonaws.com/text_6h89o8u1kt.txt",
    "markdown_hosted_url": "https://olostep-storage.s3.us-east-1.amazonaws.com/markDown_6h89o8u1kt.txt",
    "json_hosted_url": null,
    "text_hosted_url": null,
    "links_on_page": [],
    "page_metadata": { "status_code": 200, "title": "" }
  }
}

キャッシング

速度を最適化するために、OlostepはHTML、Markdown、テキスト、および解析されたJSONの結果に対するオプションの共有キャッシングレイヤーを提供します。

仕組み

スクレイプが要求されると、Olostepは同じパラメータを持つ一致するスクレイプが既に存在するかどうかを確認します。新鮮な一致が見つかった場合、コンテンツは新しいブラウザスクレイプを起動せずにOlostepのストレージから即座に提供されます。
  • 共有キャッシュ: キャッシュはグローバルに共有されます。別のリクエストが同じURLを同じ設定であなたの新鮮さウィンドウ内でスクレイプした場合、速度向上の恩恵を受けます。
  • 後処理は依然としてライブ: llm_extractlinks_on_pageフィルターのような操作は、キャッシュされたドキュメントの上でオンザフライで実行されます。コアページの取得のみをキャッシュし、構造化された抽出を動的に保ちます。

新鮮さとmax_age

デフォルトでは、プロダクションAPIは常にリアルタイムの精度を保証するためにライブスクレイプを実行します。max_ageパラメータを使用してキャッシングをオプトインできます。
パラメータタイプデフォルト説明
max_ageinteger0単位の許容コンテンツ年齢。キャッシュされたコピーが存在し、max_age秒より新しい場合、それはキャッシュから提供されます。
  • デフォルトAPI動作 (max_age: 0): すべてのAPIリクエストは新しいスクレイプをトリガーします。
  • デフォルトプレイグラウンド動作: ダッシュボードプレイグラウンドでは、max_ageは24時間(86400秒)にデフォルト設定されています。
  • 最大年齢: キャッシュには7日間604800秒)のハードリミットがあります。この制限を超えるmax_ageが要求された場合、最大7日にフォールバックします。

使用例

from olostep import Olostep

client = Olostep(api_key="YOUR_REAL_KEY")

# キャッシングをオプトイン: 最大1日(86400秒)古い結果を受け入れる
result = client.scrapes.create(
    url_to_scrape="https://example.com",
    formats=["markdown"],
    max_age=86400
)
import Olostep from 'olostep'

const client = new Olostep({ apiKey: 'YOUR_REAL_KEY' })

// キャッシングをオプトイン: 最大1日(86400秒)古い結果を受け入れる
const result = await client.scrapes.create({
  url: 'https://example.com',
  formats: ['markdown'],
  maxAge: 86400,
})
# キャッシングをオプトイン: 最大1時間(3600秒)古い結果を受け入れる
curl -X POST "https://api.olostep.com/v1/scrapes" \
  -H "Authorization: Bearer $OLOSTEP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url_to_scrape": "https://example.com",
    "formats": ["markdown"],
    "max_age": 3600
  }'
const endpoint = 'https://api.olostep.com/v1/scrapes'
const payload = {
  url_to_scrape: 'https://example.com',
  formats: ['markdown'],
  max_age: 86400 // 最大1日(86400秒)古い結果を受け入れる
}
const res = await fetch(endpoint, {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <YOUR_API_KEY>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(payload)
})
const data = await res.json()
console.log(data)
import requests
import json

endpoint = "https://api.olostep.com/v1/scrapes"
payload = {
    "url_to_scrape": "https://example.com",
    "formats": ["markdown"],
    "max_age": 86400 # 最大1日(86400秒)古い結果を受け入れる
}
headers = {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
}

response = requests.post(endpoint, json=payload, headers=headers)
print(json.dumps(response.json(), indent=2))

キャッシュがスキップされる場合

キャッシュは自動的にバイパスされ(ライブスクレイプを強制)、次のような場合にリクエストが必要です:
  • インタラクティブセッション: session_idを使用するリクエストまたはカスタムブラウザcontextをロードするリクエスト。
  • スクリーンショット: screenshotを形式に含めるか、スクリーンショットオプションを設定するリクエストはキャッシュをバイパスします。
  • 特別なファイルタイプ: バイナリファイルのダウンロードまたは生のPDFレンダリング。
  • デバッグ&ネットワーク: network_callsをキャプチャするか、非同期パーサージョブを使用する。

リンクの抽出

ページ上のリンクを収集するために、リクエストにlinks_on_pageオブジェクトを渡します。すべてのリンクは絶対URLとして返されます。
"links_on_page": {
  "include_links": ["/blog/*"],
  "exclude_links": ["*.pdf"],
  "query_to_order_links_by": "pricing"
}
  • include_links / exclude_links: 各リンクのURL パスに対して一致するグロブパターン。
  • query_to_order_links_by: このテキストに関連する順序で返されるリンクを再注文します。
グロブパターンはパスセグメントに一致します。単一の*/を越えません。したがって、"/blog/*""/blog/post-1"に一致しますが、インデックス"/blog"自体には一致しません。また、クエリ文字列はパスの一部ではないため、"/blog?tag=x"には決して一致しません。インデックスも含めるには、"/blog*"または"{/blog,/blog/**}"を使用します。

スクレイプ形式

formatsを使用して1つ以上の出力形式を選択します:
  • markdown: LLM対応のMarkdown
  • html: クリーンなHTML
  • text: プレーンテキスト
  • json: 構造化出力(パーサーまたはllm_extractを介して)
  • raw_pdf: ホストされたURLに抽出された生のPDFバイト
  • screenshot: アクションを介してスクリーンショットをキャプチャし、ホストされたURLを返す
出力キーはresult内に*_contentフィールドとして返され、*_hosted_urlも返されます。

構造化データの抽出

構造化JSONを抽出するには、ParsersまたはLLM抽出の2つの方法があります。

パーサーを使用する(スケールに推奨)

formats: ["json"]を定義し、パーサーidを提供します。
from olostep import Olostep

client = Olostep(api_key="YOUR_REAL_KEY")

result = client.scrapes.create(
    url_to_scrape="https://www.google.com/search?q=alexander+the+great&gl=us&hl=en",
    formats=["json"],
    parser="@olostep/google-search",
)

print(result.json_content)
import Olostep from 'olostep'

const client = new Olostep({ apiKey: 'YOUR_REAL_KEY' })

const result = await client.scrapes.create({
  url: 'https://www.google.com/search?q=alexander+the+great&gl=us&hl=en',
  formats: ['json'],
  parser: '@olostep/google-search',
})

console.log(result.json_content)
curl -s -X POST "https://api.olostep.com/v1/scrapes" \
  -H "Authorization: Bearer $OLOSTEP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url_to_scrape": "https://www.google.com/search?q=alexander+the+great&gl=us&hl=en",
    "formats": ["json"],
    "parser": {"id": "@olostep/google-search"}
  }'
olostep scrape "https://www.google.com/search?q=alexander+the+great&gl=us&hl=en" \
  --formats json \
  --payload-json '{"parser":{"id":"@olostep/google-search"}}'
const res = await fetch('https://api.olostep.com/v1/scrapes', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer <YOUR_API_KEY>', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    url_to_scrape: 'https://www.google.com/search?q=alexander+the+great&gl=us&hl=en',
    formats: ['json'],
    parser: { id: '@olostep/google-search' }
  })
})
console.log(await res.json())
import requests, json

endpoint = "https://api.olostep.com/v1/scrapes"
payload = {
  "url_to_scrape": "https://www.google.com/search?q=alexander+the+great&gl=us&hl=en",
  "formats": ["json"],
  "parser": { 
    "id": "@olostep/google-search" 
  }
}
headers = {
    "Authorization": "Bearer <YOUR_API_KEY>", 
    "Content-Type": "application/json"
}

res = requests.post(endpoint, json=payload, headers=headers)
print(json.dumps(res.json(), indent=2))
Olostepには人気のあるウェブサイト用のいくつかの事前構築されたパーサーがありますが、ダッシュボードを通じて独自のパーサーを作成することも、チームに依頼することもできます。 パーサーは自己修復し、ウェブサイトの最新バージョンに自動的に更新されます。

LLM抽出を使用する(スキーマおよび/またはプロンプト)

llm_extractをJSONスキーマ(schema)および/または自然言語の指示(prompt)で提供します。両方のパラメータを渡すことができますが、両方が提供される場合、schemaが優先されます。 代わりに、promptのみを渡す場合、LLMはプロンプトに基づいてデータを抽出し、データ構造を自分で決定します。
from olostep import LLMExtract, Olostep

client = Olostep(api_key="YOUR_REAL_KEY")

result = client.scrapes.create(
    url_to_scrape="https://www.berklee.edu/events/stefano-marchese-friends",
    formats=["markdown", "json"],
    llm_extract=LLMExtract(
        schema={
            "event": {
                "type": "object",
                "properties": {
                    "title": {"type": "string"},
                    "date": {"type": "string"},
                    "description": {"type": "string"},
                    "venue": {"type": "string"},
                    "address": {"type": "string"},
                    "start_time": {"type": "string"},
                },
            }
        }
    ),
)

print(result.json_content)
import Olostep from 'olostep'

const client = new Olostep({ apiKey: 'YOUR_REAL_KEY' })

const result = await client.scrapes.create({
  url: 'https://www.berklee.edu/events/stefano-marchese-friends',
  formats: ['markdown', 'json'],
  llmExtract: {
    schema: {
      event: {
        type: 'object',
        properties: {
          title: { type: 'string' },
          date: { type: 'string' },
          description: { type: 'string' },
          venue: { type: 'string' },
          address: { type: 'string' },
          start_time: { type: 'string' },
        },
      },
    },
  },
})

console.log(result.json_content)
curl -s -X POST "https://api.olostep.com/v1/scrapes" \
  -H "Authorization: Bearer $OLOSTEP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url_to_scrape": "https://www.berklee.edu/events/stefano-marchese-friends",
    "formats": ["json"],
    "llm_extract": {
      "prompt": "Extract the event title, date, description, venue, address, and start time from the page."
    }
  }'
olostep scrape "https://www.berklee.edu/events/stefano-marchese-friends" \
  --formats json \
  --payload-json '{"llm_extract":{"prompt":"Extract the event title, date, description, venue, address, and start time from the page."}}'
const res = await fetch('https://api.olostep.com/v1/scrapes', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer <YOUR_API_KEY>', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    url_to_scrape: 'https://www.berklee.edu/events/stefano-marchese-friends',
    formats: ['json'],
    llm_extract: {
      prompt: 'Extract the event title, date, description, venue, address, and start time from the page.'
    }
  })
})
console.log(await res.json())
import requests, json

endpoint = "https://api.olostep.com/v1/scrapes"
payload = {
  "url_to_scrape": "https://www.berklee.edu/events/stefano-marchese-friends",
  "formats": ["markdown", "json"],
  "llm_extract": {
    "schema": {
      "event": {
        "type": "object",
        "properties": {
          "title": {"type": "string"},
          "date": {"type": "string"},
          "description": {"type": "string"},
          "venue": {"type": "string"},
          "address": {"type": "string"},
          "start_time": {"type": "string"}
        }
      }
    }
  }
}
headers = {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
}
res = requests.post(endpoint, json=payload, headers=headers)
print(json.dumps(res.json(), indent=2))
注意: result.json_contentは文字列化されたJSONを返します。オブジェクトが必要な場合はコード内で解析してください。 価格: llm_extractは1回のスクレイプにつき10クレジットかかります。コストを下げるために、独自のAPIキーを持ち込むか、使用量ベースの価格設定を有効にすることができます。アクセスを取得するにはinfo@olostep.comに連絡してください。

ページ上のリンクを抽出

links_on_pageオプションを使用して、スクレイプするページに存在するすべてのリンクを抽出できます。抽出されたリンクをフィルタリングおよび順序付けするための次のパラメータを受け入れます:
  • absolute_links (boolean, default: true): trueの場合、相対パス(例:/page)ではなく完全なURL(例:https://example.com/page)を返します。
  • query_to_order_links_by (string): 提供されたクエリテキストとの類似性によって返されたリンクを順序付けし、最も関連性の高い一致を優先します。
  • include_links (array of strings): グロブパターンを使用して抽出されたリンクをフィルタリングします。*.pdfのようなパターンを使用してファイル拡張子に一致させたり、/blog/*で特定のパスに一致させたり、https://example.com/*のような完全なURLを使用します。ワイルドカード(*)、文字クラス([a-z])、選択({pattern1,pattern2})をサポートします。
  • exclude_links (array of strings): include_linksと同じ構文を使用して特定のリンクを除外します。

アクションでページと対話する

動的なサイトと対話するためにスクレイプ前にアクションを実行します。サポートされるアクション:
  • wait with milliseconds
  • click with selector
  • fill_input with selector and value
  • scroll with direction and amount
ページが読み込まれるようにするために、他のアクションの前後にwaitを使用することがよくあります。

from olostep import FillInputAction, Olostep, WaitAction

client = Olostep(api_key="YOUR_REAL_KEY")

result = client.scrapes.create(
    url_to_scrape="https://example.com/login",
    formats=["markdown"],
    actions=[
        FillInputAction(selector="input[type=email]", value="john@example.com"),
        WaitAction(milliseconds=500),
        FillInputAction(selector="input[type=password]", value="secret"),
        {"type": "click", "selector": "button[type=\"submit\"]"},
        WaitAction(milliseconds=1500),
    ],
)

print(result.markdown_content)
import Olostep from 'olostep'

const client = new Olostep({ apiKey: 'YOUR_REAL_KEY' })

const result = await client.scrapes.create({
  url: 'https://example.com/login',
  formats: ['markdown'],
  actions: [
    { type: 'fill_input', selector: 'input[type=email]', value: 'john@example.com' },
    { type: 'wait', milliseconds: 500 },
    { type: 'fill_input', selector: 'input[type=password]', value: 'secret' },
    { type: 'click', selector: 'button[type="submit"]' },
    { type: 'wait', milliseconds: 1500 },
  ],
})

console.log(result.markdown_content)
curl -s -X POST "https://api.olostep.com/v1/scrapes" \
  -H "Authorization: Bearer $OLOSTEP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url_to_scrape": "https://example.com/login",
    "formats": ["markdown"],
    "actions": [
      { "type": "fill_input", "selector": "input[type=email]", "value": "john@example.com" },
      { "type": "wait", "milliseconds": 500 },
      { "type": "fill_input", "selector": "input[type=password]", "value": "secret" },
      { "type": "click", "selector": "button[type=\"submit\"]" },
      { "type": "wait", "milliseconds": 1500 }
    ]
  }'
# アクションのような複雑なオプションには、JSONファイルを使用して--payload-fileを使用
olostep scrape "https://example.com/login" \
  --formats markdown \
  --payload-file actions.json

# actions.jsonの内容:
# {
#   "actions": [
#     {"type": "fill_input", "selector": "input[type=email]", "value": "john@example.com"},
#     {"type": "wait", "milliseconds": 500},
#     {"type": "fill_input", "selector": "input[type=password]", "value": "secret"},
#     {"type": "click", "selector": "button[type=\"submit\"]"},
#     {"type": "wait", "milliseconds": 1500}
#   ]
# }
const res = await fetch('https://api.olostep.com/v1/scrapes', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer <YOUR_API_KEY>', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    url_to_scrape: 'https://example.com/login',
    formats: ['markdown'],
    actions: [
      { type: 'fill_input', selector: 'input[type=email]', value: 'john@example.com' },
      { type: 'wait', milliseconds: 500 },
      { type: 'fill_input', selector: 'input[type=password]', value: 'secret' },
      { type: 'click', selector: 'button[type="submit"]' },
      { type: 'wait', milliseconds: 1500 }
    ]
  })
})
console.log(await res.json())
import requests, json

endpoint = "https://api.olostep.com/v1/scrapes"
payload = {
  "url_to_scrape": "https://example.com/login",
  "formats": ["markdown"],
  "actions": [
    {"type": "fill_input", "selector": "input[type=email]", "value": "john@example.com"},
    {"type": "wait", "milliseconds": 500},
    {"type": "fill_input", "selector": "input[type=password]", "value": "secret"},
    {"type": "click", "selector": "button[type=\"submit\"]"},
    {"type": "wait", "milliseconds": 1500}
  ]
}
headers = {
    "Authorization": "Bearer <YOUR_API_KEY>", 
    "Content-Type": "application/json"
}
res = requests.post(endpoint, json=payload, headers=headers)
print(json.dumps(res.json(), indent=2))
レスポンスには、要求された形式(例:markdown_content)が含まれます。

ユースケース

以下は、/scrapesエンドポイントを使用する顧客の実際のアプリケーションのいくつかです。

コンテンツ分析&リサーチ

  • 競合分析: 競合他社のウェブサイトから製品の詳細、価格、機能を抽出
  • 市場調査: ランディングページ、製品説明、顧客の声を分析
  • 学術研究: 科学出版物や研究ポータルから特定のデータを収集
  • 法的文書: 公式ウェブサイトからケーススタディ、規制、または法的先例を抽出

Eコマース&小売

  • 動的価格戦略: 競合店舗からリアルタイムの製品価格を取得
  • 製品情報管理: 詳細な仕様と説明を抽出
  • 在庫/インベントリ監視: 他の小売業者での製品の在庫状況を確認
  • レビュー分析: 特定の製品に関する消費者のフィードバックと感情を収集

マーケティング&コンテンツ作成

  • コンテンツキュレーション: ニュースレター用に関連する記事やブログ投稿を抽出
  • SEO分析: 競合他社のキーワード使用、メタディスクリプション、ページ構造を調査
  • リードジェネレーション: ビジネスディレクトリや企業ページから連絡先情報を抽出
  • インフルエンサーリサーチ: インフルエンサープロフィールからエンゲージメントメトリクスとコンテンツスタイルを収集
  • パーソナライズされたソーシャルメディア生成: 顧客のウェブサイトを分析してAI駆動のソーシャルメディアマーケティングを作成

データアプリケーション

  • AIトレーニングデータ収集: 機械学習モデルのための特定の例を収集
  • カスタムナレッジベース構築: ソフトウェアサイトからドキュメントや指示を抽出
  • 歴史的データアーカイブ: 特定の時点でのウェブサイトコンテンツを保存
  • 構造化データ抽出: ウェブコンテンツを分析用にフォーマットされたデータセットに変換

モニタリング&アラート

  • 規制コンプライアンスモニタリング: 法的または規制ウェブサイトの変更を追跡
  • 危機管理: 特定のイベントや組織の言及をニュースサイトでモニタリング
  • イベントトラッキング: 会場や主催者のウェブサイトからのイベントの詳細を抽出
  • サービスステータスモニタリング: 特定のプラットフォームやツールのサービスステータスページを確認

出版&メディア

  • ニュース集約: 公式ソースからの速報ニュースを抽出
  • メディアモニタリング: ニュースサイトで特定のトピックを追跡
  • コンテンツ検証: 主張や発言を事実確認するための情報を抽出
  • マルチメディア抽出: メディアライブラリ用に埋め込まれたビデオ、画像、またはオーディオを収集

金融アプリケーション

  • 投資リサーチ: 企業ウェブサイトから財務諸表や年次報告書を抽出
  • 経済指標: 政府や金融機関のウェブサイトから経済データを収集
  • 暗号通貨データ: リアルタイムの価格と市場キャップ情報を抽出
  • 金融ニュース分析: 特定の市場シグナルをニュースサイトでモニタリング

技術的アプリケーション

  • APIドキュメント抽出: リファレンス用に技術文書を収集
  • 統合テスト: サードパーティ統合を検証するためにウェブサイト要素を抽出
  • アクセシビリティテスト: アクセシビリティ基準への準拠のためにウェブサイト構造を分析
  • ウェブアーカイブ作成: 歴史的保存のためにウェブサイトコンテンツ全体をキャプチャ

統合シナリオ

  • CRMシステム: 企業ウェブサイトやLinkedinからのデータで顧客プロファイルを強化
  • コンテンツ管理システム: 関連する外部コンテンツをインポート
  • ビジネスインテリジェンスツール: 外部市場情報で内部データを補完
  • プロジェクト管理ソフトウェア: クライアントウェブサイトからの仕様や要件を抽出
  • カスタムダッシュボード: 内部メトリクスと並んで抽出されたデータを表示

エラーハンドリング

すべてのエラーは共有エンベロープ形状に従います。error.typeerror.codeをチェックしてプログラム的に分岐します:
{
  "id": "error_abc123",
  "object": "error",
  "created": 1745673871,
  "url": "https://example.com",
  "metadata": {},
  "error": {
    "type": "...",
    "code": "...",
    "message": "..."
  }
}
HTTPerror.typeerror.code意味
400invalid_request_errordns_resolution_failedドメインが存在しないか、URLにタイプミスがあります。
400invalid_request_errorinvalid_urlURLが不正です。
502invalid_request_errortls_errorウェブサイトに無効または互換性のないTLS/SSL証明書があります。error.detailには低レベルのSSLコードが含まれます。
504request_timeoutscrape_poll_timeoutスクレイプが約55秒の待ち時間内に完了しませんでした。

DNS失敗 (400)

ドメインが解決されません。URLにタイプミスがないか確認してください。
{
  "error": {
    "type": "invalid_request_error",
    "code": "dns_resolution_failed",
    "message": "URLにタイプミスがあるか、ドメインが存在しません。"
  }
}

TLS/SSLエラー (502)

ターゲットウェブサイトに壊れたまたは互換性のないHTTPS構成があります。error.detailは診断用に特定のSSLエラーコードを提供します。error.codeは常にtls_errorです。
{
  "error": {
    "type": "invalid_request_error",
    "code": "tls_error",
    "detail": "err_ssl_tlsv1_alert_internal_error",
    "message": "ウェブサイトがTLSハンドシェイクを閉じるか拒否しました。サーバーが誤って構成されているか、サポートされていないSSL/TLSバージョンを使用している可能性があります。"
  }
}

リクエストタイムアウト (504)

スクレイプが待ち時間内に完了しませんでした。ページが遅い、ボット保護されている、または一時的に利用できない可能性があります。このレスポンスは再試行しても安全です。
{
  "error": {
    "type": "request_timeout",
    "code": "scrape_poll_timeout",
    "message": "スクレイプ結果を待っている間にリクエストがタイムアウトしました。ページが遅い、フェッチャーに対してブロックされている、または一時的に利用できない可能性があります。"
  }
}

価格

スクレイプはデフォルトで1クレジットかかります。parsersを使用する場合、コストはパーサーによって異なります(1〜5クレジット)。LLM extractを使用する場合、10クレジットかかります。