Repository navigation
·
2 commits
to master
since this release
Added
Client#serpgainspages:,location:,uule:,lat:,lon:andradius:. Every search runs from one fixed location (location,lat+lon, oruule, otherwise the capital of theglcountry), so repeats and later pages are consistent;gldefaults to the location's country.pages(1–5) fetches consecutive pages as one de-duplicated list, billed per results page returned (see https://webscraping.ai/docs#serp). RaisesArgumentErrorwhenpagesorradiusis not an Integer >= 1, or whenlat/lonis not a finite number.lat/lonare sent as plain decimals rounded to 7 places (never exponent notation). Ranges and conflicting location options are left to the server's 400 (not charged). New response keys are documented in the README (search_parameters.location_used,organic_results[].page,pagination.pages_returned, ...).Client#serp_locations(q = nil, limit: nil)for the newGET /serp/locationsendpoint — returns an Array of matching locations (id,canonical_name,country_code,target_type,reach,gps, ...), most populous first; passcanonical_nameoridasserp'slocation:. Free, and the endpoint needs no API key. RaisesArgumentErrorwhenlimitis not an Integer >= 1.bin/smoke.rbchecks a two-page SERP from Austin andserp_locations("austin", limit: 3).
Changed
- Docs: stop stating credit prices (they're set server-side and change); link to https://webscraping.ai/docs pricing instead.