serpapi / public-roadmap

Public Roadmap for SerpApi, LLC (https://serpapi.com)
45 stars 3 forks source link

[Non-Google APIs] `engine` param is ignored when `tbm` is set and search gets routed to Google #1620

Closed alexbarron closed 1 month ago

alexbarron commented 1 month ago

A user was trying to get Naver Shopping results and thought to add tbm=shop to their params list as one would for Google. tbm is not a supported param for Naver so the expected behavior would be an error or ignore/remove the tbm param while respecting engine value set. What's actually happening is the search gets routed to Google Shopping even when engine=naver or any other non-Google engine.

The customer noticed this first with an error requiring the q param where Naver requires query.

image https://serpapi.com/search.json?engine=naver&query=%EC%84%B1%EC%A3%BC%EC%B0%B8%EC%99%B8&tbm=shop&api_key={YOUR_API_KEY}

Changing the query param to q executes a successful search, but with Google Shopping results.

image https://serpapi.com/search.json?engine=naver&q=%EC%84%B1%EC%A3%BC%EC%B0%B8%EC%99%B8&tbm=shop&api_key={YOUR_API_KEY}

The same behavior is seen for other engines, e.g. Bing.

image https://serpapi.com/search.json?engine=bing&q=%EC%84%B1%EC%A3%BC%EC%B0%B8%EC%99%B8&tbm=shop&api_key={YOUR_API_KEY}

Our Playground currently strips the tbm param from the request and executes a successful Naver search as one would expect.

Playground Intercom

alexbarron commented 1 month ago

Thank you for the quick fix @ishiharaf !

ishiharaf commented 1 month ago

@alexbarron You're welcome! Thanks for checking it so quickly as well. Just confirmed it's live and working as intended now:

image

image

image