Google Reviews with JetEngine Listing Grid and Rest API query

Create google_id meta field to store place ID for the current post.

You can find Place ID of any place you need using this page – https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder

Setup Rest API endpoint to get the reviews from Google Places API.

The key points here are:

  • Google Place API (New) URL – https://places.googleapis.com/v1/places/%jet_engine_field_name|google_id|field_value%{"fallback":"ChIJj61dQgK6j4AR4GeTYWZsKWw","context":""} with JetEngine macro to get the Place ID from google_id meta key we added before. ChIJj61dQgK6j4AR4GeTYWZsKWw – is a fallback value with some real place ID to ensure Rest API preview will work correctly.
  • /reviews/ – is the path to reviews list inside the API response.
  • Custom Header authorization with X-Goog-Api-Key and X-Goog-FieldMask header. More details in Google documentation
  • Disable Cache to avoid show the same reviews to the different Place IDs

Create the Rest API Query to connect Rest API endpoint with listing

Build listing item to showcase a single review:

Please note: Some review data is located inside the nested fields of the review item and Get child element from object/array callback can help to extract this data: