APIリファレンス

ウェブスクレイピング APIリファレンス

公開ウェブページをHTML、Markdown、またはテキストとして取得します。同期と非同期のオプションに対応しています。 このリファレンスで操作を選び、文書化されたレスポンス契約を統合できます。

操作

POST /v1/scrape/jobs APIリファレンスを見る
GET /v1/scrape/jobs/:job_id APIリファレンスを見る
GET /v1/scrape/jobs/:job_id/results APIリファレンスを見る

POST /v1/scrape

操作: scrapePage クレジットと認証: 1-20 認証が必要
POST /v1/scrape

ボディパラメータ

パラメータ タイプ 必須
url string 必須
mode string
許可された値 standardresilientrenderedrendered_resilient
デフォルト standard
オプション
output string
許可された値 htmltextmarkdown
デフォルト html
オプション

レスポンスフィールド

フィールド タイプ
data object
data.url string
data.final_url string
data.status integer | null
data.outcome string
data.content_type string | null
data.content string
data.bytes integer
data.truncated boolean
data.redirect_count integer
data.attempt_count integer
data.duration_ms integer
data.fetched_at string
data.headers object
data.rendered boolean
billing object
billing.credits_charged integer
billing.credits_refunded integer
billing.credits_per_item integer
billing.credits_net integer
billing.policy string

リクエスト例

curl -X POST "https://domscan.net/v1/scrape" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "url": "https://example.com/",
  "mode": "standard",
  "output": "markdown"
}'

レスポンス例

{
  "data": {
    "url": "https://example.com",
    "final_url": "https://example.com",
    "status": 1,
    "outcome": "success",
    "content_type": "string",
    "content": "string",
    "bytes": 1,
    "truncated": true,
    "redirect_count": 1,
    "attempt_count": 1,
    "duration_ms": 1,
    "fetched_at": "2026-04-15T12:00:00Z",
    "headers": {},
    "rendered": true
  },
  "billing": {
    "credits_charged": 1,
    "credits_refunded": 1,
    "credits_per_item": 1,
    "credits_net": 1,
    "policy": "effort_based"
  }
}

POST /v1/scrape/jobs

操作: createScrapeJob クレジットと認証: 1-20 認証が必要
POST /v1/scrape/jobs

ボディパラメータ

パラメータ タイプ 必須
mode string
許可された値 standardresilientrenderedrendered_resilient
デフォルト standard
オプション
output string
許可された値 htmltextmarkdown
デフォルト html
オプション
urls unknown[] 必須

レスポンスフィールド

フィールド タイプ
job object
job.id string
job.status string
job.mode string
job.output string
job.total integer
job.counts object
job.counts.pending integer
job.counts.processing integer
job.counts.succeeded integer
job.counts.failed integer
job.billing object
job.billing.credits_charged integer
job.billing.credits_refunded integer
job.billing.credits_per_item integer
job.billing.credits_net integer
job.billing.policy string
job.status_url string
job.results_url string
job.poll_after_ms integer | null
job.created_at string
job.started_at string | null
job.completed_at string | null
job.updated_at string
job.processing_deadline_at string
job.results_expires_at string
idempotent_replay boolean

リクエスト例

curl -X POST "https://domscan.net/v1/scrape/jobs" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "mode": "resilient",
  "output": "text",
  "urls": [
    "https://example.com/",
    {
      "url": "https://example.org/",
      "reference": "page-2"
    }
  ]
}'

レスポンス例

{
  "job": {
    "id": "string",
    "status": "queued",
    "mode": "standard",
    "output": "html",
    "total": 1,
    "counts": {
      "pending": 1,
      "processing": 1,
      "succeeded": 1,
      "failed": 1
    },
    "billing": {
      "credits_charged": 1,
      "credits_refunded": 1,
      "credits_per_item": 1,
      "credits_net": 1,
      "policy": "effort_based"
    },
    "status_url": "https://example.com",
    "results_url": "https://example.com",
    "poll_after_ms": 1,
    "created_at": "2026-04-15T12:00:00Z",
    "started_at": "2026-04-15T12:00:00Z",
    "completed_at": "2026-04-15T12:00:00Z",
    "updated_at": "2026-04-15T12:00:00Z",
    "processing_deadline_at": "2026-04-15T12:00:00Z",
    "results_expires_at": "2026-04-15T12:00:00Z"
  },
  "idempotent_replay": true
}

GET /v1/scrape/jobs/:job_id

操作: getScrapeJob クレジットと認証: 無料 認証が必要
GET /v1/scrape/jobs/:job_id

クエリパラメータ

パラメータ タイプ 必須
job_id string 必須

レスポンスフィールド

