ZenRows

App · 13 actions

Fetch public webpages and check your ZenRows plan usage.

Actions

ActionWhat it does
Fetch pageFetch the content of a public webpage.
Get plan usageGet request limits and credit usage for your ZenRows plan.
List batch jobsList batch jobs.
List runs of a job (newest first)List runs of a job (newest first).
List the domains Extract servesList the domains Extract serves.
List the domains your account submittedList the domains your account submitted.
List your crawlsList your crawls.
Page through per-task results for the latest run of a jobPage through per-task results for the latest run of a job.
Read a crawl and its resultsRead a crawl and its results.
Read a job and its latest runRead a job and its latest run.
Read the monthly preparation allowanceRead the monthly preparation allowance.
Start a crawlStart a crawl.
Track a domain's preparationTrack a domain's preparation.

Fetch page

Fetch the content of a public webpage.

Inputs

UrlurltextRequired
Public HTTP or HTTPS URL to fetch.
Js renderjs_rendertrue/false
Wait for the page’s JavaScript to render.
Wait forwait_fortext
CSS selector to wait for when rendering JavaScript.
Waitwaitnumber
Milliseconds to wait after the page loads.From 0 to 30000.
Css extractorcss_extractorobject
Map output field names to CSS selectors.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {
    "content": "example",
    "content_type": "example",
    "request_cost": "example"
  }
}

Get plan usage

Get request limits and credit usage for your ZenRows plan.

Inputs

None.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {}
}

List batch jobs

List batch jobs.

Inputs

Statusstatustext
Status.One of: open, closed, deleted.
Typetypetext
Type.One of: regular, scheduled.
Limitlimitnumber
Page size, 1 to 100 (larger values are treated as 100). Not a positive integer → 400.From 1 to 100.
Cursorcursortext
Opaque; echo the previous response's `next_cursor` to continue.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {
    "jobs": [
      {
        "created_at": "example",
        "external_id": "example",
        "format": "html",
        "job_id": "example",
        "latest_run": {
          "created_at": {},
          "failure_detail": {},
          "failure_reason": {},
          "ingest_status": {},
          "job_id": {},
          "last_batch_received": {},
          "pause_state": {},
          "run_id": {},
          "run_sequence": {},
          "stats": {},
          "status": {},
          "trigger": {},
          "updated_at": {}
        },
        "metadata": {},
        "name": "example",
        "next_scheduled_run": "example",
        "schedule": {
          "at": {},
          "calendar": {},
          "rate": {},
          "timezone": {}
        },
        "schedule_state": "active",
        "status": "open",
        "template_tasks": [
          {}
        ],
        "type": "regular",
        "updated_at": "example",
        "webhook": {
          "signature": {},
          "url": {}
        },
        "zenrows_params": {}
      }
    ],
    "next_cursor": "example"
  }
}

List runs of a job (newest first)

List runs of a job (newest first).

Inputs

Jobjob_idtextRequired
Assigned by the server on submit.
Limitlimitnumber
Page size, 1 to 100 (larger values are treated as 100). Not a positive integer → 400.From 1 to 100.
Cursorcursortext
Cursor.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {
    "next_cursor": "example",
    "runs": [
      {
        "created_at": "example",
        "failure_detail": "example",
        "failure_reason": "insufficient_credits",
        "ingest_status": "pending",
        "job_id": "example",
        "last_batch_received": true,
        "pause_state": "active",
        "run_id": "example",
        "run_sequence": 1,
        "stats": {
          "completed": {},
          "failed": {},
          "failure_reasons": {},
          "spend": {},
          "successful": {},
          "total": {}
        },
        "status": "running",
        "trigger": "manual",
        "updated_at": "example"
      }
    ]
  }
}

List the domains Extract serves

List the domains Extract serves.

Inputs

None.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {
    "domains": [
      {
        "domain": "example",
        "verticals": [
          {}
        ],
        "warm": true
      }
    ]
  }
}

List the domains your account submitted

List the domains your account submitted.

Inputs

None.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {
    "allowance": {
      "limit": 1,
      "month": "example",
      "remaining": 1,
      "used": 1
    },
    "domains": [
      {
        "domain": "example",
        "failure": {
          "code": {},
          "detail": {},
          "slot_consumed": {}
        },
        "roles": [
          {}
        ],
        "state": "example",
        "status": "preparing",
        "submitted_at": "example",
        "updated_at": "example"
      }
    ]
  }
}

List your crawls

List your crawls.

Inputs

Cursorcursortext
The `next_cursor` from the previous page.
Limitlimitnumber
How many crawls to return.From 1 to 100.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {
    "crawls": [
      {
        "coverage": {
          "items_found": {},
          "pages_failed": {},
          "pages_fetched": {}
        },
        "crawl_id": "example",
        "created_at": "example",
        "depth": 1,
        "discovery": [
          {}
        ],
        "duplicates_removed": 1,
        "error": {
          "code": {},
          "detail": {}
        },
        "exclude_patterns": [
          {}
        ],
        "finished_at": "example",
        "include_patterns": [
          {}
        ],
        "max_items": 1,
        "max_pages": 1,
        "output_format": "html",
        "status": "running",
        "stop_reason": "max_items",
        "url": "example"
      }
    ],
    "next_cursor": "example"
  }
}

Page through per-task results for the latest run of a job

Page through per-task results for the latest run of a job.

Inputs

