An HTTP API handler receives requests and returns responses through a structured interface. In a search service, it parses the request, passes it to the underlying API, wraps the response as JSON, and handles errors; it contains no business logic. section 13.5.2 section 13.5.1
Keep the handler’s role clear:
- Accept product inputs such as a query and optional filters, alongside technical parameters such as version, limit, and request ID. section 13.5.2
- Leave search operations, such as filtering candidates and ranking results, to underlying services. section 13.5.2
``` GET /search?query=<query_string>&filters=<filters>&version=<version> &limit=<limit>&request_id=<request_id> ```
Example search endpoint with query, filters, and technical parameters. section 13.5.2
```
{
"results": [
{
"id": <photo_id>,
"score": <score>
},
...
]
}
```
Example JSON response containing photo IDs and relevance scores. section 13.5.2





