フィールド タイプ
job object
job.id string
job.status string
job.mode string
job.output string
job.total integer
job.counts object
job.counts.pending integer
job.counts.processing integer
job.counts.succeeded integer
job.counts.failed integer
job.billing object
job.billing.credits_charged integer
job.billing.credits_refunded integer
job.billing.credits_per_item integer
job.billing.credits_net integer
job.billing.policy string
job.status_url string
job.results_url string
job.poll_after_ms integer | null
job.created_at string
job.started_at string | null
job.completed_at string | null
job.updated_at string
job.processing_deadline_at string
job.results_expires_at string

リクエスト例

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/scrape/jobs/example.com"

レスポンス例

{
  "job": {
    "id": "string",
    "status": "queued",
    "mode": "standard",
    "output": "html",
    "total": 1,
    "counts": {
      "pending": 1,
      "processing": 1,
      "succeeded": 1,
      "failed": 1
    },
    "billing": {
      "credits_charged": 1,
      "credits_refunded": 1,
      "credits_per_item": 1,
      "credits_net": 1,
      "policy": "effort_based"
    },
    "status_url": "https://example.com",
    "results_url": "https://example.com",
    "poll_after_ms": 1,
    "created_at": "2026-04-15T12:00:00Z",
    "started_at": "2026-04-15T12:00:00Z",
    "completed_at": "2026-04-15T12:00:00Z",
    "updated_at": "2026-04-15T12:00:00Z",
    "processing_deadline_at": "2026-04-15T12:00:00Z",
    "results_expires_at": "2026-04-15T12:00:00Z"
  }
}

GET /v1/scrape/jobs/:job_id/results

操作: getScrapeJobResults クレジットと認証: 無料 認証が必要
GET /v1/scrape/jobs/:job_id/results

クエリパラメータ

パラメータ タイプ 必須
job_id string 必須
limit integer
デフォルト 20
オプション
offset integer
デフォルト 0
オプション

レスポンスフィールド

フィールド タイプ
job object
job.id string
job.status string
job.mode string
job.output string
job.total integer
job.counts object
job.counts.pending integer
job.counts.processing integer
job.counts.succeeded integer
job.counts.failed integer
job.billing object
job.billing.credits_charged integer
job.billing.credits_refunded integer
job.billing.credits_per_item integer
job.billing.credits_net integer
job.billing.policy string
job.status_url string
job.results_url string
job.poll_after_ms integer | null
job.created_at string
job.started_at string | null
job.completed_at string | null
job.updated_at string
job.processing_deadline_at string
job.results_expires_at string
results[] object[]
results[] object
results[].index integer
results[].url string
results[].reference string
results[].status string
results[].data object
results[].data.url string
results[].data.final_url string
results[].data.status integer | null
results[].data.outcome string
results[].data.content_type string | null
results[].data.content string
results[].data.bytes integer
results[].data.truncated boolean
results[].data.redirect_count integer
results[].data.attempt_count integer
results[].data.duration_ms integer
results[].data.fetched_at string
results[].data.headers object
results[].data.rendered boolean
results[].billing object
results[].billing.credits_charged integer
results[].billing.credits_refunded integer
results[].billing.credits_per_item integer
results[].billing.credits_net integer
results[].billing.policy string
pagination object

リクエスト例

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/scrape/jobs/example.com/results?limit=25&offset=0"

レスポンス例

{
  "job": {
    "id": "string",
    "status": "queued",
    "mode": "standard",
    "output": "html",
    "total": 1,
    "counts": {
      "pending": 1,
      "processing": 1,
      "succeeded": 1,
      "failed": 1
    },
    "billing": {
      "credits_charged": 1,
      "credits_refunded": 1,
      "credits_per_item": 1,
      "credits_net": 1,
      "policy": "effort_based"
    },
    "status_url": "https://example.com",
    "results_url": "https://example.com",
    "poll_after_ms": 1,
    "created_at": "2026-04-15T12:00:00Z",
    "started_at": "2026-04-15T12:00:00Z",
    "completed_at": "2026-04-15T12:00:00Z",
    "updated_at": "2026-04-15T12:00:00Z",
    "processing_deadline_at": "2026-04-15T12:00:00Z",
    "results_expires_at": "2026-04-15T12:00:00Z"
  },
  "results": [
    {
      "index": 1,
      "url": "https://example.com",
      "reference": "string",
      "status": "pending",
      "data": {
        "url": "https://example.com",
        "final_url": "https://example.com",
        "status": 1,
        "outcome": "success",
        "content_type": "string",
        "content": "string",
        "bytes": 1,
        "truncated": true,
        "redirect_count": 1,
        "attempt_count": 1,
        "duration_ms": 1,
        "fetched_at": "2026-04-15T12:00:00Z",
        "headers": {},
        "rendered": true
      },
      "billing": {
        "credits_charged": 1,
        "credits_refunded": 1,
        "credits_per_item": 1,
        "credits_net": 1,
        "policy": "effort_based"
      }
    }
  ],
  "pagination": {}
}

リファレンスリソース