Référence API

API Web scraping

Récupérez des pages web publiques au format HTML, Markdown ou texte, avec des options synchrones et asynchrones. Utilisez cette référence pour choisir une opération et intégrer son contrat de réponse documenté.

Opérations

POST /v1/scrape Voir la référence API
POST /v1/scrape/jobs Voir la référence API
GET /v1/scrape/jobs/:job_id Voir la référence API
GET /v1/scrape/jobs/:job_id/results Voir la référence API

POST /v1/scrape

Opération: scrapePage Crédits et authentification: 1-20 Authentification requise
POST /v1/scrape

Paramètres du Corps

Paramètre Type requis
url string requis
mode string
Valeurs autorisées standardresilientrenderedrendered_resilient
Défaut standard
optionnel
output string
Valeurs autorisées htmltextmarkdown
Défaut html
optionnel

Champs de Réponse

Champ Type
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

Exemple de Requête

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"
}'

Exemple de Réponse

{
  "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

Opération: createScrapeJob Crédits et authentification: 1-20 Authentification requise
POST /v1/scrape/jobs

Paramètres du Corps

Paramètre Type requis
mode string
Valeurs autorisées standardresilientrenderedrendered_resilient
Défaut standard
optionnel
output string
Valeurs autorisées htmltextmarkdown
Défaut html
optionnel
urls unknown[] requis

Champs de Réponse

Champ Type
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

Exemple de Requête

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"
    }
  ]
}'

Exemple de Réponse

{
  "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

Opération: getScrapeJob Crédits et authentification: Gratuit Authentification requise
GET /v1/scrape/jobs/:job_id

Paramètres de Requête

Paramètre Type requis
job_id string requis

Champs de Réponse

Champ Type
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

Exemple de Requête

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

Exemple de Réponse

{
  "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

Opération: getScrapeJobResults Crédits et authentification: Gratuit Authentification requise
GET /v1/scrape/jobs/:job_id/results

Paramètres de Requête

Paramètre Type requis
job_id string requis
limit integer
Défaut 20
optionnel
offset integer
Défaut 0
optionnel

Champs de Réponse

Champ Type
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

Exemple de Requête

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

Exemple de Réponse

{
  "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": {}
}

Ressources de référence