Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/viet2811/uk-travel-recommendation/llms.txt

Use this file to discover all available pages before exploring further.

The Search endpoint enables fast, lightweight lookup of UK attractions by name. It performs a case-insensitive partial-match (icontains) query against the full attraction database and returns a condensed representation — just id and name — with a maximum of 20 results. This trimmed response format is intentional: the endpoint is designed to power the onboarding import flow, where the user types an attraction name to locate it quickly before passing its id to the Bulk Like endpoint. Because it returns only identifiers and display names rather than full attraction objects, the response is compact and fast even when many matches exist.

Endpoint

FieldValue
MethodGET
Path/api/recommendations/search
AuthBearer token required
GET http://localhost:8000/api/recommendations/search?q=<query>
Authorization: Bearer <access_token>

Query Parameters

q
string
required
The search string to match against attraction names. Matching is case-insensitive and partial — the query tower will match Tower of London, Blackpool Tower, and any other attraction whose name contains the substring.Omitting q or sending an empty string returns an empty array ([]).Example: q=Tower

Response

Returns an array of up to 20 attraction search result objects. Each object contains only id and name.

200 OK

[
  {
    "id": "tower-of-london",
    "name": "Tower of London"
  },
  {
    "id": "blackpool-tower",
    "name": "Blackpool Tower"
  },
  {
    "id": "tower-bridge",
    "name": "Tower Bridge"
  }
]
id
string
required
Unique identifier for the attraction. Pass this value in the ids array of the Bulk Like endpoint or as the path parameter of the Like endpoint.
name
string
required
Display name of the attraction, suitable for rendering in a search results list.

Empty Result

When the q parameter is absent, empty, or matches no attraction names, the endpoint returns an empty JSON array:
[]
The search result set is hard-capped at 20 items. If your query is very broad (e.g. a single common letter), only the first 20 database matches are returned. Use a more specific query string to narrow results.

Examples

curl -X GET "http://localhost:8000/api/recommendations/search?q=Tower" \
  -H "Authorization: Bearer <access_token>"

Build docs developers (and LLMs) love