City
City is a direct AdministrativeArea subtype for incorporated cities and towns. It has no unique properties, but a strong City node with geo, containedInPlace, and sameAs anchors every LocalBusiness, JobPosting, and Event inside that jurisdiction to a single canonical entity.
The practical win is entity resolution: when Google's knowledge graph sees a consistent @id-linked City node across your business listings, location pages, and job postings, it collapses them onto the same place entity. That is the difference between a scattered set of local pages and a coherent "Dunmore, PA" knowledge panel.
Full example of schema.org/City json-ld markup
The markup is verified as valid with Rich Results Test from Google.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "City",
"@id": "https://xoocode.com/reference/city/dunmore-pa",
"name": "Dunmore",
"geo": { "@type": "GeoCoordinates", "latitude": 41.4231, "longitude": -75.6327 },
"containedInPlace": {
"@type": "State",
"@id": "https://xoocode.com/reference/state/US-PA",
"name": "Pennsylvania",
"identifier": "US-PA"
},
"sameAs": [
"https://en.wikipedia.org/wiki/Dunmore,_Pennsylvania",
"https://www.wikidata.org/wiki/Q616985"
]
}
</script>When to use a City node
- On a city landing page ("Things to do in Dunmore").
- Inside
jobLocation.address.addressLocality, paired with the text city name. - As a
containedInPlaceanchor on TouristAttraction, Park, or LocalBusiness entities that sit inside the city.
For plain addresses, the single text value "addressLocality": "Dunmore" is still the right call. A full City node is for when the city is the subject.
Minimal valid version
The smallest markup that still produces a valid City entity. Use it as the floor. Reach for the advanced example above when you want search engines and AI agents to understand more about your content.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "City",
"name": "Dunmore",
"containedInPlace": { "@type": "State", "name": "Pennsylvania" }
}
</script>Google rich results this unlocks
Markup matching this example makes your page eligible for the following Google Search rich results. The primary target drives the required / recommended property classification in the advanced code block above.
- Google docsNo dedicated rich result (knowledge-graph entity resolution)
Common City mistakes
Mistakes that pass validation but silently fail to earn rich results or mislead consumers walking the graph. Avoid these and your markup will be ahead of most sites in the wild.
- 01
Multiple competing @id values for the same city
WrongDifferent pages reference Dunmore via different @id valuesRightOne canonical @id for the City, referenced from every local entityInconsistent @id values prevent Google from collapsing your local pages onto one place entity. Pick one and stick to it.
- 02
City for an unincorporated neighbourhood
WrongCity on a neighbourhood, suburb, or census-designated placeRightUse AdministrativeArea (or Neighborhood-style naming) for sub-city divisionsCity is about incorporated municipalities; going more granular confuses the jurisdictional signal.
Schema properties in this example
Also mentioned in 16 other examples
City also appears in AdministrativeArea, Airport, CityHall, Courthouse, EmergencyService, FireStation, GovernmentOrganization, GovernmentService, and 8 more. See the full City schema page for every reference.
About the example data
Dunmore, Pennsylvania as a City node with geo coordinates and a Wikipedia sameAs, used to anchor every Xoo Code LocalBusiness and event.
Comments
Loading comments...