> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anysite.io/llms.txt
> Use this file to discover all available pages before exploring further.

# /rome2rio/routes/search

> Plan all the ways to travel between two places with Rome2Rio's multimodal trip planner. Give an origin and destination by name or by coordinates and get every ranked route (train, bus, drive, fly, ferry, rideshare and combinations) with total duration, indicative price ranges by class and currency, per-leg segments and transfers, the transport mode and operating carrier of each leg, service frequency and operating days, the boarding and alighting stops, ticket booking deeplinks and the map polyline of each line. Prices are indicative ranges, not live fares.

**Price:** 5 credits

**⚠️ Common errors:** 412: No routes found between the given origin and destination



## OpenAPI

````yaml /openapi/travel-hospitality.json post /api/rome2rio/routes/search
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/rome2rio/routes/search:
    post:
      tags:
        - /rome2rio
      summary: /rome2rio/routes/search
      description: >-
        Plan all the ways to travel between two places with Rome2Rio's
        multimodal trip planner. Give an origin and destination by name or by
        coordinates and get every ranked route (train, bus, drive, fly, ferry,
        rideshare and combinations) with total duration, indicative price ranges
        by class and currency, per-leg segments and transfers, the transport
        mode and operating carrier of each leg, service frequency and operating
        days, the boarding and alighting stops, ticket booking deeplinks and the
        map polyline of each line. Prices are indicative ranges, not live fares.


        **Price:** 5 credits


        **⚠️ Common errors:** 412: No routes found between the given origin and
        destination
      operationId: __api_rome2rio_routes_search_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Rome2RioRoutesSearchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Rome2RioRoute'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Rome2RioRoutesSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        origin:
          anyOf:
            - type: string
            - type: 'null'
        origin_pos:
          anyOf:
            - type: string
              pattern: ^-?\d{1,3}(\.\d+)?,-?\d{1,3}(\.\d+)?$
            - type: 'null'
        destination:
          anyOf:
            - type: string
            - type: 'null'
        destination_pos:
          anyOf:
            - type: string
              pattern: ^-?\d{1,3}(\.\d+)?,-?\d{1,3}(\.\d+)?$
            - type: 'null'
        currency:
          type: string
          maxLength: 3
          minLength: 3
          default: USD
        language_code:
          type: string
          default: en
        count:
          type: integer
          minimum: 1
      type: object
      required:
        - count
    Rome2RioRoute:
      properties:
        '@type':
          type: string
          default: Rome2RioRoute
        name:
          anyOf:
            - type: string
            - type: 'null'
        canonical_name:
          anyOf:
            - type: string
            - type: 'null'
        grouping_key:
          anyOf:
            - type: string
            - type: 'null'
        duration:
          anyOf:
            - type: integer
            - type: 'null'
        is_connectable:
          anyOf:
            - type: boolean
            - type: 'null'
        transport_kinds:
          items:
            type: string
          type: array
          default: []
        transfer_durations:
          items:
            type: integer
          type: array
          default: []
        origin:
          anyOf:
            - $ref: '#/components/schemas/Rome2RioPlace'
            - type: 'null'
        destination:
          anyOf:
            - $ref: '#/components/schemas/Rome2RioPlace'
            - type: 'null'
        indicative_prices:
          items:
            $ref: '#/components/schemas/Rome2RioPrice'
          type: array
          default: []
        booking_links:
          items:
            $ref: '#/components/schemas/Rome2RioBookingLink'
          type: array
          default: []
        booking_configuration:
          anyOf:
            - $ref: '#/components/schemas/Rome2RioBookingConfiguration'
            - type: 'null'
        transit_guides:
          items:
            $ref: '#/components/schemas/Rome2RioTransitGuide'
          type: array
          default: []
        segments:
          items:
            $ref: '#/components/schemas/Rome2RioSegment'
          type: array
          default: []
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    Rome2RioPlace:
      properties:
        '@type':
          type: string
          default: Rome2RioPlace
        short_name:
          anyOf:
            - type: string
            - type: 'null'
        canonical_name:
          anyOf:
            - type: string
            - type: 'null'
        kind:
          anyOf:
            - type: string
            - type: 'null'
        code:
          anyOf:
            - type: string
            - type: 'null'
        country_code:
          anyOf:
            - type: string
            - type: 'null'
        time_zone:
          anyOf:
            - type: string
            - type: 'null'
        latitude:
          anyOf:
            - type: number
            - type: 'null'
        longitude:
          anyOf:
            - type: number
            - type: 'null'
        radius:
          anyOf:
            - type: number
            - type: 'null'
        nearby_city:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    Rome2RioPrice:
      properties:
        '@type':
          type: string
          default: Rome2RioPrice
        fare_class:
          anyOf:
            - type: string
            - type: 'null'
        currency_code:
          anyOf:
            - type: string
            - type: 'null'
        price:
          anyOf:
            - type: number
            - type: 'null'
        price_low:
          anyOf:
            - type: number
            - type: 'null'
        price_high:
          anyOf:
            - type: number
            - type: 'null'
        is_display:
          anyOf:
            - type: boolean
            - type: 'null'
      type: object
    Rome2RioBookingLink:
      properties:
        '@type':
          type: string
          default: Rome2RioBookingLink
        link_type:
          anyOf:
            - type: string
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
        providers:
          items:
            type: string
          type: array
          default: []
        origin_canonical:
          anyOf:
            - type: string
            - type: 'null'
        destination_canonical:
          anyOf:
            - type: string
            - type: 'null'
        templated_parameters:
          items:
            type: string
          type: array
          default: []
      type: object
    Rome2RioBookingConfiguration:
      properties:
        '@type':
          type: string
          default: Rome2RioBookingConfiguration
        max_passengers:
          anyOf:
            - type: integer
            - type: 'null'
        default_passenger_age:
          anyOf:
            - type: integer
            - type: 'null'
        age_groups:
          items:
            $ref: '#/components/schemas/Rome2RioAgeGroup'
          type: array
          default: []
      type: object
    Rome2RioTransitGuide:
      properties:
        '@type':
          type: string
          default: Rome2RioTransitGuide
        guide_title:
          anyOf:
            - type: string
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
        thumbnail_url:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    Rome2RioSegment:
      properties:
        '@type':
          type: string
          default: Rome2RioSegment
        is_major:
          anyOf:
            - type: boolean
            - type: 'null'
        duration:
          anyOf:
            - type: integer
            - type: 'null'
        kind:
          anyOf:
            - type: string
            - type: 'null'
        origin:
          anyOf:
            - type: string
            - type: 'null'
        destination:
          anyOf:
            - type: string
            - type: 'null'
        indicative_prices:
          items:
            $ref: '#/components/schemas/Rome2RioPrice'
          type: array
          default: []
        booking_links:
          items:
            $ref: '#/components/schemas/Rome2RioBookingLink'
          type: array
          default: []
        booking_configuration:
          anyOf:
            - $ref: '#/components/schemas/Rome2RioBookingConfiguration'
            - type: 'null'
        transit_guides:
          items:
            $ref: '#/components/schemas/Rome2RioTransitGuide'
          type: array
          default: []
        options:
          items:
            $ref: '#/components/schemas/Rome2RioOption'
          type: array
          default: []
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
    Rome2RioAgeGroup:
      properties:
        '@type':
          type: string
          default: Rome2RioAgeGroup
        age:
          anyOf:
            - type: integer
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    Rome2RioOption:
      properties:
        '@type':
          type: string
          default: Rome2RioOption
        indicative_prices:
          items:
            $ref: '#/components/schemas/Rome2RioPrice'
          type: array
          default: []
        hops:
          items:
            $ref: '#/components/schemas/Rome2RioHop'
          type: array
          default: []
      type: object
    Rome2RioHop:
      properties:
        '@type':
          type: string
          default: Rome2RioHop
        vehicle_name:
          anyOf:
            - type: string
            - type: 'null'
        vehicle_kind:
          anyOf:
            - type: string
            - type: 'null'
        origin:
          anyOf:
            - type: string
            - type: 'null'
        destination:
          anyOf:
            - type: string
            - type: 'null'
        duration:
          anyOf:
            - type: integer
            - type: 'null'
        frequency:
          anyOf:
            - type: integer
            - type: 'null'
        operating_days:
          anyOf:
            - type: integer
            - type: 'null'
        carrier:
          anyOf:
            - $ref: '#/components/schemas/Rome2RioCarrier'
            - type: 'null'
        line:
          anyOf:
            - $ref: '#/components/schemas/Rome2RioLine'
            - type: 'null'
        indicative_prices:
          items:
            $ref: '#/components/schemas/Rome2RioPrice'
          type: array
          default: []
        external_links:
          items:
            $ref: '#/components/schemas/Rome2RioExternalLink'
          type: array
          default: []
        codeshares:
          items:
            $ref: '#/components/schemas/Rome2RioCodeshare'
          type: array
          default: []
      type: object
    Rome2RioCarrier:
      properties:
        '@type':
          type: string
          default: Rome2RioCarrier
        name:
          anyOf:
            - type: string
            - type: 'null'
        code:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        web_url:
          anyOf:
            - type: string
            - type: 'null'
        url_label:
          anyOf:
            - type: string
            - type: 'null'
        phone:
          anyOf:
            - type: string
            - type: 'null'
        email:
          anyOf:
            - type: string
            - type: 'null'
        twitter:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    Rome2RioLine:
      properties:
        '@type':
          type: string
          default: Rome2RioLine
        names:
          items:
            type: string
          type: array
          default: []
        distance:
          anyOf:
            - type: integer
            - type: 'null'
        color:
          anyOf:
            - type: string
            - type: 'null'
        color_name:
          anyOf:
            - type: string
            - type: 'null'
        text_color:
          anyOf:
            - type: string
            - type: 'null'
        stops:
          items:
            type: string
          type: array
          default: []
        polyline:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    Rome2RioExternalLink:
      properties:
        '@type':
          type: string
          default: Rome2RioExternalLink
        kind:
          anyOf:
            - type: string
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
        url_name:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    Rome2RioCodeshare:
      properties:
        '@type':
          type: string
          default: Rome2RioCodeshare
        carrier:
          anyOf:
            - type: string
            - type: 'null'
        code:
          anyOf:
            - type: string
            - type: 'null'
      type: object
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````