Skip to content

Integration zenrows 4 apis#218

Merged
thisisfixer merged 1 commit intomainfrom
integration_zenrows_1
Apr 18, 2025
Merged

Integration zenrows 4 apis#218
thisisfixer merged 1 commit intomainfrom
integration_zenrows_1

Conversation

@fak111
Copy link
Contributor

@fak111 fak111 commented Apr 17, 2025

Overview

This app integrates the Zenrows API into our application, enabling users to perform advanced web scraping and data extraction tasks. The Zenrows API offers powerful functionality for scraping webpages, discovering Amazon product information, extracting Google search results, and retrieving detailed real estate data from Zillow, including property details and search listings.
Application URL: https://www.zenrows.com
API Documentation URL: https://docs.zenrows.com

Integrated API

- ZENROWS__DISCOVER_AMAZON_PRODUCTS
- ZENROWS__GOOGLE_SEARCH_RESULTS
- ZENROWS__ZILLOW_PROPERTY_DATA
- ZENROWS__ZILLOW_DISCOVERY

Fuzzy Tests

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name ZENROWS__DISCOVER_AMAZON_PRODUCTS --linked-account-owner-id zhuliderb@gmail.com --aipolabs-api-key 8ed913751636c8d28b2d0b3ea6e4b368968a04a0f12d0f7454404e7a05d3d760 --prompt "Find Echo Dot products on Amazon"

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name ZENROWS__GOOGLE_SEARCH_RESULTS --linked-account-owner-id zhuliderb@gmail.com --aipolabs-api-key 8ed913751636c8d28b2d0b3ea6e4b368968a04a0f12d0f7454404e7a05d3d760 --prompt "Search for web scraping API on Google"

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name ZENROWS__ZILLOW_PROPERTY_DATA --linked-account-owner-id zhuliderb@gmail.com --aipolabs-api-key 8ed913751636c8d28b2d0b3ea6e4b368968a04a0f12d0f7454404e7a05d3d760 --prompt "Get information about Zillow property with ZPID 2081512050"


docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name ZENROWS__ZILLOW_DISCOVERY --linked-account-owner-id zhuliderb@gmail.com --aipolabs-api-key 8ed913751636c8d28b2d0b3ea6e4b368968a04a0f12d0f7454404e7a05d3d760 --prompt "Find properties in San Francisco on Zillow"


Videos / IMAGE

image
image
image
image

logo

https://raw.githubusercontent.com/aipotheosis-labs/aipolabs-icons/refs/heads/main/apps/zenrows.svg

Summary by CodeRabbit

  • New Features
    • Introduced ZenRows integration for advanced web scraping and data extraction.
    • Added support for extracting Amazon product details, Google search results, and Zillow property data via dedicated endpoints.
    • Enabled automation features for handling rotating proxies, headless browsers, CAPTCHAs, and anti-bot systems.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 17, 2025

Walkthrough

This update introduces new JSON configuration files for the ZenRows app, enabling integration with the ZenRows web scraping API. The app.json file defines app-level metadata, security schemes, and categorization. The functions.json file adds four public REST API function declarations for structured data extraction from Amazon, Google Search, and Zillow, specifying endpoints, parameters, validation, and required headers. No existing files were modified; all additions are new configurations to support the ZenRows integration.

Changes

File(s) Change Summary
apps/zenrows/app.json Added new app configuration with metadata, security scheme (API key via query param), categories, and public visibility settings.
apps/zenrows/functions.json Added four REST API function declarations for Amazon product discovery, Google search results extraction, Zillow property data, and Zillow property discovery, each with strict parameter and header validation.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant ZenRowsApp
    participant ZenRowsAPI

    Client->>ZenRowsApp: Invoke API function (e.g., Discover Amazon Products)
    ZenRowsApp->>ZenRowsAPI: Send HTTP GET request with required parameters and API key
    ZenRowsAPI-->>ZenRowsApp: Return structured data (products, search results, or property info)
    ZenRowsApp-->>Client: Respond with extracted data
Loading

Suggested reviewers

  • jiwei-aipolabs

Poem

In the warren of code, a new path appears,
ZenRows now joins with data for our peers.
Scraping Amazon, Google, Zillow with glee,
Structured results as easy as can be!
With configs in JSON, precise and neat,
This bunny hops forward—automation complete!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c2f112 and 68785b9.

📒 Files selected for processing (2)
  • apps/zenrows/app.json (1 hunks)
  • apps/zenrows/functions.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Format & Lint
  • GitHub Check: test

Note

🎁 Summarized by CodeRabbit Free

Your organization has reached its limit of developer seats under the Pro Plan. For new users, CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please add seats to your subscription by visiting https://app.coderabbit.ai/login.If you believe this is a mistake and have available seats, please assign one to the pull request author through the subscription management page using the link above.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@fak111 fak111 changed the title integrate zenrows 4 apis Integration zenrows 4 apis Apr 17, 2025
@fak111 fak111 closed this Apr 17, 2025
@fak111 fak111 reopened this Apr 17, 2025
@fak111 fak111 closed this Apr 17, 2025
@fak111 fak111 reopened this Apr 17, 2025
@github-actions
Copy link

