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

# Places and travel

> Find places on Google Maps with their reviews, and search flights on Google Travel. Get stays, calendars, and reviews from Tripadvisor and Airbnb.

Find places on Google Maps with their reviews, and search flights on Google Travel. Get stays, calendars, and reviews from Tripadvisor and Airbnb. See every field in the [Places and travel reference](/api-reference/endpoint/maps-search), or try it in the [playground](https://stophy.dev/playground).

## Search places on Google Maps by keyword and location

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.maps.search({ query: "coffee", near: "Austin, TX", limit: 20 });
  console.log(result.data.places);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.maps.search(query="coffee", near="Austin, TX", limit=20)
  print(result["data"]["places"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/maps/search \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"query":"coffee","near":"Austin, TX","limit":20}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy maps search coffee --near "Austin, TX" --limit 20
  ```
</CodeGroup>

The response:

```json theme={null}
{
  "success": true,
  "data": {
    "places": [
      {
        "id": "abc123",
        "placeId": "abc123",
        "url": "https://example.com/",
        "name": "Example title",
        "categories": [
          "example"
        ],
        "address": {
          "full": "example",
          "street": "example",
          "city": "example",
          "state": "example",
          "postalCode": "example",
          "country": "us"
        },
        "location": {
          "lat": 1,
          "lng": 1
        },
        "rating": 4.5,
        "photos": 1,
        "phone": "example",
        "website": "https://example.com/",
        "description": "A short, readable summary of the result.",
        "hoursToday": "example",
        "openStatus": "example",
        "timezone": "example",
        "plusCode": "example",
        "thumbnail": "https://example.com/image.jpg",
        "reservation": "https://example.com/",
        "attributes": [
          "example"
        ]
      }
    ]
  },
  "creditsUsed": 3,
  "requestId": "3b113111-1fee-4c70-bc3f-d24e2a96e938"
}
```

## Endpoints

| Endpoint | Cost |
| - | - |
| [Search places on Google Maps by keyword and location](/api-reference/endpoint/maps-search) | 3 credits per 20 items, at least 3 credits |
| [Get a place's address, hours, rating and contact details](/api-reference/endpoint/maps-place) | 2 credits |
| [Get a place's reviews](/api-reference/endpoint/maps-reviews) | 1 credit per 10 items, at least 1 credit |
| [Search flights with prices and times](/api-reference/endpoint/googletravel-flights) | 3 credits |
| [Search hotels, restaurants and attractions](/api-reference/endpoint/tripadvisor-search) | 1 credit |
| [Get a place's rating, ranking and details](/api-reference/endpoint/tripadvisor-place) | 1 credit |
| [Get a place's reviews](/api-reference/endpoint/tripadvisor-reviews) | 1 credit per 20 items, at least 1 credit |
| [Search Airbnb stays by place and dates](/api-reference/endpoint/airbnb-search) | 2 credits per 18 items, at least 2 credits |
| [Get a listing's details, amenities and host](/api-reference/endpoint/airbnb-listing) | 2 credits |
| [Get a listing's available dates](/api-reference/endpoint/airbnb-calendar) | 1 credit |
| [Get a listing's reviews](/api-reference/endpoint/airbnb-reviews) | 1 credit per 25 items, at least 1 credit |

## More ways to call it

### Search hotels, restaurants and attractions

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.tripadvisor.search({ query: "Eiffel Tower" });
  console.log(result.data.results);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.tripadvisor.search(query="Eiffel Tower")
  print(result["data"]["results"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/tripadvisor/search \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"query":"Eiffel Tower"}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy tripadvisor search "Eiffel Tower"
  ```
</CodeGroup>

### Search Airbnb stays by place and dates

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.airbnb.search({ location: "Lisbon, Portugal" });
  console.log(result.data.listings);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.airbnb.search(location="Lisbon, Portugal")
  print(result["data"]["listings"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/airbnb/search \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"location":"Lisbon, Portugal"}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy airbnb search "Lisbon, Portugal"
  ```
</CodeGroup>

<Tip>Pass the place id from a Google Maps search, the id from a Tripadvisor search, or the listing URL from an Airbnb search into that source's other endpoints.</Tip>
