# Greyhound trip itinerary API

Get Greyhound itineraries by journey UID or route and date via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as days_ahead, from, output, and retrieve structured data including opaque source itinerary identifier, source service-line label, source itinerary-leg type, source stop name, and source stop departure timestamp for journey detail, and stop display.

Documentation: https://openany.si/greyhound/greyhound-trip-itinerary-api/e088ec86-1662-4ba7-b6e3-6e3ffbb03496/
API ID: e088ec86-1662-4ba7-b6e3-6e3ffbb03496
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/greyhound/v1/trip
Page update time: 2026-12-03T02:47:05.638Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:47:04.224Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## Greyhound Trip Itinerary API

Use uid exactly as returned by Trip Search. Alternatively pass from, to and date or days\_ahead with index; the route fallback selects a source result rather than a stable identity across later searches.

## What You Can Build

- **Journey detail**: Keep the opaque UID and ordered source legs.
- **Stop display**: Preserve timestamps, source offsets and missing endpoint values.

## Returned Data

| Field | Meaning |
| --- | --- |
| `uid` | Opaque source itinerary identifier |
| `legs[].line` | Source service-line label |
| `legs[].type` | Source itinerary-leg type |
| `legs[].stops[].name` | Source stop name |
| `legs[].stops[].departure` | Source stop departure timestamp |
| `legs[].transfer_minutes` | Source connection transfer minutes when present |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Greyhound trip itinerary API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "uid": {
          "type": "string",
          "description": "Trip uid from `/greyhound/v1/search` (`direct:…` or `interconnection:…`)."
        },
        "from": {
          "type": "string",
          "description": "Instead of `uid`: departure city (with `to`)."
        },
        "to": {
          "type": "string",
          "description": "Arrival city."
        },
        "date": {
          "type": "string",
          "description": "Travel date `YYYY-MM-DD` (with `from`/`to`)."
        },
        "days_ahead": {
          "type": "integer",
          "description": "Days from today (with `from`/`to`)."
        },
        "index": {
          "type": "integer",
          "description": "Which departure of that day (0 = first)."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "arrival": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "lat": {
          "type": "number"
        },
        "lng": {
          "type": "number"
        },
        "name": {
          "type": "string"
        },
        "zip_code": {
          "type": "string"
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "credits_used": {
      "type": "integer"
    },
    "departure": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "lat": {
          "type": "number"
        },
        "lng": {
          "type": "number"
        },
        "name": {
          "type": "string"
        },
        "zip_code": {
          "type": "string"
        }
      }
    },
    "fetched_at": {
      "type": "string"
    },
    "legs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "string"
          },
          "brand_type": {
            "type": "string"
          },
          "carriers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "line": {
            "type": "string"
          },
          "line_destination": {
            "type": "string"
          },
          "line_id": {
            "type": "integer"
          },
          "messages": {
            "type": "object",
            "properties": {
              "from": {
                "type": "null"
              },
              "to": {
                "type": "null"
              }
            }
          },
          "operators": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stops": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "arrival": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "departure": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "type": "string"
                },
                "time": {
                  "type": "string"
                }
              }
            }
          },
          "sub_brand": {
            "type": "null"
          },
          "transfer_minutes": {
            "type": "null"
          },
          "type": {
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        }
      }
    },
    "uid": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/greyhound/v1/trip?days_ahead=30&from=New+York&output=json&raw=0&to=Boston' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "arrival": {
    "address": "700 Atlantic Ave",
    "city": "Boston, MA",
    "country": "US",
    "description": "Greyhound and FlixBus buses will arrive and depart from the South Wing and departure gate numbers will be Gates #13, #14, and #18-27.",
    "lat": 42.350469,
    "lng": -71.05618,
    "name": "Boston (South Station)",
    "zip_code": "02111"
  },
  "cached": false,
  "credits_used": 1,
  "departure": {
    "address": "625 8Th Ave",
    "city": "New York, NY",
    "country": "US",
    "description": "Bus will stop at the Port Authority Bus Terminal located at 625 8th Avenue. The ticket counter is located in the North wing on the subway level. Bus gates are on the lower level 60 - 68 and 79 - 85.",
    "lat": 40.75695,
    "lng": -73.9905,
    "name": "New York Port Authority",
    "zip_code": "10018"
  },
  "fetched_at": "2026-11-19T12:25:09.662Z",
  "legs": [
    {
      "brand": "Greyhound",
      "brand_type": "core",
      "carriers": [
        "Greyhound Lines, Inc."
      ],
      "line": "US0230",
      "line_destination": "Boston (South Station)",
      "line_id": 49133,
      "messages": {
        "from": null,
        "to": null
      },
      "operators": [
        "Greyhound Lines, Inc"
      ],
      "stops": [
        {
          "arrival": null,
          "departure": "2026-12-19T01:00:00-05:00",
          "name": "New York Port Authority",
          "time": "2026-12-19T01:00:00-05:00"
        },
        {
          "arrival": "2026-12-19T03:30:00-05:00",
          "departure": "2026-12-19T03:45:00-05:00",
          "name": "Hartford (Union Station)",
          "time": "2026-12-19T03:30:00-05:00"
        },
        {
          "arrival": "2026-12-19T05:30:00-05:00",
          "departure": null,
          "name": "Boston (South Station)",
          "time": "2026-12-19T05:30:00-05:00"
        }
      ],
      "sub_brand": null,
      "transfer_minutes": null,
      "type": "ride",
      "warnings": []
    }
  ],
  "uid": "direct:6d9dedb5-1502-4892-949c-1c1a5fd2667a:e204bb66-8ab9-4437-8d0d-2b603cdf0c43:9b6bfd56-3ecb-11ea-8017-02437075395e"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Where should uid come from?
Copy the exact UID returned by Trip Search, including its direct or interconnection prefix. Do not construct it from individual fragments.

### What does index select in the route fallback?
It is zero-based; index 0 selects the first returned journey for the supplied route and date context. Later searches can have different ordering.

### Should a connecting journey be flattened into one ride?
Keep ordered legs, stop sequences and transfer context so connections remain visible.

### Is a null first-stop arrival an error?
Not by itself. A first departure can have no arrival timestamp; preserve missing endpoint times and source offsets.

### How do I bypass cached results?
Pass fresh=1. A cache bypass retrieves available source data; it does not make unpublished or restricted records available.

### Can I request CSV or NDJSON?
This OpenAny implementation serves JSON only. Omit output or set output=json.

## Available implementations
- apish: https://openany.si/greyhound/greyhound-trip-itinerary-api/e088ec86-1662-4ba7-b6e3-6e3ffbb03496/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
