Trips (LLM-Friendly)

Token-efficient travel restrictions optimized for AI applications.

Introduction

The Trips LLM endpoint solves the problem of verbose and complex API responses that are inefficient for Large Language Model consumption. While the regular /v3/trips endpoint returns comprehensive structured JSON data, the /v3/trips/llm endpoint provides the same travel requirements information in a concise, token-efficient markdown format specifically designed for AI applications.

See regular Trips API Specification

🤖 Built for AI Integration

This endpoint bridges the gap between comprehensive travel data and AI model consumption, delivering significant token reduction while maintaining all essential travel requirement information.

The Problem We're Solving

Challenge: Traditional API responses are too verbose and complex for efficient LLM consumption, creating barriers for modern AI-powered travel applications.

Solution: Purpose-built response format that dramatically reduces token count while preserving all critical travel requirement information.

Key Benefits

  • Token Efficiency: Significantly reduced response size compared to structured JSON
  • AI-Optimized: Markdown format perfect for LLM processing and context windows
  • Same Data: Identical travel requirement information as /v3/trips
  • Immediate Integration: Drop-in replacement for AI applications
  • Performance: Designed to return responses faster
  • Flexible Response: Support for both raw markdown and structured JSON responses
  • Intelligent Caching: Response caching varies based on Accept header for optimal performance

Request Format

The request format is identical to the regular Trips endpoint. Please refer to the Trips documentation for complete details on:

  • Request Headers
  • Describing a Trip
  • Attributes Object
  • Describing a Traveller
  • Describing a Travel Node
  • Arrival and Departure Objects

Content Negotiation

The endpoint supports multiple response formats through content negotiation:

MethodValueResponse Format
Accept Headertext/markdown (default)Raw markdown content
Accept Headerapplication/jsonJSON with metadata and markdown content
Query Parameter?accept=markdownRaw markdown content (overrides header)
Query Parameter?accept=jsonJSON with metadata (overrides header)
🔄 Content Negotiation Priority

Query parameters take precedence over Accept headers. If both are provided, the query parameter determines the response format.

Sample Requests

Request for Markdown Response (Default)

Markdown
curl --location --request POST 'https://requirements-api.joinsherpa.com/v3/trips/llm' \
  --header 'Content-Type: application/vnd.api+json' \
  --header 'Accept: text/markdown' \
  --header 'x-api-key: YOUR_API_KEY' \
  --data-raw '{
    "data": {
      "type": "TRIP",
      "attributes": {
        "locale": "en-US",
        "traveller": {
          "passports": ["USA"]
        },
        "currency": "USD",
        "travelNodes": [
          {
            "type": "ORIGIN",
            "locationCode": "USA",
            "departure": {
              "date": "2022-12-01",
              "time": "12:59",
              "travelMode": "AIR"
            }
          },
          {
            "type": "DESTINATION",
            "locationCode": "TUR",
            "arrival": {
              "date": "2022-12-01",
              "time": "22:59",
              "travelMode": "AIR",
              "flightNumber": "AB1234"
            }
          }
        ]
      }
    }
  }'

Request for JSON Response

JSON
curl --location --request POST 'https://requirements-api.joinsherpa.com/v3/trips/llm?accept=json' \
  --header 'Content-Type: application/vnd.api+json' \
  --header 'Accept: application/json' \
  --header 'x-api-key: YOUR_API_KEY' \
  --data-raw '{
    "data": {
      "type": "TRIP",
      "attributes": {
        "locale": "en-US",
        "traveller": {
          "passports": ["USA"]
        },
        "currency": "USD",
        "travelNodes": [
          {
            "type": "ORIGIN",
            "locationCode": "USA",
            "departure": {
              "date": "2022-12-01",
              "time": "12:59",
              "travelMode": "AIR"
            }
          },
          {
            "type": "DESTINATION",
            "locationCode": "TUR",
            "arrival": {
              "date": "2022-12-01",
              "time": "22:59",
              "travelMode": "AIR",
              "flightNumber": "AB1234"
            }
          }
        ]
      }
    }
  }'

Response Formats

The endpoint supports two response formats based on content negotiation:

Markdown Response (Default)

When requesting text/markdown (default) or using ?accept=markdown, the response is returned as raw markdown text:

# Visa Requirements

### You don't need a visa for Türkiye if you have a United States passport.

## Türkiye

### Visa is not required for a maximum of 90 days - Not required

Travelers need a visa to visit Türkiye for Business or Tourism for more than 90 days. Travelers do not need a visa if staying for 90 days or less.

