How to Find the Correct ID or Query for Your URL?
When using ZenRows, knowing the right identifier (ID) or query for a given URL is crucial. Whether you’re extracting product details, searching for listings, or retrieving reviews, each platform has a unique way of structuring URLs. This guide explains how to find the correct ID or query for different APIs so you can make accurate and efficient requests.
/dp/B07FZ8S74R
B07FZ8S74R
The Amazon Standard Identification Number (ASIN) is the unique product ID, found after /dp/
in the URL.
Example Request: https://www.amazon.com/dp/B07FZ8S74R
/s?k=Echo+Dot
Echo Dot
Amazon search URLs contain the query after ?k=
. This query must be URL-encoded when making requests.
Example Request: https://www.amazon.com/s?k=Echo+Dot
/ip/5074872077
5074872077
Walmart product pages include a numeric item ID, which appears right after /ip/
in the URL.
Example Request: https://www.walmart.com/ip/5074872077
/reviews/product/5074872077
5074872077
The Walmart Review API uses the same product ID as the main product page, found after /reviews/product/
.
Example Request: https://www.walmart.com/reviews/product/5074872077
/search?q=Wireless+Headphones
Wireless Headphones
The search query appears after ?q=
in the URL and should be URL-encoded when used in API requests.
Example Request: https://www.walmart.com/search?q=Wireless+Headphones
/inmueble/106605370/
123456789
Idealista property pages include a numeric identifier found after /inmueble/
.
Example Request: https://www.idealista.com/inmueble/106605370/
Idealista search results do not use a unique ID because they return multiple listings instead of a single property.
Example Request: https://www.idealista.com/venta-viviendas/madrid-madrid
/homedetails/112-Treadwell-Ave-Staten-Island-NY-10302/32297624_zpid/
32297624
Zillow property pages include a zpid
, found near the end of the URL before _zpid/
.
Example Request: https://www.zillow.com/homedetails/112-Treadwell-Ave-Staten-Island-NY-10302/32297624_zpid/
/homes/for_sale/San-Francisco-CA/
Zillow search results do not have a unique identifier because they display multiple property listings instead of a single home.
Example Request: https://www.zillow.com/homes/for_sale/San-Francisco-CA/
/search?q=nintendo&udm=14
Nintendo
The search query appears after ?q=
in the URL and should be URL-encoded when making API requests.
Example Request: https://www.google.com/search?q=nintendo&udm=14
How to Switch to the Scraper APIs?
The ZenRows® Scraper APIs provide a more efficient and specialized way to extract structured data from popular websites. If you’re currently using the Universal Scraper API, switching to the Scraper APIs can simplify your setup, ensure predictable pricing, and improve performance. This guide walks you through the transition process for a seamless upgrade to the Scraper APIs.
The Scraper APIs are designed to streamline web scraping by offering dedicated endpoints for specific use cases. Unlike the Universal Scraper API, which requires custom configurations for proxies, JavaScript rendering, and anti-bot measures, the Scraper APIs handle these complexities for you. Key benefits include:
Predictable Pricing: Scraper APIs offer a competitive fixed price per successful request, ensuring clear and consistent cost management for your scraping needs.
No Setup, Parsing, or Maintenance Required: With the Scraper APIs, simply select the API use case, and we handle all the anti-bot configuration. This means you can focus on extracting valuable data while we ensure the API responses are structured and reliable. Enjoy high success rates and continuous data streams with no maintenance on your end.
The core of the ZenRows API is the API Endpoint, which is structured based on the industry, target website, type of request, and query parameters. This modular approach allows you to extract data efficiently from various sources.
Each part of the URL serves a specific purpose:
<INDUSTRY>
The industry category (e.g., ecommerce, realestate, serp).<WEBSITE>
The target website (e.g., amazon, idealista, google).<TYPE_OF_REQUEST>
The type of data you want (e.g., products, reviews, search).<QUERY_ID_URL>
The unique identifier for the request, such as a product ID, property ID, or query.<YOUR_ZENROWS_API_KEY>
Your personal API key for authentication and access.Here’s an example for Amazon Product Information API:
Breaking it down:
ecommerce
amazon
products
{asin}
(Amazon Standard Identification Number, used for product lookup)Depending on the website, you may include extra parameters to refine your request:
.tld
Specify the top-level domain (e.g., .com
, .co.uk
, .de
).country
Set the country code to retrieve localized data.filters
Apply filters to extract specific data.Switching to the Scraper APIs requires minimal code changes. Below is an example of how to transition from the Universal Scraper API to a dedicated Scraper API.
Update the API Endpoint
Replace the existing Universal Scraper API endpoint with the dedicated endpoint for Amazon products. The new endpoint follows this format:
Where {asin}
is the unique Amazon product identifier.
Simplify the Parameters
The Scraper APIs are optimized to handle common scraping tasks, such as JS rendering and proxy management, without needing to specify additional parameters like js_render
or premium_proxy
. Simply pass the apikey
and any other relevant parameters (such as country
or tld
) and you’re good to go.
Test the New API Call
Once you’ve made the necessary changes to your code, run it to test the new API call. The response will be structured data tailored to your scraping use case, such as product name, price, and description.
Update the API Endpoint
Replace the existing Universal Scraper API endpoint with the dedicated endpoint for Zillow property data. The new endpoint follows this format:
Where {zpid}
is the unique Zillow property identifier.
Simplify the Parameters
The Scraper APIs are optimized to handle common scraping tasks, such as JS rendering and proxy management, without requiring additional parameters like js_render
or premium_proxy
. Simply provide the apikey along with any other relevant parameters (such as country
or tld
), and you’re good to go.
Test the New API Call
Once you’ve made the necessary changes to your code, run it to test the new API call. The response will be structured data tailored to your scraping use case, such as property address, price, and description.
Update the API Endpoint
Replace the existing Universal Scraper API endpoint with the dedicated endpoint for Google search results. The new endpoint follows this format:
{query}
should be URL-encoded.Simplify the Parameters
The Scraper APIs are optimized to handle common scraping tasks, such as JS rendering and proxy management, without requiring additional parameters like js_render
or premium_proxy
. Simply provide the apikey along with any other relevant parameters (such as country
or tld
), and you’re good to go.
Test the New API Call
Once you’ve made the necessary changes to your code, run it to test the new API call. The response will be structured data tailored to your scraping use case, such as advertisements results, links, and titles.
If you have any questions or face issues during the transition, our support team is here to assist you. Switching to the new Scraper APIs is straightforward, offering optimized performance, predictable pricing, and less maintenance. We’re constantly expanding our API catalog and prioritizing new features based on your feedback, so enjoy a more reliable scraping experience today!
Where can I find my API key?
You can find your API key in your ZenRows settings under the API Key section.
What happens if I exceed my API usage limits?
If you exceed your API usage limits, your requests will return an error. You can either upgrade your plan, wait until your cycle renews, or buy Top-Ups.
Do I need to set up a proxy for the Scraper APIs?
No, ZenRows automatically handles proxies, browser fingerprinting, and anti-bot measures, so you don’t need to set up anything manually.
Can I use ZenRows Scraper APIs with different programming languages?
Yes, you can integrate ZenRows with various programming languages, including Python, JavaScript, and more. Code snippets are provided in the API request builder.
Can I scrape localized versions of a website?
Yes, you can specify the top-level domain (.tld
) and country
parameters to target localized versions of a website.
What happens if my request fails?
If your request fails, check the response message for error details. Common reasons include invalid API keys or exceeding usage limits.
How can I optimize my API requests for performance?
To optimize performance, use filtering options, minimize unnecessary requests, and ensure you’re only scraping the required data.
Can I use ZenRows for large-scale data extraction?
Yes, ZenRows is designed for scalability. You can run multiple concurrent requests to speed up data extraction, and each plan offers a different concurrency limit. If you need higher limits, consider upgrading to a higher-tier plan or contacting support for enterprise solutions.