Example Requests

These examples show how to send Google Places API requests

In this example, we send a simple Google Places request searching for coffee shops.

The request specifies:

  • search query (q)

  • language and country targeting (hl, gl)

Request

curl -X GET "https://serp-api.netnut.io/search?engine=google_places&q=coffee&hl=en&gl=us" \
  -U "username:password"

Example Response

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

{
  "url": "https://www.google.com/search?gl=US&hl=en&q=coffee&udm=1",
  "general": {
    "searchEngine": "google_places",
    "resultsCount": 41,
    "searchTime": 0.35,
    "language": "en",
    "device": "desktop",
    "searchType": "text",
    "pageTitle": "coffee - Google Search",
    "timestamp": "2026-04-20T09:17:32.522961567Z",
    "render": false
  },
  "input": {
    "originalUrl": "https://www.google.com/search?gl=US&hl=en&q=coffee&udm=1",
    "jobId": "5ae9e608-0d7c-417d-897a-e0f3dab53be7"
  },
  "localResults": [
    {
      "cid": "",
      "place_id": "6424352471498379864",
      "name": "Cattle Mtn Coffee",
      "sponsored": false,
      "image": "https://lh3.googleusercontent.com/gps-cs-s/...",
      "rating": 5,
      "reviews_cnt": "52",
      "reviews_link": "https://www.google.com/viewer/place?...",
      "price": "$10–20",
      "type": "Coffee shop",
      "open_state": "Closed · Opens 6 AM Thu",
      "latitude": 37.669144,
      "longitude": -106.63993,
      "top_review": "\"Great coffee, amazing breakfast sandwich, all for a total of $13.\"",
      "address": "South Fork, CO",
      "phone": "",
      "tags": [],
      "rank": 1,
      "global_rank": 1
    },
    {
      "cid": "",
      "place_id": "18102343801949734750",
      "name": "TRY Coffee",
      "sponsored": false,
      "image": "https://lh3.googleusercontent.com/gps-cs-s/...",
      "rating": 4.6,
      "reviews_cnt": "156",
      "reviews_link": "https://www.google.com/viewer/place?...",
      "price": "$1–10",
      "type": "Coffee shop",
      "open_state": "Closed · Opens 6:30 AM Mon",
      "latitude": 21.29283,
      "longitude": -157.85295,
      "top_review": "\"Unique coffees, excellent craft and service, and a lovely outdoor lanai.\"",
      "address": "Honolulu, HI",
      "phone": "",
      "tags": [],
      "rank": 2,
      "global_rank": 2
    }
  ],
  "pagination": {
    "currentPage": 1
  },
  "pagesProcessed": 1
}

In this response:

  • url is the final Google Places 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.

  • localResults contains the parsed local place results.

  • each place object includes fields such as name, rating, reviews_cnt, type, open_state, address, and rank.


Request with rawHtml=1

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

This mode is useful when you want the structured place 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 place results and a much longer HTML string.

In this response, the response includes the regular parsed JSON fields:

  • url

  • general

  • input

  • localResults

  • pagination

In addition, it includes:

  • html — the raw HTML source of the Google Places results 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 Places results 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 localResults are returned.

This mode is useful for:

  • custom parsers

  • raw source collection

  • debugging page output without parsed normalization

Last updated