_Official source: [Republic of Türkiye Ministry of Foreign Affairs](https://www.mfa.gov.tr/visa-information-for-foreigners.en.mfa)_

_Last updated: July 28, 2025 at 12:29 PM UTC_

# Passport and Documents

## Türkiye

### Travelers require a passport valid for at least 150 days from the time of entry - Mandatory

Travelers need a valid passport to enter Türkiye. The traveler's passport must remain valid for at least 150 days after the traveler arrives in Türkiye.

Travelers passport should be valid for 60 days plus 90 days visa validity which totals to 150 days.

Different rules may apply to travelers who hold a residence status in Türkiye. Please check the source for more details.

_Official source: [Turkiye Ministry of Foreign Affairs](https://www.mfa.gov.tr/passport-validity-requirements-while-entering-turkey-in-accordance-with-law-on-foreigners-and-international-protection.en.mfa)_

_Last updated: July 28, 2025 at 11:36 AM UTC_

# Health Risks and Requirements

## Türkiye

### Proof of pre-departure COVID-19 test is not required - Not required

Travelers don't need a COVID-19 test before traveling to Türkiye.

_Official source: [Türkiye Ministry of Culture and Tourism](https://www.tga.gov.tr/fight-against-covid-19-in-turkey/)_

_Last updated: July 28, 2025 at 11:33 AM UTC_

JSON Response

When requesting application/json or using ?accept=json, the response is returned as structured JSON with metadata:

{
  "meta": {
    "generatedAt": "2025-01-28T15:30:00.000Z",
    "locale": "en-US",
    "LlmModel": "NONE"
  },
  "data": {
    "contentConfidence": 1,
    "contentType": "text/markdown",
    "content": "# Visa Requirements\n\n### You don't need a visa for Türkiye if you have a United States passport.\n\n## Türkiye\n\n### Visa is not required for a maximum of 90 days - Not required\n\nTravelers need a visa to visit Türkiye for Business or Tourism for more than 90 days. Travelers do not need a visa if staying for 90 days or less.\n\n_Official source: [Republic of Türkiye Ministry of Foreign Affairs](https://www.mfa.gov.tr/visa-information-for-foreigners.en.mfa)_\n\n_Last updated: July 28, 2025 at 12:29 PM UTC_\n\n# Passport and Documents\n\n## Türkiye\n\n### Travelers require a passport valid for at least 150 days from the time of entry - Mandatory\n\nTravelers need a valid passport to enter Türkiye. The traveler's passport must remain valid for at least 150 days after the traveler arrives in Türkiye.\n\n_Official source: [Turkiye Ministry of Foreign Affairs](https://www.mfa.gov.tr/passport-validity-requirements-while-entering-turkey-in-accordance-with-law-on-foreigners-and-international-protection.en.mfa)_\n\n_Last updated: July 28, 2025 at 11:36 AM UTC_\n\n# Health Risks and Requirements\n\n## Türkiye\n\n### Proof of pre-departure COVID-19 test is not required - Not required\n\nTravelers don't need a COVID-19 test before traveling to Türkiye.\n\n_Official source: [Türkiye Ministry of Culture and Tourism](https://www.tga.gov.tr/fight-against-covid-19-in-turkey/)_\n\n_Last updated: July 28, 2025 at 11:33 AM UTC_"
  }
}

JSON Response Structure

FieldTypeDescription
meta.generatedAtstringISO timestamp of when the response was generated
meta.localestringThe locale used for the response (matches request locale)
meta.LlmModelstringLLM model used for generation (currently "NONE" for human-curated content)
data.contentConfidencenumberConfidence score (1 = highest confidence for human-curated content)
data.contentTypestringContent type of the data field (currently "text/markdown")

Response Structure

The markdown response follows a hierarchical structure organized by requirement categories and destinations. The response includes all essential travel requirement information but is optimized for natural language processing.

Content Hierarchy

The response is structured with:

  • Primary sections based on requirement types (visa, documentation, health, etc.)
  • Secondary groupings by destination or applicable regions, particularly useful for trips with transit nodes.
  • Individual requirements with detailed information for each rule

Information Elements

Each requirement typically includes the following information, though the exact format and presentation order may vary:

  • Requirement title and clear description
  • Enforcement status (mandatory, optional, not required, etc.)
  • Detailed explanation of the requirement
  • Official sources with links to government authorities
  • Last updated timestamps for data freshness
  • Additional context such as exemptions or special conditions
⚠️ Dynamic Format

The response format is optimized for LLM consumption and may evolve. While all essential travel requirement data is included, the specific organization, grouping names, and presentation order may change to improve token efficiency and readability.

Primary Use Cases

AI-Powered Customer Support

  • Chatbots: Answer "Do I need a visa for X country?" queries efficiently
  • Automated Support: Real-time assistance during booking flows
  • Smart Responses: Context-aware travel requirement explanations

AI-Powered Travel Planning

  • Conversational Interfaces: Handle complex multi-destination travel scenarios
  • Smart Recommendations: AI-driven suggestions based on traveler profiles
  • Trip Planning Assistants: Integration with tour companies and travel agencies

Content Generation & Automation

  • SEO Content: AI-generated travel requirement summaries for marketing
  • Email Automation: Personalized travel information in automated communications
  • Dynamic Websites: Real-time travel requirement content based on user queries

Enterprise Integration

  • Internal AI Tools: Support for companies building LLM-powered features
  • Smart Notifications: Intelligent push notifications about travel requirements
  • Multi-Modal Applications: Integration with voice assistants and chat interfaces