# WebScraping.AI

> Read any web page as HTML or clean text, pull out just the parts you name, ask AI questions about it, and search Google, with proxies and JavaScript rendering handled for you.

App · AI Agents · 8 actions. Web page: https://docs.lodol.com/docs/integrations/webscraping-ai

## Actions

### Ask about a page

Load a web page and answer a question about it in plain language: 'is this in stock?', 'who wrote this?', 'what does it cost?'. No selectors needed, and the answer survives a redesign of the page.

**Inputs**

- Page URL (`url`, text, required): The web page to load, starting with http:// or https://.
- Question (`question`, text, required): What to ask about the page, written the way you would ask a colleague.
- Render JavaScript (`render_javascript`, true/false): Leave this on so pages that draw their content with JavaScript come back complete. Turn it off for plain HTML pages; it is faster and costs fewer credits. Default: `true`.
- Wait for element (`wait_for`, text): Optional. A CSS selector to wait for before reading the page. Use it when the part you need appears a moment after the rest of the page.
- Proxy type (`proxy`, text): Optional. How to route the visit when a site turns automated traffic away. Each step up costs more credits, so move up only if the page comes back blocked. Standard is used when this is left empty. One of: `datacenter` (Standard — fastest and cheapest), `residential` (Residential — for sites that block data centres), `stealth` (Stealth — for sites with the strongest bot protection).
- Visit from (`country`, text): Optional. Visit the page from this country. Useful for sites that show different prices, stock or content by region. Defaults to the United States. One of: `us` (United States), `gb` (United Kingdom), `de` (Germany), `it` (Italy), `fr` (France), `ca` (Canada), `es` (Spain), `ru` (Russia), `jp` (Japan), `kr` (South Korea), and 3 more.
- Device (`device`, text): Optional. Which kind of device to visit as. Pick Mobile to get the mobile version of a page. Defaults to Desktop. One of: `desktop`, `mobile`, `tablet`.

**Outputs**

- `answer` (text): The answer, in plain language
- `question` (text): The question that was asked
- `url` (text): The page that was read

**Example output**

```json
{
  "answer": "Yes \u2014 the page shows it as in stock and ready to ship.",
  "question": "Is this product in stock right now?",
  "url": "https://example.com/product"
}
```

### Check remaining credits

See how many credits the connected WebScraping.AI account has left and when its plan renews. Useful as a first step in a long run, or on a schedule that warns you before you run out.

**Inputs**: None.

**Outputs**

- `email` (text): The account the connected key belongs to
- `plan_renews_at` (text): When the plan's credits reset (UTC)
- `remaining_credits` (number): Credits left in total
- `remaining_plan_credits` (number): Credits left on this month's plan
- `remaining_simultaneous_requests` (number): How many more requests this plan can have running at the same moment
- `remaining_topup_credits` (number): Credits left from top-ups, spent after the plan's own credits run out

**Example output**

```json
{
  "email": "you@example.com",
  "plan_renews_at": "2026-10-01T00:00:00Z",
  "remaining_credits": 12450,
  "remaining_plan_credits": 2450,
  "remaining_simultaneous_requests": 5,
  "remaining_topup_credits": 10000
}
```

### Extract fields from a page

Load a web page and pull out the fields you name, each described in your own words. Point it at a product, a listing or a profile and get back tidy values ready for a spreadsheet or a record.

**Inputs**

