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 List Recommendations endpoint is the core of the UK Travel Recommendation engine. It computes a cosine similarity score between the authenticated user’s stored preference vector and every attraction the user has not yet interacted with, selects the top candidates (up to 100 depending on any active geo filter), and then applies Maximal Marginal Relevance (MMR) re-ranking to ensure the final ten results are both personally relevant and diverse — preventing a feed dominated by near-identical attraction types. Because the endpoint reads the user’s live preference profile, the results shift with every like or dislike, making each call a fresh reflection of the user’s evolving tastes.

Endpoint

FieldValue
MethodGET
Path/api/recommendations/
AuthBearer token required
GET http://localhost:8000/api/recommendations/
Authorization: Bearer <access_token>

Query Parameters

county
string
Filter recommendations to attractions within a specific county. Matching is case-insensitive. When this parameter is supplied, the candidate pool is capped at 25 attractions before MMR re-ranking.Example: county=Cornwall
region
string
Filter recommendations to attractions within a specific UK region. Matching is case-insensitive. When this parameter is supplied (and county is not), the candidate pool is capped at 50 attractions before MMR re-ranking.Example: region=South East
country
string
Filter recommendations to attractions within a specific UK country. Matching is case-insensitive. When this parameter is supplied (and neither county nor region is present), the candidate pool is capped at 75 attractions before MMR re-ranking.Example: country=England
Only one geo filter is applied per request. Priority order is county → region → country. If you supply both county and region, only the county filter is used.
Attractions the user has already liked or disliked are fully excluded from the candidate pool before similarity ranking begins. Each call returns only unseen content.

Response

Returns an array of exactly 10 attraction objects after MMR re-ranking.

200 OK

[
  {
    "id": "attraction-uuid-or-slug",
    "name": "St Michael's Mount",
    "parentTypeLabel": "Heritage",
    "typeLabel": "Castle",
    "latitude": 50.1174,
    "longtitude": -5.4766,
    "wikipedia": "https://en.wikipedia.org/wiki/St_Michael%27s_Mount",
    "summary": "A tidal island and civil parish in Mount's Bay, Cornwall...",
    "image_path": [
      "https://example.com/images/st-michaels-1.jpg",
      "https://example.com/images/st-michaels-2.jpg"
    ],
    "county": "Cornwall",
    "region": "South West",
    "country": "England"
  }
]
id
string
required
Unique identifier for the attraction. Used as the path parameter in the like, dislike, and bulk-like endpoints.
name
string
required
Display name of the attraction.
parentTypeLabel
string
Broad category label for the attraction, e.g. Heritage, Nature, Entertainment.
typeLabel
string
Specific type label within the parent category, e.g. Castle, National Park, Museum.
latitude
number
Geographic latitude coordinate (WGS 84).
longtitude
number
Geographic longitude coordinate (WGS 84). Note: field name is longtitude (matches the database column).
wikipedia
string
URL to the attraction’s Wikipedia article, if available. May be null.
summary
string
A textual description of the attraction, typically derived from its Wikipedia summary.
image_path
array
List of image URL strings for the attraction. May be an empty array if no images are stored.
county
string
The UK county in which the attraction is located, e.g. Cornwall, Yorkshire.
region
string
The UK region in which the attraction is located, e.g. South West, Yorkshire and The Humber.
country
string
The UK country in which the attraction is located, e.g. England, Scotland, Wales, Northern Ireland.

Examples

curl -X GET "http://localhost:8000/api/recommendations/" \
  -H "Authorization: Bearer <access_token>"

Build docs developers (and LLMs) love