> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zenrows.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Autoparse

> Learn how ZenRows Autoparse automatically extracts structured JSON data from web pages without requiring custom parsers or manual HTML parsing.

Extract structured data from any website automatically with ZenRows' Autoparse feature. Instead of parsing HTML manually, Autoparse uses advanced algorithms to identify and extract key data points in clean JSON format.

## How Autoparse works

Autoparse analyzes the HTML structure and content of web pages to identify meaningful data patterns. The algorithms recognize common website elements such as titles, prices, descriptions, images, dates, and other structured information using semantic markup, CSS classes, and content positioning.

This process extracts content such as:

* Product details (title, price, description, images, ratings)
* Article content (headline, author, publication date, body text)
* Job listings (title, company, location, salary, requirements)
* Contact information (names, addresses, phone numbers, emails)
* Event details (title, date, location, description)

The feature automatically adapts to different website structures and layouts, making it particularly useful for scraping multiple sites with varying designs or for quickly prototyping data extraction workflows.

<Warning>Remember that Autoparse is an automatic feature designed for general-purpose extraction. It may not capture all fields on every website. Always test requests to verify that all required data is present before implementing in production.</Warning>

## Basic usage

Enable Autoparse by adding the `autoparse=true` parameter to your ZenRows request:

<CodeGroup>
  ```python Python theme={null}
  # pip install requests
  import requests

  url = 'https://www.scrapingcourse.com/ecommerce/'
  apikey = 'YOUR_ZENROWS_API_KEY'
  params = {
      'url': url,
      'apikey': apikey,
      'autoparse': 'true',
  }
  response = requests.get('https://api.zenrows.com/v1/', params=params)
  print(response.text)
  ```

  ```javascript Node.js theme={null}
  // npm install axios
  const axios = require('axios');

  const url = 'https://www.scrapingcourse.com/ecommerce/';
  const apikey = 'YOUR_ZENROWS_API_KEY';
  axios({
      url: 'https://api.zenrows.com/v1/',
      method: 'GET',
      params: {
          'url': url,
          'apikey': apikey,
          'autoparse': 'true',
      },
  })
      .then(response => console.log(response.data))
      .catch(error => console.log(error));
  ```

  ```java Java theme={null}
  import org.apache.hc.client5.http.fluent.Request;

  public class APIRequest {
      public static void main(final String... args) throws Exception {
          String apiUrl = "https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.scrapingcourse.com%2Fecommerce%2F&autoparse=true";
          String response = Request.get(apiUrl)
                  .execute().returnContent().asString();

          System.out.println(response);
      }
  }
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.scrapingcourse.com%2Fecommerce%2F&autoparse=true');
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  $response = curl_exec($ch);
  echo $response . PHP_EOL;
  curl_close($ch);
  ?>
  ```

  ```go Go theme={null}
  package main

  import (
      "io"
      "log"
      "net/http"
  )

  func main() {
      client := &http.Client{}
      req, err := http.NewRequest("GET", "https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.scrapingcourse.com%2Fecommerce%2F&autoparse=true", nil)
      if err != nil {
          log.Fatalln(err)
      }
      resp, err := client.Do(req)
      if err != nil {
          log.Fatalln(err)
      }
      defer resp.Body.Close()

      body, err := io.ReadAll(resp.Body)
      if err != nil {
          log.Fatalln(err)
      }

      log.Println(string(body))
  }
  ```

  ```ruby Ruby theme={null}
  # gem install faraday
  require 'faraday'

  url = URI.parse('https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.scrapingcourse.com%2Fecommerce%2F&autoparse=true')
  conn = Faraday.new()
  conn.options.timeout = 180
  res = conn.get(url, nil, nil)
  print(res.body)
  ```

  ```bash cURL theme={null}
  curl "https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.scrapingcourse.com%2Fecommerce%2F&autoparse=true"
  ```
</CodeGroup>

This example extracts structured data from the Scraping Course eCommerce page. Instead of receiving raw HTML, you get organized JSON data containing key information automatically identified by Autoparse.

## When to use Autoparse

**Content extraction needs:**

