BrowserBugs.

Exploring Geo-based Search Results with Structured Data

by Tim Bridges.

It has been quite a few years since this little developer first bumped into Schema, and to be quite honest it blew my mind. Their mission is "…to create, maintain, and promote schemas for structured data on the Internet, on web pages, in email messages, and beyond". With featured snippets, enhanced listings and more up for grabs it is no surprise many are now chasing the pretty things.

Yet that's slightly missing the point, what Schema gives us is a language we can use to communicate information at a deeper level, that a webpage is made up of more than simply words, files, and links; it gives us the chance to add context, to tell the story as it were. What a search engine decides to do with this information is outside of our control, some are highly visible by-products like a featured snippet, others are more subtle, but in most cases you can clearly see the data influence.

So, I would like, if I may, to take you on a strange journey with an example of a project that has been running local business search results combined with geo structured data. All I can do is explain what I did, my thinking behind it, and illustrate the positive side effects. Hopefully it might spark some ideas and experiments of your own.

Before we begin, a few notes…

It has been hard to work out how to write this due to not being able to disclose the project, essentially an 'X near / in location' website, a pretty common concept. The only way I could think of to share is to adapt the data set to ensure anonymity. I've opted for one of my favourite pastimes (drinking), in my old stomping ground (Reading), so that would be 'Pubs in Reading'.

As with the real project the demo just uses Microdata, and it's not targeted for any particular search engines 'we would rather if…' quirks, I simply used the Schema documentation 'as is' at the time. Make it with JSON-LD, whatever your flavour, the logic is simply that, logic. With my demo search results the address and geo data are correct, however the pubs are actually from a notorious night out where the ultimate destination is pretty fitting for 2020.

So you can play along and see what's being picked up yourself grab the Ryte Structured Data Helper plugin for Chrome, or you can use the classic Structured Data Testing Tool by Google until it retires. You could use Googles new Rich Results Test, however you will miss out on some of the juicy bits.

Breaking it down to basics

Deep down, if we’re being honest, we simply have a search results page for pubs that are in / near Reading. As with most sites like this I took a central point in Reading (51.456467,-0.970005), worked out how far away each pub is using their geo-cooordinates, and then display the results in distance order, paginating 10 per page. Each listed pub would then link through to their own page with more information for the visitor.

So to summarise that makes 2 search results pages and 12 profile pages, 14 pages in total which contain information about some things that are in some way connected to each other. We can either hope the search engines can figure it out, or we could try and give them a helping hand with what we know, I'm going for option 2 else this would be short lived.

Creating the Pubs

At the moment each of our 12 listings are currenty just a bunch of text, links, html and images. The beauty of Schema is the deeper you go the clearer the message, with our results they are more than just local businesses, each is a pub and as usual there is a Schema for that, see 'BarOrPub'.

Now we can define what each 'Thing' is the rest of the data can be structured inside, so I added properties like the pub 'name', 'address', 'image', 'url' to their profile etc from the 'BarOrPub' Schema. The geo-coordinates were added to the source as this information could be useful for search engines to understand but I think might be of little relevance to the visitor.

Each details page was set up as a 'ItemPage', as it's described as A page devoted to a single item, such as a particular product or hotel. I've added some of the important bits in the demo to show how it's data was used, however item pages themselves are another topic.

Ryte Structured Data Helper showing the PubOrBar Schema with their address and geo-coordinates.

Creating the List

My next step was the list, after all the Pubs are in order of distance which makes sense. The best bit about Schema is it lets us create a list out of pretty much any html tag with the aptly named 'ItemList', defined as A list of items of any sort - for example, Top 10 Movies About Weathermen, or Top 100 Party Songs., or maybe a list of '12 Pubs in Reading'?

At this point I cannot stress enough that you do not need to use html lists or tables to get featured snippets. Also you do not need to prefix your headings with '#1 The First Post', '#2 The Old Familiar' etc (often seen). Schema even adds to their 'ItemList' description; Not to be confused with HTML lists, which are often used only for formatting. As I said earlier what a search engine chooses to do with your structured data is up to them; and if say Google decides to use an html list for their snippet it's because they are only for formatting, use the right html tags for your website.

With the list itself I kept it minimal, only using the properties 'itemListOrder' as Ascending, that the total 'numberOfItems' is 12, and '1 - 10 of 12 Results' as the description. Now I just needed to connect the 12 pubs to the list, and thanks to Schema an 'itemListElement' can be a 'Thing', perfect for our 'BarOrPub' listings.

Ryte Structured Data Helper showing the item list Schema with the pubs connected via the itemListElement property.

Creating the Page

Finally we end up with the page itself. As with 'BarOrPub' being a more precise version of a 'LocalBusiness', that's the same for 'SearchResultsPage' instead of 'WebPage'. In some way I can't help think this validates our list more than trying to masquerade as a 'Best places to drink in Reading' article, there is no shame in search results. I then added the usual properties to the search results page, breadcrumbs (list), name, text etc.

