---
title: "Search Resolve"
method: GET
path: "/api/search-resolve"
---

# Search Resolve

`GET /api/search-resolve`

## Request

- Base URL: `https://pegarex.com.br` (the document declares no server; this is the origin it was published from)
- URL: `https://pegarex.com.br/api/search-resolve`
- Auth: none declared

Resolve a free-text query to the longest catalog brand + model, returning
the leftover text as a title keyword.

Used by the smart-search box when the user presses Enter WITHOUT picking a
suggestion: the frontend applies brand_id + model_id as filters and pushes
the residual ("the version part") into the free-text ``query`` keyword search.
Versions are intentionally NOT resolved — their strings are too inconsistent
across the 93 sources to match exactly, so the trailing trim text is matched
against car_listings.title instead.

## Query parameters

- `q` string, required
- `category` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pegarex/apis/pegarex-api.md) · [All operations](https://skmtc.dev/pegarex/apis/pegarex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pegarex/apis/pegarex-api/revisions/8c789c9bd72d?raw)
