@@ -782,6 +782,7 @@ async def searchscraper(
782782 output_schema : Optional [BaseModel ] = None ,
783783 extraction_mode : bool = True ,
784784 stealth : bool = False ,
785+ location_geo_code : Optional [str ] = None ,
785786 return_toon : bool = False ,
786787 ):
787788 """Send a searchscraper request
@@ -797,6 +798,7 @@ async def searchscraper(
797798 extraction_mode: Whether to use AI extraction (True) or markdown conversion (False).
798799 AI extraction costs 10 credits per page, markdown conversion costs 2 credits per page.
799800 stealth: Enable stealth mode to avoid bot detection
801+ location_geo_code: Optional geo code of the location to search in (e.g., "us")
800802 return_toon: If True, return response in TOON format (reduces token usage by 30-60%)
801803 """
802804 logger .info ("🔍 Starting searchscraper request" )
@@ -807,6 +809,8 @@ async def searchscraper(
807809 logger .debug ("🔧 Using custom headers" )
808810 if stealth :
809811 logger .debug ("🥷 Stealth mode enabled" )
812+ if location_geo_code :
813+ logger .debug (f"🌍 Location geo code: { location_geo_code } " )
810814 if return_toon :
811815 logger .debug ("🎨 TOON format output enabled" )
812816
@@ -817,6 +821,7 @@ async def searchscraper(
817821 output_schema = output_schema ,
818822 extraction_mode = extraction_mode ,
819823 stealth = stealth ,
824+ location_geo_code = location_geo_code ,
820825 )
821826 logger .debug ("✅ Request validation passed" )
822827
0 commit comments