* **E-commerce scraping** - Product catalogs, pricing data, reviews, and specifications
* **News and media** - Article content, headlines, author information, and publication dates
* **Job board aggregation** - Job listings, company details, requirements, and salary information
* **Real estate data** - Property listings, prices, descriptions, and location details
* **Event information** - Event details, dates, venues, and other event information

**Development scenarios:**

* **Rapid prototyping** - Quick data extraction without writing custom parsers
* **Multi-site scraping** - Extracting similar data from different website layouts
* **Unknown site structures** - When you need to explore what data is available
* **Proof of concept projects** - Testing data availability before building custom solutions

**For dynamic content that loads via JavaScript, combine Autoparse with JavaScript Rendering:**

<CodeGroup>
  ```python Python theme={null}
  # pip install requests
  import requests

  url = 'https://www.scrapingcourse.com/ecommerce/'
  apikey = 'YOUR_ZENROWS_API_KEY'
  params = {
      'url': url,
      'apikey': apikey,
      'autoparse': 'true',
      'js_render': 'true',
  }
  response = requests.get('https://api.zenrows.com/v1/', params=params)
  print(response.text)
  ```

  ```javascript Node.js theme={null}
  // npm install axios
  const axios = require('axios');

  const url = 'https://www.scrapingcourse.com/ecommerce/';
  const apikey = 'YOUR_ZENROWS_API_KEY';
  axios({
      url: 'https://api.zenrows.com/v1/',
      method: 'GET',
      params: {
          'url': url,
          'apikey': apikey,
          'autoparse': 'true',
          'js_render': 'true',
      },
  })
      .then(response => console.log(response.data))
      .catch(error => console.log(error));
  ```

  ```java Java theme={null}
  import org.apache.hc.client5.http.fluent.Request;

  public class APIRequest {
      public static void main(final String... args) throws Exception {
          String apiUrl = "https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.scrapingcourse.com%2Fecommerce%2F&autoparse=true&js_render=true";
          String response = Request.get(apiUrl)
                  .execute().returnContent().asString();

          System.out.println(response);
      }
  }
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.scrapingcourse.com%2Fecommerce%2F&autoparse=true&js_render=true');
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  $response = curl_exec($ch);
  echo $response . PHP_EOL;
  curl_close($ch);
  ?>
  ```

  ```go Go theme={null}
  package main

  import (
      "io"
      "log"
      "net/http"
  )

  func main() {
      client := &http.Client{}
      req, err := http.NewRequest("GET", "https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.scrapingcourse.com%2Fecommerce%2F&autoparse=true&js_render=true", nil)
      if err != nil {
          log.Fatalln(err)
      }
      resp, err := client.Do(req)
      if err != nil {
          log.Fatalln(err)
      }
      defer resp.Body.Close()

      body, err := io.ReadAll(resp.Body)
      if err != nil {
          log.Fatalln(err)
      }

      log.Println(string(body))
  }
  ```

  ```ruby Ruby theme={null}
  # gem install faraday
  require 'faraday'

  url = URI.parse('https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.scrapingcourse.com%2Fecommerce%2F&autoparse=true&js_render=true')
  conn = Faraday.new()
  conn.options.timeout = 180
  res = conn.get(url, nil, nil)
  print(res.body)
  ```

  ```bash cURL theme={null}
  curl "https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.scrapingcourse.com%2Fecommerce%2F&autoparse=true&js_render=true"
  ```
</CodeGroup>

This combination ensures that dynamically loaded content is available for parsing while still providing structured JSON output. For more information about JavaScript Rendering, see the [JavaScript Rendering](/universal-scraper-api/features/js-rendering) documentation.

## Comparing extraction methods

| Method             | Best for                                        | Pros                                                | Cons                                   |
| ------------------ | ----------------------------------------------- | --------------------------------------------------- | -------------------------------------- |
| **Autoparse**      | Quick extraction, multiple sites, prototyping   | No coding required, works across sites, JSON output | Less control, may miss specific fields |
| **CSS Extractor**  | Specific data, single site, custom requirements | Full control, precise targeting, efficient          | Requires HTML knowledge, site-specific |
| **Custom Parsing** | Complex logic, data transformation              | Maximum flexibility, custom processing              | Time-intensive, maintenance overhead   |