One thing still niggled me, my page is all based around where the pubs are, and so I decided to look into 'contentLocation' which is defined as The location depicted or described in the content. For example, the location in a photograph or painting., which might be a loose connection but at the time there wasn't anything more fitting. So I set the place to Reading, and that the geo was a 'GeoShape', essentially drawing a circle around the results from the central coordinates, and then used the distance from the last of the 12 results as the radius in meters.

The pubs marked on a map with radius.
The geo-shape with the pubs marked on a map.

The last step was to connect the list to the 'SearchResultsPage'. To do this I opted for 'mainEntity', as described by Schema Indicates the primary entity described in some page or other CreativeWork., and at the end of the day this results list is the very reason the page exists, it's what the visitor was looking for.

Ryte Structured Data Helper showing the complete page with GeoShape.

Structured Data in the Wild

Now we have a structure let's see what the search engines decided to do with this information. Based on the similar search of 'Pubs in Reading' I've collated a series of screen grabs to illustrate the different ways that the structured data has been used by Google and Bing. For anonymity the illustrations have been updated to use the data from the demo.

Bing basic page listing on a desktop.

Basic desktop listing with Bing, they don't mind a longer meta description but there's nothing special going on.

Google basic page listing on a desktop.

Google go a little futher than Bing, their basic desktop version showing the breadcrumb list and they interestingly prefix the meta description with the number of search results although not a direct copy of the list description I used.

Bing featured bullet list on desktop.

This is a Bing feature (25/08/2020) which uses a list of the first 4 results. I'm not too sure why the description is added for the first and third but not for the second and fourth, maybe they just like odd numbers?

Google enhanced page listing on a mobile showing 4 images from the results between the title and description.

This is an enhanced listing I spotted on Google via mobile (31/01/2020) where they have simplified the breadcrumbs list to just 'domain.com > berkshire' (position 1 and 3), we get a cool favicon, and they have also decided since there is space to add the company name on the end, it's not in the meta title.

The most interesting part is they have also decided to display 4 of the images from page one of our results. I'm not sure if these are selected at random, they're actually from positions 1, 2, 4, and 5 in our search results.

Bing featured snippet on desktop.

This is a Bing desktop feature (10/07/2020), and their mobile version mimicks the same layout. Here they have taken the search results name as the heading and displayed all 10 from page 1 in the correct order. The exception however is the first in the list where they have also added part of the description from the pub listing.

Above the snippet they have a carousel for the pubs in our results, but it looks like only for the ones they 'might' already have entities for. Each uses an image of the pub but not from this website, and each 'more results' link would click through to a Bing search.

You might have spotted that The Two-Headed Dog is not actually the pub. This was the same with the live project as one of their business names had an unusual connotation which lead to some interesting 'more results' to say the least.

Google featured snippet on desktop showing the first 4 locations with images.

This is a Google featured snippet I spotted on 07/08/2020 which I think was some sort of A/B test on desktop as I've not seen it again, although probably 'not new' according to Barry Schwartz (@rustybrick).

Looking at this featured snippet it's clear to see they're using the page name for the list, the pub name and address from our results, and they're displaying in the correct order and adding the image to make a nice looking panel, what's not to like?

You might notice they're showing 4 results with '4 more items' to see the next 4 and a link to 'View all items' which takes you to the page, but we had 10 on page one. As to why it could just be limited results to 8 (see under 'Featured snippet list lengths' in 'What We Learned From Analyzing 1.4 Million Featured Snippets' on MOZ by A.J. Ghergich in 2017).

Bing enhanced listing on desktop showing the first 3 pubs with images.

Another Bing desktop feature I spotted on 25/08/2020, pretty similar to the Google A/B test. The main difference here is they have decided to list the first three pubs as a sort of navigation, interestingly each taking the meta description from their own profile page with a direct link.

As for the date being displayed as Aug 4 2020 I'm at a bit of a loss. I've not used a modified date, the list didn't changed on that date, the sitemap doesn't use the date so I'm unsure where they are getting this information from. Possibly last modified of one of the item pages was a theory.

Drawing Conclusions

I am not one to jump to conclusions, however it's pretty clear to see that each search engine has understood and used the data in their own way. With both Google and Bing, they seem to love a list, Google enhancing the serp with number of results whilst Bing always keeps to their order. And we can see that by nesting they can understand that each item page represents one of the pubs in the list, Bing especially so homing in with their navigation style display.

As to whether the search engines are using the pub geo or the geo-shape, I've no hard evidence either way. There are plenty of coincidences to go on when I have been testing a sample group, say 'Pubs in Reading' and 'Pubs near me' with the MobileMoxie SERPerator or when I am there in person. All were interesting but not conclusive, something to chat over with a pint for sure.

Look to the Future

What might surprise you is this structured data has been circulating live on this project since 2015, from the early days when it first produced breadcrumbs on Google, to today in 2020 with examples where we can clearly see the search engines adopting it more and more.

Although when it comes to geo I'm inconclusive, we need to think back to before featured snippets when it was all just fields, what Schema set out to do has not changed, only what the search engines choose to do with our structured data has evolved. The way I see it is get creative, just because it's not in a search engines 'official things that make serp features' doesn't make it wrong, it's simply they might not use it … yet.