Skip to content

v4.3.0

Latest

Choose a tag to compare

@webscraping-ai-bot webscraping-ai-bot released this 24 Oct 06:45
· 2 commits to master since this release

Added

  • Client#serp gains pages:, location:, uule:, lat:, lon: and radius:. Every search runs from one fixed location (location, lat + lon, or uule, otherwise the capital of the gl country), so repeats and later pages are consistent; gl defaults 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). Raises ArgumentError when pages or radius is not an Integer >= 1, or when lat/lon is not a finite number. lat/lon are 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 new GET /serp/locations endpoint — returns an Array of matching locations (id, canonical_name, country_code, target_type, reach, gps, ...), most populous first; pass canonical_name or id as serp's location:. Free, and the endpoint needs no API key. Raises ArgumentError when limit is not an Integer >= 1.
  • bin/smoke.rb checks a two-page SERP from Austin and serp_locations("austin", limit: 3).

Changed