Skip to content

Conversation

@VinciGit00
Copy link
Contributor

Summary

  • Add optional location_geo_code parameter to SearchScraper endpoint for geo-targeting Google search results
  • Update SearchScraperRequest model with new field
  • Update both sync and async client methods to support the new parameter

This aligns with the API changes in ScrapeGraphAI/sgai-api#384.

Changes

  • scrapegraph-py/src/models/searchscraper.py: Added location_geo_code field
  • scrapegraph-py/src/client.py: Added location_geo_code parameter to searchscraper() method
  • scrapegraph-py/src/async_client.py: Added location_geo_code parameter to searchscraper() method

Usage

from scrapegraph_py import Client

client = Client(api_key="your-key")
response = client.searchscraper(
    user_prompt="What is the latest news about AI?",
    location_geo_code="us"  # Filter results to US
)

Test plan

  • Verify Python syntax is valid
  • Integration testing with live API once sgai-api#384 is merged

🤖 Generated with Claude Code

VinciGit00 and others added 3 commits January 26, 2026 10:00
Add optional geo-targeting to Google search for SearchScraper:
- Add location_geo_code field to SearchScraperRequest model
- Update sync client searchscraper method to accept location_geo_code
- Update async client searchscraper method to accept location_geo_code

This enables filtering search results by geographic location using
country codes like 'us', 'uk', 'de'.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@VinciGit00 VinciGit00 closed this Jan 27, 2026
@VinciGit00 VinciGit00 deleted the feat/searchscraper-geo-targeting branch January 27, 2026 14:03
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