Jobjob_idtextRequired
Assigned by the server on submit.
Statusstatustext
`processing` covers both `pending` and `processing` taskOne of: all, successful, failed, processing.
Cursorcursortext
Opaque pagination token; echo `next_cursor`.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {
    "next_cursor": "example",
    "results": [
      {
        "created_at": "example",
        "error": {
          "code": {},
          "detail": {},
          "instance": {},
          "invalid_tasks": {},
          "status": {},
          "title": {},
          "type": {}
        },
        "external_id": "example",
        "metadata": {},
        "method": "GET",
        "result_url": "example",
        "run_id": "example",
        "source_run_id": "example",
        "spend": {
          "last_attempt": {},
          "total": {}
        },
        "status": "pending",
        "task_id": "example",
        "type": "html",
        "updated_at": "example",
        "url": "example"
      }
    ]
  }
}

Read a crawl and its results

Read a crawl and its results.

Inputs

Crawlcrawl_idtextRequired
The crawl's ID, as returned when it started.
Cursorcursortext
The `next_cursor` from the previous read. Omit it to start from the first result.
Limitlimitnumber
How many results to return.From 1 to 10000.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {
    "coverage": {
      "items_found": 1,
      "pages_failed": 1,
      "pages_fetched": 1
    },
    "crawl_id": "example",
    "created_at": "example",
    "depth": 1,
    "discovery": [
      "links"
    ],
    "duplicates_removed": 1,
    "error": {
      "code": "seed_unreachable",
      "detail": "example"
    },
    "exclude_patterns": [
      "example"
    ],
    "finished_at": "example",
    "include_patterns": [
      "example"
    ],
    "max_items": 1,
    "max_pages": 1,
    "next_cursor": "example",
    "output_format": "html",
    "results": [
      {
        "content_status": "pending",
        "content_url": "example",
        "url": "example"
      }
    ],
    "status": "running",
    "stop_reason": "max_items",
    "url": "example"
  }
}

Read a job and its latest run

Read a job and its latest run.

Inputs

Jobjob_idtextRequired
Assigned by the server on submit.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {
    "created_at": "example",
    "external_id": "example",
    "format": "html",
    "job_id": "example",
    "latest_run": {
      "created_at": "example",
      "failure_detail": "example",
      "failure_reason": "insufficient_credits",
      "ingest_status": "pending",
      "job_id": "example",
      "last_batch_received": true,
      "pause_state": "active",
      "run_id": "example",
      "run_sequence": 1,
      "stats": {
        "completed": 1,
        "failed": 1,
        "failure_reasons": {},
        "spend": {
          "cost": {},
          "credits": {}
        },
        "successful": 1,
        "total": 1
      },
      "status": "running",
      "trigger": "manual",
      "updated_at": "example"
    },
    "metadata": {},
    "name": "example",
    "next_scheduled_run": "example",
    "schedule": {
      "at": "example",
      "calendar": {
        "cadence": {
          "daily": {},
          "monthly": {},
          "weekly": {}
        },
        "times_of_day": [
          {}
        ]
      },
      "rate": {
        "every": 1,
        "unit": "minute"
      },
      "timezone": "example"
    },
    "schedule_state": "active",
    "status": "open",
    "template_tasks": [
      {
        "body": {},
        "external_id": "example",
        "metadata": {},
        "method": "GET",
        "url": "example",
        "zenrows_params": {}
      }
    ],
    "type": "regular",
    "updated_at": "example",
    "webhook": {
      "signature": true,
      "url": "example"
    },
    "zenrows_params": {}
  }
}

Read the monthly preparation allowance

Read the monthly preparation allowance.

Inputs

None.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {
    "limit": 1,
    "month": "example",
    "remaining": 1,
    "used": 1
  }
}

Start a crawl

Start a crawl.

Inputs

UrlurltextRequired
The start URL: a public `http` or `https` URL. The crawl starts on this exact URL and stays on its domain, subdomains included.
Depthdepthnumber
How many link steps to follow from the start URL. At `1`, the links on the start page. Omit it to follow links until `max_items` or `max_pages` stops the crawl.From 1 to 100000.
Max itemsmax_itemsnumber
Stop after keeping this many URLs.From 1 to 100000.
Max pagesmax_pagesnumber
Stop after fetching this many pages. Caps what the crawl costs. If both limits are reached together, `stop_reason` is `max_pages`.From 1 to 100000.
Include patternsinclude_patternslist
Keep, and open, only URLs that contain at least one of these texts, such as `/product/`. The start URL is never returned.
Exclude patternsexclude_patternslist
Drop URLs that contain any of these texts, even when they match an include pattern.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {
    "coverage": {
      "items_found": 1,
      "pages_failed": 1,
      "pages_fetched": 1
    },
    "crawl_id": "example",
    "created_at": "example",
    "depth": 1,
    "discovery": [
      "links"
    ],
    "duplicates_removed": 1,
    "error": {
      "code": "seed_unreachable",
      "detail": "example"
    },
    "exclude_patterns": [
      "example"
    ],
    "finished_at": "example",
    "include_patterns": [
      "example"
    ],
    "max_items": 1,
    "max_pages": 1,
    "next_cursor": "example",
    "output_format": "html",
    "results": [
      {
        "content_status": "pending",
        "content_url": "example",
        "url": "example"
      }
    ],
    "status": "running",
    "stop_reason": "max_items",
    "url": "example"
  }
}

Track a domain's preparation

Track a domain's preparation.

Inputs

DomaindomaintextRequired
The domain, without scheme.

Outputs

dataobject
The response from ZenRows.
Example output
{
  "data": {
    "domain": "example",
    "failure": {
      "code": "example",
      "detail": "example",
      "slot_consumed": true
    },
    "roles": [
      {
        "detail": "example",
        "role": "example",
        "status": "example",
        "url": "example"
      }
    ],
    "state": "example",
    "status": "preparing",
    "submitted_at": "example",
    "updated_at": "example"
  }
}

On this page