- Page URL (`url`, text, required): The web page to load, starting with http:// or https://.
- Fields to extract (`fields`, object, required): The fields you want. Name each one, and describe what it is so the page can be read for it: 'price' → 'Current product price'. Up to 20.
- Render JavaScript (`render_javascript`, true/false): Leave this on so pages that draw their content with JavaScript come back complete. Turn it off for plain HTML pages; it is faster and costs fewer credits. Default: `true`.
- Wait for element (`wait_for`, text): Optional. A CSS selector to wait for before reading the page. Use it when the part you need appears a moment after the rest of the page.
- Proxy type (`proxy`, text): Optional. How to route the visit when a site turns automated traffic away. Each step up costs more credits, so move up only if the page comes back blocked. Standard is used when this is left empty. One of: `datacenter` (Standard — fastest and cheapest), `residential` (Residential — for sites that block data centres), `stealth` (Stealth — for sites with the strongest bot protection).
- Visit from (`country`, text): Optional. Visit the page from this country. Useful for sites that show different prices, stock or content by region. Defaults to the United States. One of: `us` (United States), `gb` (United Kingdom), `de` (Germany), `it` (Italy), `fr` (France), `ca` (Canada), `es` (Spain), `ru` (Russia), `jp` (Japan), `kr` (South Korea), and 3 more.
- Device (`device`, text): Optional. Which kind of device to visit as. Pick Mobile to get the mobile version of a page. Defaults to Desktop. One of: `desktop`, `mobile`, `tablet`.

**Outputs**

- `field_names` (list): The field names that were asked for
- `fields` (object): The values found, under the field names you asked for. A field the page didn't answer is empty.
- `url` (text): The page that was read

**Example output**

```json
{
  "field_names": [
    "title",
    "price",
    "availability"
  ],
  "fields": {
    "availability": "In stock",
    "price": "$39.95",
    "title": "Aeropress Go"
  },
  "url": "https://example.com/product"
}
```

### Get a page as text

Load a web page and return it as clean Markdown, with the menus, adverts and scripts stripped out and the headings, lists and tables kept. This is the shape to hand to an AI step, or to save as a readable record of a page.

**Inputs**

- Page URL (`url`, text, required): The web page to load, starting with http:// or https://.
- Include links (`include_links`, true/false): Also return every link in the page's text. Useful when one step should feed the next: loop over the links and read each page in turn. Default: `false`.
- Render JavaScript (`render_javascript`, true/false): Leave this on so pages that draw their content with JavaScript come back complete. Turn it off for plain HTML pages; it is faster and costs fewer credits. Default: `true`.
- Wait for element (`wait_for`, text): Optional. A CSS selector to wait for before reading the page. Use it when the part you need appears a moment after the rest of the page.
- Proxy type (`proxy`, text): Optional. How to route the visit when a site turns automated traffic away. Each step up costs more credits, so move up only if the page comes back blocked. Standard is used when this is left empty. One of: `datacenter` (Standard — fastest and cheapest), `residential` (Residential — for sites that block data centres), `stealth` (Stealth — for sites with the strongest bot protection).
- Visit from (`country`, text): Optional. Visit the page from this country. Useful for sites that show different prices, stock or content by region. Defaults to the United States. One of: `us` (United States), `gb` (United Kingdom), `de` (Germany), `it` (Italy), `fr` (France), `ca` (Canada), `es` (Spain), `ru` (Russia), `jp` (Japan), `kr` (South Korea), and 3 more.
- Device (`device`, text): Optional. Which kind of device to visit as. Pick Mobile to get the mobile version of a page. Defaults to Desktop. One of: `desktop`, `mobile`, `tablet`.

**Outputs**

- `description` (text): The page's meta description, when it has one
- `links` (list): Links found in the page's text, empty unless 'Include links' was turned on
- `markdown` (text): The page's content as Markdown
- `title` (text): The page's title
- `url` (text): The page that was read

**Example output**

```json
{
  "description": "A travel press that brews a full cup in a minute.",
  "links": [
    "https://example.com/product/aeropress-go",
    "https://example.com/shipping"
  ],
  "markdown": "# Aeropress Go\n\n**$39.95**\n\nA travel press that brews a full cup in a minute.\n\n- Brews in 60 seconds\n- Packs into its own mug\n",
  "title": "Aeropress Go \u2014 Example Coffee",
  "url": "https://example.com/product"
}
```

### Get a page's HTML

Load a web page and return its HTML, exactly as a browser would see it once the page has finished drawing itself. Use this when a later step needs the raw markup.

**Inputs**

