> ## Documentation Index
> Fetch the complete documentation index at: https://syncupai-preview-poi-statuses-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Tripadvisor Category Enrichment

> This page explains what the Tripadvisor Category enrichment is, what it returns, how it decides its results, what sources it relies on, and how to safely consume the output.

## What this attribute represents

The enrichment classifies a place into three main components that work together to provide a comprehensive categorization.

### Place Type Classification

The `placetype` field categorizes the business into one of four primary types: `accommodation`, `restaurant`, `attraction`, or `CANT_VERIFY`. This high-level classification determines the fundamental nature of the business and drives the overall user experience.

### Subtype Taxonomy

The `subtype` provides more granular classification within each place type. It consists of a human-readable category name paired with a numeric `subtype_id` that follows Tripadvisor-style taxonomy standards. This allows for both display-friendly labels and stable programmatic identification.

### Decision Reasoning

The `reasoning` field offers a concise, transparent justification of the classification decision. This is not a confidence score but rather an explanation of the key evidence that led to the final determination.

### Fallback Behavior

When sufficient evidence is unavailable or inconsistent, the enrichment returns `CANT_VERIFY` with `subtype_id` 0 and `subtype` "CANT\_VERIFY". This ensures a clear signal when the system cannot make a confident determination.

<Info>
  Provide the most complete and accurate name and full address. Adding a first-party website significantly improves accuracy, especially for accommodations. The agent matches against multiple OTA sources to verify details.
</Info>

## Output schema

<ResponseField name="reasoning" type="string" required>
  Short narrative explaining the classification and key evidence used for the decision.

  Useful for transparency and QA, not intended as machine-parsable logic.
</ResponseField>

<ResponseField name="placetype" type="enum" required>
  Primary classification of the business type.

  **Values:**

  * `accommodation` - Lodging establishments
  * `restaurant` - Food service establishments
  * `attraction` - Tourist attractions and activities
  * `CANT_VERIFY` - Unable to determine classification (uppercase indicates definitive "no decision")
</ResponseField>

<ResponseField name="subtype" type="object" required>
  Granular classification within the place type using Tripadvisor-style taxonomy.

  <Expandable title="subtype properties">
    <ResponseField name="subtype_id" type="integer" required>
      Stable numeric identifier within the placetype's taxonomy. Use this for programmatic logic.

      On failure, returns `0`.
    </ResponseField>

    <ResponseField name="subtype" type="string" required>
      Display-friendly category label corresponding to the subtype\_id.

      On failure, returns `"CANT_VERIFY"`.
    </ResponseField>
  </Expandable>
</ResponseField>

<Warning>
  Treat `subtype_id` as the source of truth for logic. The name and ID must be compatible for the chosen placetype; otherwise the result is returned as `CANT_VERIFY`.
</Warning>

## How the enrichment decides

### Step 1 — Determine placetype

The AI agent performs a comprehensive web search using the provided place name and full address to establish the primary business classification. The agent evaluates search results to determine whether the establishment operates as an accommodation, restaurant, or attraction. When reliable evidence cannot be found or when search results present conflicting information, the agent returns `CANT_VERIFY` as the placetype.

### Step 2 — Determine subtype

**Restaurant and Attraction Classification**

For restaurants and attractions, the agent uses search result context to classify establishments into Tripadvisor-style categories, assigning both a subtype name and numeric subtype\_id without additional site browsing.

**Accommodation Classification**

Accommodation classification follows a three-step deterministic process:

**Step 1: Count bookable units** — Single bookable units receive subtype\_id 33 ("vacation rental") immediately.

**Step 2: Determine family** — Multi-unit properties are classified into families:

* **Hotel family** requires: 24-hour front desk (explicitly stated), private bathrooms, and included housekeeping.
* **B\&B/Inn family** requires: included housekeeping (breakfast optional). Does not require 24-hour front desk.
* **Specialty Lodging** applies when hotel/B\&B evidence is insufficient or shared rooms exist.

**Step 3: Assign subtype** — Within the determined family, assign the most specific subtype based on operational characteristics.

Missing or ambiguous evidence defaults to Specialty Lodging or `CANT_VERIFY`.

## Source handling and evidence

Web search is always used to determine preliminary context.

* For accommodations:
  * The agent visits up to 2-3 online travel agency (OTA) sources that have strong name/address matches (e.g., Trip.com, Agoda, Traveloka, Booking.com).
  * If a provided first-party website is present, the agent attempts to visit it.
  * If no OTA sources can be loaded or yield sufficient content, the result becomes CANT\_VERIFY.
* The agent is explicitly instructed to ignore "tripadvisor.com" as a source.

## Edge cases and special scenarios

* Evidence specificity for hotels:
  * 24-hour room service does NOT count as proof of 24-hour front desk.
  * "Daily housekeeping" listed in room amenities without extra fees counts as included housekeeping.
  * Each criterion must be explicitly stated or clearly demonstrated.
* Ambiguous or sparse online presence:
  * If search results are inconclusive or conflict, the enrichment returns CANT\_VERIFY rather than guessing.
* Duplicate names across locations:
  * The address is critical. If the evidence mismatches the provided location, the result may be CANT\_VERIFY.
* Mapping misalignment:
  * Any name/ID inconsistency for the chosen placetype results in CANT\_VERIFY.
* Reasoning vs. machine signals:
  * The reasoning string helps humans understand the decision; it should not be treated as a contract or parsed for logic.

## Examples

### Accommodation (hotel)

```json theme={null}
{
  "reasoning": "Multi-unit property with explicit 24-hour front desk, daily housekeeping included, and private bathrooms in all rooms. Standard hotel services without resort or boutique specialization.",
  "placetype": "accommodation",
  "subtype": { "subtype_id": 1, "subtype": "hotel" }
}
```

### Accommodation (small hotel)

```json theme={null}
{
  "reasoning": "Multi-unit property with included daily housekeeping and private bathrooms, but no explicit 24-hour front desk. Classified as B&B/Inn family, small hotel subtype.",
  "placetype": "accommodation",
  "subtype": { "subtype_id": 32, "subtype": "small hotel" }
}
```

### Can’t verify

```json theme={null}
{
  "reasoning": "Search results were inconclusive; no matching sources with sufficient detail.",
  "placetype": "CANT_VERIFY",
  "subtype": { "subtype_id": 0, "subtype": "CANT_VERIFY" }
}
```