## Troubleshooting

### Common issues and solutions

| Issue                              | Cause                          | Solution                                                 |
| ---------------------------------- | ------------------------------ | -------------------------------------------------------- |
| **Missing expected data**          | Content not in standard format | Contact support for analysis or switch to custom parsing |
| **Empty or incomplete extraction** | JavaScript-loaded content      | Add `js_render=true` and `wait` parameters               |
| **Page blocked or captcha**        | Site protection systems        | Combine `js_render=true` + `premium_proxy=true`          |
| **Unexpected data structure**      | Site uses non-standard markup  | Test with manual CSS Extractor instead of Autoparse      |

### Improving extraction accuracy

When Autoparse doesn't capture all the data you need:

<Steps>
  <Step title="Test if the content loads dynamically">
    ```python Python theme={null}
    # For empty or missing content, enable JavaScript rendering
    params = {
        'autoparse': 'true',
        'js_render': 'true',
        'wait': '3000',  # Wait for content to load
    }
    ```
  </Step>

  <Step title="Bypass protection if the site is blocked">
    ```python Python theme={null}
    # For blocked pages or captchas
    params = {
        'autoparse': 'true',
        'js_render': 'true',
        'premium_proxy': 'true',
    }
    ```
  </Step>

  <Step title="Wait for specific elements to appear">
    ```python Python theme={null}
    # Wait for specific elements to appear
    params = {
        'autoparse': 'true',
        'js_render': 'true',
        'wait_for': '.product-price',
    }
    ```
  </Step>

  <Step title="Contact support or switch to manual parsing">
    If Autoparse consistently misses the specific fields you need, contact ZenRows support for analysis, or consider switching to the manual CSS Extractor for precise control.

    <Warning>Remember that Autoparse is an automatic feature designed for general-purpose extraction. It may not capture all fields on every website. Always run test requests to verify that all required data is present before implementing in production.</Warning>
  </Step>
</Steps>

## Pricing

The `autoparse=true` parameter is included at **no additional cost** with all ZenRows requests - you only pay extra for JavaScript Render and Premium Proxy when used.

<Tip>
  You can monitor your ZenRows usage in multiple ways to stay informed about your account activity and prevent unexpected overages.

  **Dashboard monitoring**: View real-time usage statistics, remaining requests, success rates, and request history on your [Analytics Page](https://app.zenrows.com/analytics/scraper-api). You can also set up usage alerts in your [notification settings](https://app.zenrows.com/account/notifications) to receive notifications when you approach your limits.

  **Programmatic monitoring**: For automated monitoring in your applications, call the `/v1/subscriptions/self/details` endpoint with your API key in the `X-API-Key` header. This returns real-time usage data that you can integrate into your monitoring systems. [Learn more about the usage endpoint](https://docs.zenrows.com/universal-scraper-api/features/other#plan-usage).

  **Response header monitoring**: Track your concurrency usage through response headers included with each request:

  * `Concurrency-Limit`: Your maximum concurrent requests
  * `Concurrency-Remaining`: Available concurrent request slots
  * `X-Request-Cost`: Cost of the current request
</Tip>

## Frequently Asked Questions (FAQ)

<Accordion title="What types of websites work best with Autoparse?">
  Autoparse works best with structured content sites like e-commerce stores, news websites, job boards, real estate listings, and social media platforms. Sites with clear content hierarchy and semantic markup provide the most accurate results.
</Accordion>

<Accordion title="Can I combine Autoparse with other ZenRows features?">
  Yes, Autoparse works with all ZenRows features, except other output features like JSON Response or Markdown Response.
</Accordion>

<Accordion title="What happens if Autoparse doesn't find the data I need?">
  If Autoparse misses specific data points feel free to contact ZenRows support for analysis or consider switching to manual CSS Extractor for precise control.
</Accordion>

<Accordion title="Does Autoparse work with JavaScript-heavy websites?">
  Autoparse processes whatever HTML is available. For JavaScript-heavy sites, combine it with `js_render=true` to ensure dynamic content is loaded before parsing. This combination provides comprehensive extraction for modern web applications.
</Accordion>