- Page URL (`url`, text, required): The web page to load, starting with http:// or https://.
- Render JavaScript (`render_javascript`, true/false): Leave this on so pages that draw their content with JavaScript come back complete. Turn it off for plain HTML pages; it is faster and costs fewer credits. Default: `true`.
- Wait for element (`wait_for`, text): Optional. A CSS selector to wait for before reading the page. Use it when the part you need appears a moment after the rest of the page.
- Proxy type (`proxy`, text): Optional. How to route the visit when a site turns automated traffic away. Each step up costs more credits, so move up only if the page comes back blocked. Standard is used when this is left empty. One of: `datacenter` (Standard — fastest and cheapest), `residential` (Residential — for sites that block data centres), `stealth` (Stealth — for sites with the strongest bot protection).
- Visit from (`country`, text): Optional. Visit the page from this country. Useful for sites that show different prices, stock or content by region. Defaults to the United States. One of: `us` (United States), `gb` (United Kingdom), `de` (Germany), `it` (Italy), `fr` (France), `ca` (Canada), `es` (Spain), `ru` (Russia), `jp` (Japan), `kr` (South Korea), and 3 more.
- Device (`device`, text): Optional. Which kind of device to visit as. Pick Mobile to get the mobile version of a page. Defaults to Desktop. One of: `desktop`, `mobile`, `tablet`.

**Outputs**

- `character_count` (number): How many characters of HTML came back
- `html` (text): The page's full HTML
- `url` (text): The page that was read

**Example output**

```json
{
  "character_count": 108,
  "html": "<html><head><title>Aeropress Go</title></head><body><h1>Aeropress Go</h1><p class=\"price\">$39.95</p></body></html>",
  "url": "https://example.com/product"
}
```

### Get part of a page

Load a web page and return only the part a CSS selector matches: a price, a headline, a table. Saves a later step from sifting through the whole page.

**Inputs**

- Page URL (`url`, text, required): The web page to load, starting with http:// or https://.
- CSS selector (`selector`, text, required): The part of the page to return, written as a CSS selector. If you can highlight it in a browser's inspector, this is what it shows you.
- Render JavaScript (`render_javascript`, true/false): Leave this on so pages that draw their content with JavaScript come back complete. Turn it off for plain HTML pages; it is faster and costs fewer credits. Default: `true`.
- Wait for element (`wait_for`, text): Optional. A CSS selector to wait for before reading the page. Use it when the part you need appears a moment after the rest of the page.
- Proxy type (`proxy`, text): Optional. How to route the visit when a site turns automated traffic away. Each step up costs more credits, so move up only if the page comes back blocked. Standard is used when this is left empty. One of: `datacenter` (Standard — fastest and cheapest), `residential` (Residential — for sites that block data centres), `stealth` (Stealth — for sites with the strongest bot protection).
- Visit from (`country`, text): Optional. Visit the page from this country. Useful for sites that show different prices, stock or content by region. Defaults to the United States. One of: `us` (United States), `gb` (United Kingdom), `de` (Germany), `it` (Italy), `fr` (France), `ca` (Canada), `es` (Spain), `ru` (Russia), `jp` (Japan), `kr` (South Korea), and 3 more.
- Device (`device`, text): Optional. Which kind of device to visit as. Pick Mobile to get the mobile version of a page. Defaults to Desktop. One of: `desktop`, `mobile`, `tablet`.

**Outputs**

- `character_count` (number): How many characters of HTML came back
- `html` (text): The HTML of what the selector matched
- `selector` (text): The CSS selector that was matched
- `url` (text): The page that was read

**Example output**

```json
{
  "character_count": 27,
  "html": "<p class=\"price\">$39.95</p>",
  "selector": ".price",
  "url": "https://example.com/product"
}
```

### Get several parts of a page

Load a web page once and return what each of several CSS selectors matched, kept separate and in the order you listed them. One visit instead of one per field.

**Inputs**

