Example Requests

These examples show how to construct requests using filters such as location, travel dates, occupancy, and pricing

In this example, we send a simple Google Hotels request searching for hotels in Rome.

The request specifies:

  • search location (q)

  • check-in and check-out dates

  • number of adults staying

Request

curl -X GET "https://serp-api.netnut.io/search?engine=google_hotels&q=rome&hl=en&gl=us&adults=2&checkInDate=2026-04-10&checkOutDate=2026-04-12" \
  -U "username:password"

Example Response

Example shape — your actual jobId, timestamps, and hotel data will vary.

{
  "url": "https://www.google.com/travel/search?...",
  "general": {
    "searchEngine": "google_hotels",
    "language": "en",
    "device": "desktop",
    "searchType": "text",
    "pageTitle": "rome - Google Hotel Search",
    "timestamp": "2026-03-10T13:29:47.328468801Z",
    "render": false
  },
  "input": {
    "originalUrl": "https://www.google.com/search?...",
    "jobId": "b40c5eab-2694-4aa8-9114-68096e05102e"
  },
  "hotels": [
    {
      "name": "CC Palace Hotel Roma",
      "tags": [
        "Excellent location"
      ],
      "link": "https://www.google.com/travel/hotels/entity/ChoItMjNnKqkq7aGARoNL2cvMTF0NWxndDc3NxAB?...",
      "propertyToken": "ChoItMjNnKqkq7aGARoNL2cvMTF0NWxndDc3NxAB",
      "hotelClass": "4-star hotel",
      "extractedHotelClass": 4,
      "overallRating": 4.7,
      "ratePerNight": {
        "lowest": "$126",
        "extractedLowest": 126
      },
      "totalRate": {
        "lowest": "$156 total",
        "extractedLowest": 156
      },
      "reviews": "362",
      "amenities": [
        "Breakfast ($)",
        "Free Wi-Fi",
        "Parking ($)",
        "Air conditioning",
        "Bar",
        "Restaurant",
        "Airport shuttle",
        "Accessible"
      ],
      "images": [
        {
          "thumbnail": "https://lh3.googleusercontent.com/gps-cs-s/example1"
        },
        {
          "thumbnail": "https://lh3.googleusercontent.com/p/example2"
        }
      ],
      "reviewsLink": "https://www.google.com/travel/hotels/entity/.../reviews",
      "rank": 1
    }
  ]
}

In this response

  • url is the final Google Hotels search URL used to retrieve the results.

  • general contains metadata about the request, such as language, device, page title, and timestamp.

  • input contains the original request URL and the internal jobId.

  • hotels contains the parsed hotel results.

  • each hotel object may include fields such as name, tags, link, propertyToken, hotelClass, overallRating, pricing, amenities, images, and rank.


Request with rawHtml=1

In this example, we request the normal parsed JSON response and the raw HTML returned from Google Hotels.

This mode is useful when you want the structured hotel data while also keeping access to the original page source for debugging, validation, or custom parsing.

Request

Example Response

Example shape — shortened for readability. Your actual response may include more hotel results and a much longer HTML string.

In this response

  • the response includes the regular parsed JSON fields:

    • url

    • general

    • input

    • hotels

  • in addition, it includes:

    • html — the raw HTML source of the Google Hotels page

This mode is useful for:

  • validating parsed results against the original source

  • storing both parsed data and page source

  • custom downstream extraction workflows


Request with rawHtml=2

In this example, we request only the raw HTML of the Google Hotels page.

This mode is useful when you do not need the parsed JSON response and only want the page source.

Request

Example Response

In this response

  • the API returns only the raw HTML

  • no parsed JSON fields such as general, input, or hotels are returned

This mode is useful for:

  • custom parsers

  • raw source collection

  • debugging page output without parsed normalization

Last updated