> ## 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

> Autoparse returns general-purpose JSON from a page. It is deprecated in favor of Zenrows Extract (extract=auto), which builds a tailored extraction for each website.

<Warning>
  **Autoparse is deprecated. Use [Extract](/extract/setup) (`extract=auto`) instead.**

  The `autoparse` parameter still works and existing integrations keep running, so nothing breaks today. It is no longer the recommended way to get JSON from a page, and new integrations should start with Extract. Any sunset will be announced separately, with notice.
</Warning>

Autoparse returns structured JSON instead of raw HTML. A small set of sites has a dedicated parser behind the parameter; on every other site, Autoparse returns the JSON objects it finds embedded in the page's `<script>` tags, which may or may not hold the data you are after.

## Migrate to Extract

Swap one parameter. Everything else about the request stays the same:

<CodeGroup>
  ```python Python theme={"dark"}
  # before
  params = {'url': url, 'apikey': apikey, 'autoparse': 'true'}

  # after
  params = {'url': url, 'apikey': apikey, 'extract': 'auto'}
  ```

  ```javascript Node.js theme={"dark"}
  // before
  params: { url: url, apikey: apikey, autoparse: 'true' }

  // after
  params: { url: url, apikey: apikey, extract: 'auto' }
  ```

  ```bash cURL theme={"dark"}
  # before
  curl "https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=YOUR_URL&autoparse=true"

  # after
  curl "https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=YOUR_URL&extract=auto"
  ```
</CodeGroup>

Two things change, so test before you switch a production job over:

* **The response shape.** Autoparse returns whatever JSON it can find on the page, with no guaranteed keys. Extract returns named fields for the entities on the page, so any code that reads Autoparse output by position or by a key it discovered by inspection needs updating.
* **Domain coverage.** Extract serves [prepared domains](/extract/setup#domain-coverage). If yours is not prepared yet, [request it](/extract/endpoints#getting-a-domain-prepared); preparation usually takes minutes and then applies to every Zenrows API key.

On the eCommerce page used throughout this guide, the difference is concrete:

| Parameter        | What comes back                                                                                                                                                  |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `autoparse=true` | The JSON embedded in the page: WordPress and WooCommerce configuration objects and a breadcrumb list. The product listing is not part of it.                     |
| `extract=auto`   | The 188 products, each with `name`, `price`, `currency`, `sku`, `availability`, `image_url` and `product_url`, plus a `page_context` object with the pagination. |

## How Autoparse works

Autoparse takes one of two paths, depending on the site:

* **A dedicated parser**, where Zenrows ships one for that site. These cover a limited set of well-known sites and return named fields such as product details, job listings or search results.
* **Embedded JSON**, everywhere else. Autoparse collects the JSON objects it finds in the page's `<script>` tags and returns them as an array. On sites that render their data into those objects this is useful; on sites that do not, it returns page configuration and little else.

Neither path is tailored to the site you are requesting, which is the gap [Extract](/extract/setup) closes: it builds and maintains an extraction per domain and returns named fields for the entities on the page.

<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={"dark"}
  # 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={"dark"}
  // 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={"dark"}
  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={"dark"}
  <?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={"dark"}
  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={"dark"}
  # 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={"dark"}
  curl "https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fwww.scrapingcourse.com%2Fecommerce%2F&autoparse=true"
  ```
</CodeGroup>

This returns JSON instead of raw HTML. What that JSON holds depends on the site: a dedicated parser where one exists, otherwise the JSON objects embedded in the page. On this eCommerce page it is WordPress and WooCommerce configuration rather than the product listing, which is what [Extract](/extract/setup) returns instead.

## Where Autoparse is still used

New integrations should start with [Extract](/extract/setup). These are the cases the parameter covers today:

**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={"dark"}
  # 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={"dark"}
  // 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={"dark"}
  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={"dark"}
  <?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={"dark"}
  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={"dark"}
  # 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={"dark"}
  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](/fetch/features/js-rendering) documentation.

## Comparing extraction methods

| Method                             | Best for                                        | Pros                                                                           | Cons                                                                                |
| ---------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| **Extract** (`extract=auto`, Beta) | Any site where you want structured data         | Tailored to each website, adapts when the site's layout changes, richer fields | The domain has to be prepared first                                                 |
| **Autoparse** (deprecated)         | Integrations already built on it                | No coding required, works across sites, JSON output                            | General-purpose rules, often returns page scaffolding rather than the data you want |
| **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={"dark"}
    # 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={"dark"}
    # 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={"dark"}
    # 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. [Extract](/extract/setup) may also capture more complete fields once the domain is prepared.

    <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/overview#performance). You can also set up usage alerts in your [notification settings](https://app.zenrows.com/settings/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/fetch/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. If you also set `extract=auto` (Beta) on the same request, Extract takes precedence and Autoparse is ignored for that request.
</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>

<Accordion title="What replaces Autoparse?">
  [Extract](/extract/setup) (`extract=auto`). Instead of applying the same general-purpose rules to every website, it builds a dedicated extraction for each individual site, which returns richer fields and adapts automatically when the site's layout changes. See [Migrate to Extract](#migrate-to-extract) for the parameter swap and what changes in the response.
</Accordion>

<Accordion title="Is the autoparse parameter going away?">
  Not today. It is deprecated, which means it still works and existing integrations keep running, but it is no longer recommended and new work should start with [Extract](/extract/setup). If a removal is scheduled, it will be announced separately with notice.
</Accordion>