- Page URL (`url`, text, required): The web page to load, starting with http:// or https://.
- CSS selectors (`selectors`, list, required): The parts of the page to return, as CSS selectors. Up to 20; each one comes back with everything it matched.
- Render JavaScript (`render_javascript`, true/false): Leave this on so pages that draw their content with JavaScript come back complete. Turn it off for plain HTML pages; it is faster and costs fewer credits. Default: `true`.
- Wait for element (`wait_for`, text): Optional. A CSS selector to wait for before reading the page. Use it when the part you need appears a moment after the rest of the page.
- Proxy type (`proxy`, text): Optional. How to route the visit when a site turns automated traffic away. Each step up costs more credits, so move up only if the page comes back blocked. Standard is used when this is left empty. One of: `datacenter` (Standard — fastest and cheapest), `residential` (Residential — for sites that block data centres), `stealth` (Stealth — for sites with the strongest bot protection).
- Visit from (`country`, text): Optional. Visit the page from this country. Useful for sites that show different prices, stock or content by region. Defaults to the United States. One of: `us` (United States), `gb` (United Kingdom), `de` (Germany), `it` (Italy), `fr` (France), `ca` (Canada), `es` (Spain), `ru` (Russia), `jp` (Japan), `kr` (South Korea), and 3 more.
- Device (`device`, text): Optional. Which kind of device to visit as. Pick Mobile to get the mobile version of a page. Defaults to Desktop. One of: `desktop`, `mobile`, `tablet`.

**Outputs**

- `match_count` (number): How many elements matched in total
- `matches` (list): One row per selector, in the order given
- `selectors` (list): The selectors that were asked for, in order
- `url` (text): The page that was read

**Example output**

```json
{
  "match_count": 2,
  "matches": [
    {
      "html": [
        "<h1>Aeropress Go</h1>"
      ],
      "match_count": 1,
      "selector": "h1"
    },
    {
      "html": [
        "<p class=\"price\">$39.95</p>"
      ],
      "match_count": 1,
      "selector": ".price"
    }
  ],
  "selectors": [
    "h1",
    ".price"
  ],
  "url": "https://example.com/product"
}
```

### Search Google

Run a Google search and get the results back as a list: position, title, link and snippet. Feed the links into the page actions to read what they point at.

**Inputs**

- Search (`query`, text, required): What to search for, exactly as you would type it into Google.
- Search from (`country`, text): Optional. Search as if from this country. Defaults to the United States. One of: `af` (Afghanistan), `ax` (Åland Islands), `al` (Albania), `dz` (Algeria), `as` (American Samoa), `ad` (Andorra), `ao` (Angola), `ai` (Anguilla), `aq` (Antarctica), `ag` (Antigua and Barbuda), and 239 more.
- Results language (`language`, text): Optional. Ask Google for results in this language. Defaults to English. One of: `af` (Afrikaans), `sq` (Albanian), `am` (Amharic), `ar` (Arabic), `az` (Azerbaijani), `eu` (Basque), `be` (Belarusian), `bn` (Bengali), `bs` (Bosnian), `bg` (Bulgarian), and 72 more.
- Page (`page`, number): Which page of results to return, ten per page. 1 is the first page. At least 1. Default: `1`.

**Outputs**

- `country` (text): The country the search was run from
- `language` (text): The language the results were asked for in
- `next_page` (number): The next page number to ask for, or 0 if this is the last page
- `page` (number): Which page of results these are
- `query` (text): The search that was run
- `result_count` (number): How many results came back
- `results` (list): The organic results, best first

**Example output**

```json
{
  "country": "us",
  "language": "en",
  "next_page": 2,
  "page": 1,
  "query": "best travel coffee press",
  "result_count": 2,
  "results": [
    {
      "displayed_link": "example.com",
      "link": "https://example.com/best-travel-coffee-presses",
      "position": 1,
      "snippet": "We brewed 240 cups on the road to find the presses worth the luggage space.",
      "title": "The 6 Best Travel Coffee Presses of 2026"
    },
    {
      "displayed_link": "example.org",
      "link": "https://example.org/aeropress-go-review",
      "position": 2,
      "snippet": "A full cup in a minute, in a mug that packs itself.",
      "title": "Aeropress Go review"
    }
  ]
}
```
