Skip to content

Conversation

@ayim
Copy link

@ayim ayim commented Sep 7, 2025

Summary

Added 8 new search endpoints to complement the existing search_google action and refactored the structure to keep things simple.

New Search Endpoints

  • News search - articles with publication dates and sources
  • Shopping search - products with prices and ratings
  • Scholar search - academic papers with citations
  • Patent search - patents with filing dates and inventors
  • Maps search - places with location details and hours
  • Places search - local businesses with contact info
  • Reviews search - customer reviews and ratings

Testing

  • Added action package to studio 1.5.0-rc1
  • Made calls to each endpoint (video attached)

Changes

  • Incremented action package version
  • Added optional parameters for filtering and localization across all endpoints
  • Updated docstrings to show key parameters and defaults for better tooltips
  • Refactored with helper functions to reduce duplicate code
  • Enhanced Pydantic data models to capture more fields from API responses

Notes

Intentionally excluded image, video, and lens search endpoints.

Didn't spend a ton of time over-engineering this since we'll eventually switch to MCP like serper-mcp-server.

@ayim ayim requested review from Copilot and tonnitommi September 7, 2025 18:47
@ayim ayim added the enhancement New feature or request label Sep 7, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR significantly expands the Serper action package by adding 7 new specialized search endpoints (news, shopping, scholar, patents, maps, places, reviews) to complement the existing Google search functionality. The code has been refactored with helper functions for better maintainability and includes enhanced Pydantic models to capture richer response data.

  • Added 7 new search endpoints with specialized functionality for different content types
  • Refactored code structure with validation helpers and request utilities
  • Enhanced data models to capture more detailed response fields from the API

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

File Description
package.yaml Version bump from 1.1.2 to 1.2.0
actions.py Major refactor adding helper functions, validation, and 7 new search endpoints
devdata/*.json Test input files for each new search endpoint

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

credits: int = Field(description="The number of credits used", default=0)



Copy link

Copilot AI Sep 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the extra blank line before the @action decorator. Only one blank line should separate top-level function definitions.

Suggested change

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove empty line before action decorator

ayim and others added 3 commits September 7, 2025 14:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ayim
Copy link
Author

ayim commented Sep 8, 2025

Related, non-blocking
Per @tonnitommi , changes should also be merged into example-web-search action package.
AWS gateway changes may also be needed to enable additional endpoints.

@ayim ayim self-assigned this Sep 15, 2025
Copy link
Contributor

@tonnitommi tonnitommi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add changelog entry and update readme with new tools available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants