# Omio — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and compare train, bus, and flight trips across multiple providers in real-time, with detailed pricing breakdowns and the ability to view fares across different dates. Find the best deals by exploring popular destinations, autocompleting location searches, and analyzing price variations to plan your ideal journey.

**Category:** Travel | **Website:** [omio.com/](https://omio.com/) | **Docs:** [parse.bot/marketplace/dc6bba5c-cd30-43e7-98ef-70ee1570e299/omio-com-api](https://parse.bot/marketplace/dc6bba5c-cd30-43e7-98ef-70ee1570e299/omio-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-omio-com-api-dc6bba5c/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_popular_destinations

Retrieve popular destinations reachable from a given origin. Returns a list of destination locations with population and connectivity details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `position_id` | string | Yes | Position ID of the origin location (from search_location_autocomplete results) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-omio-com-api-dc6bba5c/get_popular_destinations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"position_id":"<string>"}'
```

### get_price_by_date

Get the cheapest trip prices across a date range for a route, broken down by transport mode. Returns price in cents and number of available results per mode per day. Not all routes are indexed; use routes between major cities.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `end_date` | string | Yes | End date in YYYY-MM-DD format |
| `from_id` | string | Yes | Origin position ID (from search_location_autocomplete) |
| `start_date` | string | Yes | Start date in YYYY-MM-DD format |
| `to_id` | string | Yes | Destination position ID (from search_location_autocomplete or get_popular_destinations) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-omio-com-api-dc6bba5c/get_price_by_date \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"end_date":"<string>","from_id":"<string>","start_date":"<string>","to_id":"<string>"}'
```

### get_search_results

Re-fetch results for an existing search session. The search_id must come from a recent search_trips call; sessions expire within minutes. Returns the same trip structure as search_trips.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `search_id` | string | Yes | Search ID from a previous search_trips call |
| `travel_mode` | string | No | Comma-separated travel mode filter. Accepted individual values: train, bus, flight, ferry. Combine with commas for multi-mode search (e.g. 'train,bus') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-omio-com-api-dc6bba5c/get_search_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"search_id":"<string>","travel_mode":"<string>"}'
```

### get_trip_details

Retrieve full trip details including fare classes, ticket offers with prices and cancellation policies, and segment-level departure/arrival info. Requires a fresh search_id (sessions expire quickly). The trip_id is the journeyId and outbound_id is the outboundId from search results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `outbound_id` | string | Yes | The outboundId field from search_trips or get_search_results trip objects |
| `search_id` | string | Yes | Search ID from a recent search_trips call |
| `travel_mode` | string | No | Travel mode for the trip. Accepted values: train, bus, flight, ferry |
| `trip_id` | string | Yes | The journeyId field from search_trips or get_search_results trip objects |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-omio-com-api-dc6bba5c/get_trip_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"outbound_id":"<string>","search_id":"<string>","travel_mode":"<string>","trip_id":"<string>"}'
```

### search_location_autocomplete

Autocomplete location search. Returns hierarchical results: each city-level location may contain child station entries. Use the positionId from results as origin/destination in trip searches.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search term for location autocomplete (e.g. 'Berlin', 'Munich', 'Paris') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-omio-com-api-dc6bba5c/search_location_autocomplete \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### search_trips

Search for available trips between two locations on a given date. Polls the upstream search engine until results are complete. Returns a list of trip options with price, duration, departure/arrival times, and IDs needed for get_trip_details. The search_id expires within minutes.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `departure_date` | string | Yes | Departure date in YYYY-MM-DD format |
| `destination_id` | string | Yes | Destination position ID (from search_location_autocomplete or get_popular_destinations) |
| `origin_id` | string | Yes | Origin position ID (from search_location_autocomplete) |
| `travel_mode` | string | No | Comma-separated travel mode filter. Accepted individual values: train, bus, flight, ferry. Combine with commas for multi-mode search (e.g. 'train,bus') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-omio-com-api-dc6bba5c/search_trips \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"departure_date":"<string>","destination_id":"<string>","origin_id":"<string>","travel_mode":"<string>"}'
```
