Skip to main content

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.

The outputs parameter lets you specify exactly which data types to extract from a scraped page. Instead of parsing raw HTML yourself, ZenRows does the extraction for you and returns a clean, structured JSON response. This is useful when you only need specific elements (like emails, links, or headings) and want to skip the overhead of processing full HTML responses.
The parameter accepts a comma-separated list of filter names. You can also use outputs=* to retrieve all available data types at once.
import requests

url = "https://www.scrapingcourse.com/ecommerce/"
apikey = "YOUR_ZENROWS_API_KEY"

params = {
    "url": url,
    "apikey": apikey,
    "outputs": "emails,headings,menus",
}

response = requests.get("https://api.zenrows.com/v1/", params=params)
print(response.text)

Available filters

Extracts email addresses from the page using CSS selectors and regular expressions. This includes standard formats like example@example.com as well as obfuscated versions like example[at]example.com and support at support dot com.Example: outputs=emails
{
  "emails": [
    "example@example.com",
    "info@website.com",
    "contact[at]domain.com",
    "support at support dot com"
  ]
}
Extracts phone numbers by targeting tel: protocol links and applying regular expressions to detect common formats.Example: outputs=phone_numbers
{
  "phone_numbers": [
    "+1-800-555-5555",
    "(123) 456-7890",
    "+44 20 7946 0958"
  ]
}
Extracts all heading text from h1 through h6 elements, giving you a quick structural outline of the page.Example: outputs=headings
{
  "headings": [
    "Welcome to Our Website",
    "Our Services",
    "Contact Us",
    "FAQ"
  ]
}
Extracts image sources from img tags. Only the src attribute is returned.Example: outputs=images
{
  "images": [
    "https://example.com/image1.jpg",
    "https://example.com/image2.png"
  ]
}
Extracts audio sources from source elements nested inside audio tags. Only the src attribute is returned.Example: outputs=audios
{
  "audios": [
    "https://example.com/audio1.mp3",
    "https://example.com/audio2.wav"
  ]
}
Extracts video sources from source elements nested inside video tags. Only the src attribute is returned.Example: outputs=videos
{
  "videos": [
    "https://example.com/video1.mp4",
    "https://example.com/video2.webm"
  ]
}
Extracts hashtags from page content using regular expressions, matching standard formats like #example.Example: outputs=hashtags
{
  "hashtags": [
    "#vacation",
    "#summer2024",
    "#travel"
  ]
}
Extracts name and content attributes from meta tags in the head section. Each entry is returned in name: content format.Example: outputs=metadata
{
  "metadata": [
    "description: This is an example webpage.",
    "keywords: example, demo, website",
    "author: John Doe"
  ]
}
Extracts data from table elements and returns it as structured JSON, including the table dimensions, column headings, and row content.Example: outputs=tables
{
  "dimensions": {
    "rows": 4,
    "columns": 4,
    "heading": true
  },
  "heading": ["A", "B", "C", "D"],
  "content": [
    {"A": "1", "B": "1", "C": "1", "D": "1"},
    {"A": "2", "B": "2", "C": "2", "D": "2"},
    {"A": "3", "B": "3", "C": "3", "D": "3"},
    {"A": "4", "B": "4", "C": "4", "D": "4"}
  ]
}
Extracts the favicon URL from the link element in the head section.Example: outputs=favicon
{
  "favicon": "https://example.com/favicon.ico"
}

When to use output filters

Output filters are the right choice when you know exactly which data types you need and don’t want to deal with raw HTML. They’re particularly well-suited for:
  • Lead generation and outreach — use emails and phone_numbers to collect contact information from directories, company pages, or listings.
  • SEO and content audits — combine headings, metadata, links, and favicon to analyze page structure and on-page signals across multiple URLs.
  • E-commerce and media monitoring — use images, videos, and tables to track product listings, pricing tables, or media assets.
  • Social and community research — use hashtags to monitor trending topics or branded tags across public pages.
  • Navigation and site mapping — use menus and links to map out a site’s structure without scraping full page content.
Output filters work on the final rendered HTML. If the data you need is loaded dynamically via JavaScript, enable js_render=true alongside your outputs parameter.

Best practices

Only request what you need:
Each filter adds a small processing overhead. Requesting outputs=* is convenient during exploration, but in production you should specify only the filters relevant to your use case.
Combine filters in a single request:
You can pass multiple filters as a comma-separated list (outputs=emails,links,metadata) rather than making separate requests. This keeps your credit usage efficient.
Use js_render for dynamic content:
If a page loads its content via JavaScript (single-page apps, lazy-loaded sections), the filters will only capture what’s present in the initial HTML unless you also pass js_render=true.
Use wait or wait_for for delayed content:
If the content is loaded after a delay or via JavaScript, use wait or wait_for to wait for the content to load before extracting it.
Validate output shape before parsing:
Some filters return a flat array (like emails or links) while others return structured objects (like tables). Check the response shape for each filter before building your parser.
Handle empty results gracefully:
If a filter finds no matching elements on the page, it returns an empty array. Credits are still charged for any request that returns a 200 status code, regardless of whether the filters matched anything. Make sure your pipeline verifies that the target page actually contains the data you need before running it at scale.

Troubleshooting

This usually means the target content is loaded dynamically via JavaScript. Add js_render=true to your request to render the page before extraction. If the data still doesn’t appear, inspect the raw HTML response first (without outputs) to confirm the elements are present in the DOM.Also, enable js_render=true and wait or wait_for to wait for the content to load before extracting it. You can find more details on our Troubleshooting Partial or Empty Responses guide.
ZenRows detects common obfuscation patterns like [at] and at domain dot com, but some sites use custom JavaScript-based obfuscation that only resolves after rendering. Enable js_render=true to capture those cases. If the email is injected purely via client-side script with no HTML representation, it may not be extractable with output filters alone.
The tables filter targets standard HTML table elements. If the site renders its tables as div grids or uses CSS to simulate table layout, the filter won’t pick them up. In that case, use css_extractor with a custom CSS selector instead.

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.
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. You can also set up usage alerts in your notification settings 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.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

FAQ (Frequently Asked Questions)

Yes, output filters are fully compatible with all other ZenRows parameters. You can combine outputs with js_render, autoparse, custom_headers, and any other parameter your request needs.
No, using the outputs parameter does not add extra credit cost. You pay the same credit rate as a standard request for that URL, regardless of how many filters you include.
The filter returns an empty array for that key, and the rest of your requested filters are still returned normally. Keep in mind that credits are charged based on a successful 200 response, not on whether the filters returned data. If you’re running filters at scale, validate that the target pages actually contain the elements you’re looking for before sending large batches.
You can, but it’s not recommended for high-volume pipelines. Requesting all filters adds unnecessary processing for data types you don’t need. Use outputs=* during development to explore what’s available, then narrow it down to the specific filters your use case requires before going to production.
Output filters are a feature of the Universal Scraper API and are passed as query parameters. They are not available in Scraping Browser (CDP/Playwright) sessions, where you handle data extraction directly in your script using standard browser APIs.
There is no hard limit on the number of filters you can combine. You can pass all available filters in a single request using outputs=* or by listing them individually. In practice, the response size grows with each filter, so only request what you actually need.