How would you design a RESTful URI for a search feature? Should it be a resource or a query parameter?

Last updated 29 June 2026

  • Model search as query parameters on the collection (e.g. GET /products?q=phone&sort=price), which stays cacheable, bookmarkable, and idempotent.

  • A dedicated search resource is justified for cross-resource global search (GET /search?q=...) or payloads too large for a URL (POST /searches with a body).

  • Avoid verbs in the path like /getProducts or /products/search.

  • https://www.sendowl.com/s/job-search
  • https://www.ashokit.in/blog/top-microservices-interview-questions-and-answers
  • https://www.resumeadapter.com/blog/full-stack-developer-resume-keywords
  • https://meduzzen.com/hire/backend-developers/
  • https://www.greatfrontend.com/blog/latest
  • https://prepfully.com/interview-guides/hubspot-software-engineer
  • https://www.getsmartresume.com/article/netflix-internship-new-grad-opportunities
All REST API interview questions