How to Configure Location Boundaries in your Search Configuration | Yext Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • How to find the latitude and longitude of an area and set the bounding box for your experience
  • How to add the coordinates and minimum location radius to your configuration

How to Add a Bounding Box to Your Search Configuration

In this unit, you will learn how to add the bounding box property to your Search Configuration. Configuring location boundaries is editable currently only in the JSON version of the Search Configuration. The bounding box is set at the top of your Configuration and applies to your entire experience (this includes both Universal and Vertical Search).

Note: At this point in time, you can only specify one bounding box per experience.

First, in order to add the bounding box, you’ll need the min/max of the latitude and longitude that you want to confine to. You can use a tool like bboxfinder to find the latitudes/longitudes for the region you need.

For example, you can see the coordinates of the box for Indiana area at the bottom of the tool here:

Bounding Box Indiana coordinates

Ensure that the latitudes/longitudes you choose encapsulate all the locations in your Knowledge Graph and then you can add them to the Search Configuration like so:

JSON example:

{
  "boundingBox": {
    "minLatitude": 25.405756,
    "minLongitude": -107.675457,
    "maxLatitude": 37.092157,
    "maxLongitude": -93.612957
  }
}

How to Add Minimum Location Radius to Your Search Configuration

Location Radius is settable only in the JSON version of the Configuration. It is set under each vertical of your Configuration and applies to only that vertical. It cannot be applied universally at the top level. To adjust the radius, first consider what radius makes sense for your business and why. Second, add the property minLocationRadius and set it to your desired radius under the corresponding Vertical.

Note that just as with Distance filters, this is set in Meters.

For example, if you want to make the Location Radius set to 400 miles for your Locations Vertical you would do so like so:

"Locations": {
  "entityTypes": [
    "location"
  ],
  "minLocationRadius": 643738.0,
  "name": "Locations",
  "searchableFields": {
    "address": {
      "directAnswer": true
    },
    "builtin.entityType": {
      "nlpFilter": true
    },
    "builtin.location": {
      "nlpFilter": true
    },
    "hours": {
      "directAnswer": true
    },
    "mainPhone": {
      "directAnswer": true
    }
  },
  "sortBys": [],
  "source": "KNOWLEDGE_MANAGER"
} },

Don’t forget to test that you’ve set it up correctly – you can do so by trying queries in your Location tab and remember you can always inspect the API results to see Location Bias (Visit the Debugging module for a refresher on Search detail).

unit Quiz
+20 points
Daily Quiz Streak Daily Quiz Streak: 0
Quiz Accuracy Streak Quiz Accuracy Streak: 0
    Error Success Question 1 of 3

    At what level is the boundingBox property set?

    Error Success Question 2 of 3

    True or False: You can add multiple bounding boxes for a business.

    Error Success Question 3 of 3

    At what level is the minLocationRadius property set?

    Wahoo - you did it! 🙌

    You've already completed this quiz, so you can't earn more points.You completed this quiz in 1 attempt and earned 0 points! Feel free to review your answers and move on when you're ready.
1st attempt
0 incorrect
Feedback