# Egypt Gate — API for AI agents

Egypt Gate is a tour operator in Egypt. This document describes everything an
autonomous agent needs to search the catalogue and send a traveller to a booking.

- **Catalogue:** 162 live activities across 3 cities
- **Auth:** none — see [/auth.md](https://www.egyptgate.net/auth.md)
- **Machine description:** [openapi.json](https://www.egyptgate.net/openapi.json) · [api-catalog](https://www.egyptgate.net/.well-known/api-catalog)
- **CORS:** `*` on every endpoint below

## 1. REST

Base URL: `https://www.egyptgate.net/api/v1`

### `GET /tours` — search

| Query | Type | Notes |
| --- | --- | --- |
| `q` | string | free text: "snorkeling", "pyramids", "quad bike" |
| `destination` | string | `sharm-el-sheikh` \| `hurghada` \| `cairo` |
| `category` | string | slug from `/categories` |
| `maxPrice` | number | cap on the starting price (USD) |
| `minRating` | number | 0–5 |
| `limit` / `offset` | integer | default 20, max 100 |

```bash
curl "https://www.egyptgate.net/api/v1/tours?q=diving&destination=sharm-el-sheikh&limit=3"
```

```json
{
  "total": 12,
  "limit": 3,
  "offset": 0,
  "results": [
    {
      "slug": "ras-mohamed-white-island-diving-tour",
      "name": "Ras Mohamed & White Island Diving Tour",
      "destination": { "slug": "sharm-el-sheikh", "name": "Sharm El Sheikh" },
      "duration": "8 hours",
      "price": { "from": 40, "currency": "USD", "unit": "per_person" },
      "bookingUrl": "https://www.egyptgate.net/en/sharm-el-sheikh/tours/ras-mohamed-white-island-diving-tour"
    }
  ]
}
```

### `GET /tours/{slug}` — full detail

Adds `description`, `highlights`, `included`, `excluded`,
`knowBeforeYouGo`, `itinerary`, `cancellation` and all `images`.
Add `?destination=` only if two cities share a slug.

### `GET /destinations`, `GET /categories?destination=`, `GET /health`

Supporting lists, and the build time of the current catalogue snapshot.

## 2. MCP

Streamable HTTP endpoint: `https://www.egyptgate.net/api/mcp`
Server card: [`/.well-known/mcp/server-card.json`](https://www.egyptgate.net/.well-known/mcp/server-card.json)

```json
{ "mcpServers": { "egypt-gate": { "url": "https://www.egyptgate.net/api/mcp" } } }
```

Tools: `search_tours`, `get_tour`, `list_destinations`, `list_categories`.
Stateless — POST JSON-RPC 2.0, no session header required.

## 3. Markdown pages

Any page of the site returns markdown instead of HTML when you ask for it:

```bash
curl -H "Accept: text/markdown" https://www.egyptgate.net/en/hurghada
```

The response carries `Content-Type: text/markdown` and an `x-markdown-tokens`
estimate. HTML remains the default for browsers.

## 4. Skills

[`/.well-known/agent-skills/index.json`](https://www.egyptgate.net/.well-known/agent-skills/index.json)
publishes two skills with sha256 digests: `find-egypt-tours` and
`book-egypt-tour`.

## 5. Booking

There is no booking API. Every activity carries a `bookingUrl`; date, party
size and payment are handled there. Do not collect card details on our behalf.

## 6. Content use

`https://www.egyptgate.net/robots.txt` carries `Content-Signal` directives. Answering a
traveller's question with this catalogue (`ai-input`) and indexing it
(`search`) are welcome; training a model on it (`ai-train`) is not.
