# Overview

What the API gives you, how you get access, and where to start.

HTML version: https://dyme.earth/affiliates/build

Show Dyme hotels on your site or in your app, send your readers to Dyme to book, and earn commission on their bookings. There are three ways in, and they all return the same hotels and the same credited links.

| Interface | Use it for | Base |
|---|---|---|
| Dyme Affiliates API | Your own backend or site | `https://affiliates.dyme.earth` |
| MCP server | An AI assistant or agent | `https://affiliates.dyme.earth/mcp` |
| Widgets | Any page, no coding needed | `https://dyme.earth/embed/…` |

## How it works

1. **Search.** Ask for hotels in a place (`/hotels/search`), or for one hotel by name (`/hotels/find`). You don't need dates.
2. **Show.** Put the results on your site or in your assistant: name, star rating, guest score and review count, photo, address. `/hotels/{id}` adds the description, up to five photos and the amenities.
3. **Send.** Link your reader to the `url` in the response. It carries your affiliate code and opens the hotel's page on Dyme, where they see prices. They sign in at checkout, on that page; nobody is bounced to a login screen.

A booking is credited to you if the reader clicked your link in the last 90 days (last click wins). Commission is paid under the Dyme Affiliates terms.

## What's included, and what isn't

- A hotel comes back as a name, star rating, guest score (out of 10) with the review count, photos, address and coordinates, and a credited link. Prices, rooms, dates and reviews aren't in the response; they're on the hotel page the link opens.
- There's no booking endpoint. Booking happens on Dyme, by a signed-in Dyme member.
- Hotels only. Flights aren't part of Dyme Affiliates, so a flight booking isn't credited.
- Hotel photos are served from Dyme's URLs. Link to them; don't copy or re-host them. See [display rules](https://dyme.earth/affiliates/build/terms).

## Your first request

You don't need a key to try it. Without one you get 30 requests an hour per IP address.

```bash
curl "https://affiliates.dyme.earth/hotels/search?destination=Lisbon&limit=3"
```

```json
{
  "destination": "Lisbon",
  "total": 412,
  "hotels": [
    {
      "id": "lisbon-pestana-rua-augusta-lisboa",
      "name": "Pestana Rua Augusta Lisboa",
      "stars": 4,
      "rating": 9.7,
      "review_count": 541,
      "address": "Rua Augusta 200, 1100-053 Lisboa, Portugal",
      "latitude": 38.7107,
      "longitude": -9.1376,
      "distance_km": null,
      "photo_url": "https://static.cupid.travel/hotels/498652396.jpg",
      "url": "https://travel.dyme.earth/hotels/lisbon-pestana-rua-augusta-lisboa?_from=YOUR_CODE&utm_source=YOUR_CODE&utm_medium=api"
    }
  ]
}
```

## Get a key

Apply at [dyme.earth/affiliates](https://dyme.earth/affiliates); approved affiliates can ask for an API key.

## For machines

- OpenAPI 3.1: [https://affiliates.dyme.earth/openapi.json](https://affiliates.dyme.earth/openapi.json)
- These pages as Markdown: add `.md` to any page's address, or start at [dyme.earth/llms.txt](https://dyme.earth/llms.txt).