ACI Integration Code Review (Sonnet 3.7) - 2025-04-17 06:39:06.512

This review analyzes changes to integration files in the app/ directories.

Code Review: ZenRows Integration

Issues and Recommendations

1. API Path Structure in protocol_data

File: apps/zenrows/functions.json (all functions)

Issue: The API version and domain-specific paths are included in the path field, but according to the special rules, version numbers and API paths should be in the server_url field.

Suggested Solution: Move the version and domain-specific parts from path to server_url.

For example, in ZENROWS__DISCOVER_AMAZON_PRODUCTS:

"protocol_data": {
-    "method": "GET",
-    "path": "targets/amazon/discovery/{search_term}",
-    "server_url": "https://ecommerce.api.zenrows.com/v1/"
+    "method": "GET",
+    "path": "{search_term}",
+    "server_url": "https://ecommerce.api.zenrows.com/v1/targets/amazon/discovery/"
}

Apply similar changes to all functions.

2. API Key Authentication

File: apps/zenrows/functions.json (all functions)

Issue: The API key authentication is configured in app.json but not properly referenced in the functions. According to the ZenRows documentation, all API calls require an API key as a query parameter.

Suggested Solution: Ensure the API key is properly handled in the functions. Since it's configured in app.json, it should be automatically applied, but verify this is working correctly.

3. Inconsistent Required Fields

File: apps/zenrows/functions.json (ZENROWS__GOOGLE_SEARCH_RESULTS)

Issue: The url parameter is marked as required in the query parameters, but there's no mention of whether tld and country are required according to the API documentation.

Suggested Solution: Review the ZenRows API documentation to confirm if tld and country are optional or required parameters, and update the function specification accordingly.

4. Pattern Validation for ZPID

File: apps/zenrows/functions.json (ZENROWS__ZILLOW_PROPERTY_DATA)

Issue: The pattern for ZPID is set to ^[0-9]{7,10}$, but it's not clear if this matches all possible Zillow Property IDs.

Suggested Solution: Verify with the ZenRows documentation that all ZPIDs are 7-10 digits and adjust the pattern if necessary.

5. URL Parameter in ZENROWS__ZILLOW_PROPERTY_DATA

File: apps/zenrows/functions.json (ZENROWS__ZILLOW_PROPERTY_DATA)

Issue: Both zpid (path parameter) and url (query parameter) are provided, which might be redundant since the ZPID is already specified in the path.

Suggested Solution: Clarify in the documentation whether both parameters are needed or if one can be derived from the other. If url is optional when zpid is provided, update the description to make this clear.

6. Content-Type Header Visibility

File: apps/zenrows/functions.json (all functions)

Issue: The Content-Type header is marked as required but not visible. While this follows the pattern of hiding technical details from the LLM, it might be useful to make it visible if different content types are supported.

Suggested Solution: If the Content-Type can vary based on the request, consider making it visible to the LLM. If it's always "application/json", then keeping it hidden is appropriate.

Summary of Changes and Impact

This PR introduces a new integration with ZenRows, a web scraping API that provides capabilities for extracting data from various websites including Amazon, Google, and Zillow. The integration includes four main functions:

  1. Discovering Amazon products
  2. Extracting Google search results
  3. Retrieving detailed Zillow property data
  4. Discovering Zillow property listings

The integration is well-structured with appropriate metadata, descriptions, and parameter definitions. The functions cover a range of web scraping use cases and provide clear documentation on how to use them.

Overall Assessment

Rating: Acceptable with minor improvements needed

The integration is generally well-implemented with clear function specifications and appropriate parameter definitions. The issues identified are relatively minor and mostly related to the structure of the API paths and ensuring consistency with the ZenRows API documentation.

Next Steps for the Developer

  1. Restructure the server_url and path fields in all functions to follow the special rules.
  2. Verify the required parameters against the ZenRows API documentation.
  3. Clarify any potential redundancies in parameters (e.g., ZPID and URL in the Zillow property data function).
  4. Ensure the API key authentication is properly handled for all functions.
  5. Consider adding examples for each function to make it easier for users to understand how to use them.

Once these adjustments are made, the integration should be ready for use and provide valuable web scraping capabilities to users.

@fak111
Copy link
Contributor Author

fak111 commented Apr 17, 2025

i review seemly good

@fak111 fak111 requested a review from thisisfixer April 17, 2025 06:43
@thisisfixer thisisfixer merged commit 40867fd into main Apr 18, 2025
8 of 10 checks passed
@thisisfixer thisisfixer deleted the integration_zenrows_1 branch April 18, 2025 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants