or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

core-types.mdcreative-work.mdevents.mdindex.mdperson-organization.mdplace-location.mdproducts-commerce.mdroles-relationships.mdschema-generation.md

place-location.mddocs/

0

# Place and Location Types

1

2

Schema.org types for geographic locations, venues, businesses, addresses, and spatial relationships.

3

4

## Capabilities

5

6

### Place Base Type

7

8

The root type for all locations and geographic entities.

9

10

```typescript { .api }

11

/**

12

* Entities that have a somewhat fixed, physical extension

13

*/

14

type Place = PlaceLeaf | Accommodation | AdministrativeArea | CivicStructure |

15

Landform | LandmarksOrHistoricalBuildings | LocalBusiness | Residence |

16

TouristAttraction | TouristDestination | string;

17

18

interface PlaceBase extends ThingBase {

19

/** A property-value pair representing an additional characteristic of the entity */

20

additionalProperty?: SchemaValue<PropertyValue, "additionalProperty">;

21

/** Physical address of the item */

22

address?: SchemaValue<PostalAddress | Text, "address">;

23

/** The overall rating, based on a collection of reviews or ratings, of the item */

24

aggregateRating?: SchemaValue<AggregateRating, "aggregateRating">;

25

/** An amenity feature (e.g. a characteristic or service) of an Accommodation */

26

amenityFeature?: SchemaValue<LocationFeatureSpecification, "amenityFeature">;

27

/** A short textual code (also called "store code") that uniquely identifies a place of business */

28

branchCode?: SchemaValue<Text, "branchCode">;

29

/** The basic containment relation between a place and one that contains it */

30

containedInPlace?: SchemaValue<Place, "containedInPlace">;

31

/** The basic containment relation between a place and another that it contains */

32

containsPlace?: SchemaValue<Place, "containsPlace">;

33

/** Upcoming or past event associated with this place, organization, or action */

34

event?: SchemaValue<Event, "event">;

35

/** The fax number */

36

faxNumber?: SchemaValue<Text, "faxNumber">;

37

/** The geo coordinates of the place */

38

geo?: SchemaValue<GeoCoordinates | GeoShape, "geo">;

39

/** Represents a relationship between two geometries (or the places they represent) */

40

geoContains?: SchemaValue<GeospatialGeometry | Place, "geoContains">;

41

/** Represents a relationship between two geometries (or the places they represent) */

42

geoCoveredBy?: SchemaValue<GeospatialGeometry | Place, "geoCoveredBy">;

43

/** Indicates whether some facility (e.g. FoodEstablishment, CovidTestingFacility) offers a service that can be used by driving through in a car */

44

hasDriveThruService?: SchemaValue<Boolean, "hasDriveThruService">;

45

/** A URL to a map of the place */

46

hasMap?: SchemaValue<Map | URL, "hasMap">;

47

/** A flag to signal that the item, event, or place is accessible for free */

48

isAccessibleForFree?: SchemaValue<Boolean, "isAccessibleForFree">;

49

/** The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place */

50

isicV4?: SchemaValue<Text, "isicV4">;

51

/** Keywords or tags used to describe this content */

52

keywords?: SchemaValue<DefinedTerm | Text | URL, "keywords">;

53

/** The latitude of a location */

54

latitude?: SchemaValue<Number | Text, "latitude">;

55

/** An associated logo */

56

logo?: SchemaValue<ImageObject | URL, "logo">;

57

/** The longitude of a location */

58

longitude?: SchemaValue<Number | Text, "longitude">;

59

/** The total number of individuals that may attend an event or venue */

60

maximumAttendeeCapacity?: SchemaValue<Integer, "maximumAttendeeCapacity">;

61

/** The opening hours of a certain place */

62

openingHoursSpecification?: SchemaValue<OpeningHoursSpecification, "openingHoursSpecification">;

63

/** A photograph of this place */

64

photo?: SchemaValue<ImageObject | Photograph, "photo">;

65

/** A flag to signal that the Place has a public toilet */

66

publicAccess?: SchemaValue<Boolean, "publicAccess">;

67

/** A review of the item */

68

review?: SchemaValue<Review, "review">;

69

/** Indicates whether it is allowed to smoke in the place */

70

smokingAllowed?: SchemaValue<Boolean, "smokingAllowed">;

71

/** The special opening hours of a certain place */

72

specialOpeningHoursSpecification?: SchemaValue<OpeningHoursSpecification, "specialOpeningHoursSpecification">;

73

/** The telephone number */

74

telephone?: SchemaValue<Text, "telephone">;

75

}

76

```

77

78

### Administrative Area Types

79

80

Types for political and administrative geographical divisions.

81

82

```typescript { .api }

83

/**

84

* A geographical region, typically under the jurisdiction of a particular government

85

*/

86

type AdministrativeArea = AdministrativeAreaLeaf | City | Country |

87

SchoolDistrict | State | string;

88

89

/**

90

* A city or town

91

*/

92

type City = CityLeaf | string;

93

94

/**

95

* A country

96

*/

97

type Country = CountryLeaf | string;

98

99

/**

100

* A state or province of a country

101

*/

102

type State = StateLeaf | string;

103

```

104

105

**Usage Examples:**

106

107

```typescript

108

import type { Place, City, Country, State } from "schema-dts";

109

110

// Basic place with coordinates

111

const landmark: Place = {

112

"@type": "Place",

113

name: "Golden Gate Bridge",

114

geo: {

115

"@type": "GeoCoordinates",

116

latitude: 37.8199,

117

longitude: -122.4783

118

},

119

address: {

120

"@type": "PostalAddress",

121

addressLocality: "San Francisco",

122

addressRegion: "CA",

123

addressCountry: "US"

124

}

125

};

126

127

// City with details

128

const city: City = {

129

"@type": "City",

130

name: "New York",

131

alternateName: "NYC",

132

containedInPlace: {

133

"@type": "State",

134

name: "New York"

135

},

136

geo: {

137

"@type": "GeoCoordinates",

138

latitude: 40.7128,

139

longitude: -74.0060

140

}

141

};

142

143

// Country information

144

const country: Country = {

145

"@type": "Country",

146

name: "United States",

147

alternateName: "USA"

148

};

149

```

150

151

### Accommodation Types

152

153

Types for lodging and temporary residence facilities.

154

155

```typescript { .api }

156

/**

157

* An accommodation is a place that can accommodate human beings

158

*/

159

type Accommodation = AccommodationLeaf | Apartment | CampingPitch | House |

160

Room | Suite | string;

161

162

interface AccommodationBase extends PlaceBase {

163

/** An amenity feature (e.g. a characteristic or service) of an Accommodation */

164

amenityFeature?: SchemaValue<LocationFeatureSpecification, "amenityFeature">;

165

/** The size of the accommodation, e.g. in square meter or squarefoot */

166

floorSize?: SchemaValue<QuantitativeValue, "floorSize">;

167

/** The total integer number of bathrooms in some Accommodation */

168

numberOfBathroomsTotal?: SchemaValue<Integer, "numberOfBathroomsTotal">;

169

/** The total integer number of bedrooms in some Accommodation */

170

numberOfBedrooms?: SchemaValue<Number | QuantitativeValue, "numberOfBedrooms">;

171

/** Number of full bathrooms - The total number of full and ¾ bathrooms in an Accommodation */

172

numberOfFullBathrooms?: SchemaValue<Number, "numberOfFullBathrooms">;

173

/** Number of partial bathrooms - The total number of half and ¼ bathrooms in an Accommodation */

174

numberOfPartialBathrooms?: SchemaValue<Number, "numberOfPartialBathrooms">;

175

/** The number of rooms (excluding bathrooms and closets) of the accommodation or lodging business */

176

numberOfRooms?: SchemaValue<Number | QuantitativeValue, "numberOfRooms">;

177

/** Indications regarding the permitted use of the accommodation */

178

permittedUsage?: SchemaValue<Text, "permittedUsage">;

179

/** A page providing information on how to book a tour of some Place */

180

tourBookingPage?: SchemaValue<URL, "tourBookingPage">;

181

}

182

183

/**

184

* A furnished accommodation, such as an apartment or house, offered for short-term rental or sale

185

*/

186

type Apartment = ApartmentLeaf | string;

187

188

/**

189

* A house is a building or structure that has the ability to be occupied for habitation by humans

190

*/

191

type House = HouseLeaf | SingleFamilyResidence | string;

192

193

/**

194

* A room is a distinguishable space within a structure, usually separated from other spaces by interior walls

195

*/

196

type Room = RoomLeaf | HotelRoom | MeetingRoom | string;

197

```

198

199

**Usage Examples:**

200

201

```typescript

202

import type { Apartment, House, Room } from "schema-dts";

203

204

// Rental apartment listing

205

const rentalApartment: Apartment = {

206

"@type": "Apartment",

207

name: "Downtown Studio Apartment",

208

address: {

209

"@type": "PostalAddress",

210

streetAddress: "123 Main Street, Apt 4B",

211

addressLocality: "San Francisco",

212

addressRegion: "CA",

213

postalCode: "94102",

214

addressCountry: "US"

215

},

216

numberOfRooms: 2,

217

numberOfBedrooms: 1,

218

numberOfBathroomsTotal: 1,

219

floorSize: {

220

"@type": "QuantitativeValue",

221

value: 600,

222

unitCode: "SQF"

223

},

224

amenityFeature: [

225

{

226

"@type": "LocationFeatureSpecification",

227

name: "Air Conditioning"

228

},

229

{

230

"@type": "LocationFeatureSpecification",

231

name: "Laundry"

232

}

233

]

234

};

235

236

// Single family house

237

const familyHome: House = {

238

"@type": "SingleFamilyResidence",

239

name: "Colonial Style Home",

240

address: {

241

"@type": "PostalAddress",

242

streetAddress: "456 Oak Avenue",

243

addressLocality: "Suburbs",

244

addressRegion: "TX",

245

postalCode: "75001",

246

addressCountry: "US"

247

},

248

numberOfBedrooms: 4,

249

numberOfBathroomsTotal: 3,

250

numberOfFullBathrooms: 2,

251

numberOfPartialBathrooms: 1,

252

floorSize: {

253

"@type": "QuantitativeValue",

254

value: 2400,

255

unitCode: "SQF"

256

}

257

};

258

```

259

260

### Civic Structure Types

261

262

Types for public buildings and infrastructure.

263

264

```typescript { .api }

265

/**

266

* A public structure, such as a town hall or concert hall

267

*/

268

type CivicStructure = CivicStructureLeaf | Airport | Aquarium | Beach |

269

BoatTerminal | Bridge | BusStation | BusStop | Campground | Cemetery |

270

Crematorium | EducationalOrganization | EventVenue | FireStation |

271

GovernmentBuilding | Hospital | MovieTheater | Museum | MusicVenue |

272

Park | ParkingFacility | PerformingArtsTheater | PlaceOfWorship |

273

Playground | PoliceStation | PublicToilet | RVPark | StadiumOrArena |

274

SubwayStation | TaxiStand | TrainStation | Zoo | string;

275

276

/**

277

* An airport

278

*/

279

type Airport = AirportLeaf | string;

280

281

interface AirportBase extends CivicStructureBase {

282

/** IATA identifier for an airline or airport */

283

iataCode?: SchemaValue<Text, "iataCode">;

284

/** ICAO identifier for an airline or airport */

285

icaoCode?: SchemaValue<Text, "icaoCode">;

286

}

287

288

/**

289

* A hospital

290

*/

291

type Hospital = HospitalLeaf | string;

292

293

/**

294

* A museum

295

*/

296

type Museum = MuseumLeaf | string;

297

298

/**

299

* A park

300

*/

301

type Park = ParkLeaf | string;

302

```

303

304

**Usage Examples:**

305

306

```typescript

307

import type { Airport, Hospital, Museum, Park } from "schema-dts";

308

309

// Airport information

310

const airport: Airport = {

311

"@type": "Airport",

312

name: "San Francisco International Airport",

313

iataCode: "SFO",

314

icaoCode: "KSFO",

315

address: {

316

"@type": "PostalAddress",

317

addressLocality: "San Francisco",

318

addressRegion: "CA",

319

postalCode: "94128",

320

addressCountry: "US"

321

},

322

telephone: "+1-650-821-8211"

323

};

324

325

// Hospital facility

326

const hospital: Hospital = {

327

"@type": "Hospital",

328

name: "General Hospital",

329

address: {

330

"@type": "PostalAddress",

331

streetAddress: "1 Medical Center Drive",

332

addressLocality: "City",

333

addressRegion: "State",

334

postalCode: "12345",

335

addressCountry: "US"

336

},

337

telephone: "+1-555-0199",

338

isAccessibleForFree: false

339

};

340

341

// Museum

342

const museum: Museum = {

343

"@type": "Museum",

344

name: "Museum of Modern Art",

345

openingHoursSpecification: [

346

{

347

"@type": "OpeningHoursSpecification",

348

dayOfWeek: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],

349

opens: "10:00",

350

closes: "17:30"

351

},

352

{

353

"@type": "OpeningHoursSpecification",

354

dayOfWeek: ["Saturday", "Sunday"],

355

opens: "10:00",

356

closes: "18:00"

357

}

358

],

359

isAccessibleForFree: false

360

};

361

```

362

363

### Geographic Coordinates and Shapes

364

365

Types for precise geographic positioning and area definitions.

366

367

```typescript { .api }

368

/**

369

* The geographic coordinates of a place or event

370

*/

371

type GeoCoordinates = GeoCoordinatesLeaf;

372

373

interface GeoCoordinatesBase extends StructuredValueBase {

374

/** Physical address of the item */

375

address?: SchemaValue<PostalAddress | Text, "address">;

376

/** The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code */

377

addressCountry?: SchemaValue<Country | Text, "addressCountry">;

378

/** The elevation of a location (WGS 84) */

379

elevation?: SchemaValue<Number | Text, "elevation">;

380

/** The latitude of a location. For example 37.42242 (WGS 84) */

381

latitude?: SchemaValue<Number | Text, "latitude">;

382

/** The longitude of a location. For example -122.08585 (WGS 84) */

383

longitude?: SchemaValue<Number | Text, "longitude">;

384

/** The postal code. For example, 94043 */

385

postalCode?: SchemaValue<Text, "postalCode">;

386

}

387

388

/**

389

* The geographic shape of a place. A GeoShape can be described using several properties whose values are based on latitude/longitude pairs

390

*/

391

type GeoShape = GeoShapeLeaf | GeoCircle | GeospatialGeometry;

392

393

interface GeoShapeBase extends StructuredValueBase {

394

/** Physical address of the item */

395

address?: SchemaValue<PostalAddress | Text, "address">;

396

/** The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code */

397

addressCountry?: SchemaValue<Country | Text, "addressCountry">;

398

/** A box is the area enclosed by the rectangle formed by two points */

399

box?: SchemaValue<Text, "box">;

400

/** A circle is the circular region of a specified radius centered at a specified latitude and longitude */

401

circle?: SchemaValue<Text, "circle">;

402

/** The elevation of a location (WGS 84) */

403

elevation?: SchemaValue<Number | Text, "elevation">;

404

/** A line is a point-to-point path consisting of two or more points */

405

line?: SchemaValue<Text, "line">;

406

/** A polygon is the area enclosed by a point-to-point path for which the starting and ending points are the same */

407

polygon?: SchemaValue<Text, "polygon">;

408

/** The postal code. For example, 94043 */

409

postalCode?: SchemaValue<Text, "postalCode">;

410

}

411

```

412

413

### Postal Address Type

414

415

Structured address information for physical locations.

416

417

```typescript { .api }

418

/**

419

* The mailing address

420

*/

421

type PostalAddress = PostalAddressLeaf;

422

423

interface PostalAddressBase extends ContactPointBase {

424

/** The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code */

425

addressCountry?: SchemaValue<Country | Text, "addressCountry">;

426

/** The locality in which the street address is, and which is in the region */

427

addressLocality?: SchemaValue<Text, "addressLocality">;

428

/** The region in which the locality is, and which is in the country */

429

addressRegion?: SchemaValue<Text, "addressRegion">;

430

/** The post office box number for PO box addresses */

431

postOfficeBoxNumber?: SchemaValue<Text, "postOfficeBoxNumber">;

432

/** The postal code. For example, 94043 */

433

postalCode?: SchemaValue<Text, "postalCode">;

434

/** The street address. For example, 1600 Amphitheatre Pkwy */

435

streetAddress?: SchemaValue<Text, "streetAddress">;

436

}

437

```

438

439

**Usage Examples:**

440

441

```typescript

442

import type { PostalAddress, GeoCoordinates, GeoShape } from "schema-dts";

443

444

// Complete postal address

445

const businessAddress: PostalAddress = {

446

"@type": "PostalAddress",

447

streetAddress: "1600 Amphitheatre Parkway",

448

addressLocality: "Mountain View",

449

addressRegion: "CA",

450

postalCode: "94043",

451

addressCountry: "US"

452

};

453

454

// Precise coordinates

455

const coordinates: GeoCoordinates = {

456

"@type": "GeoCoordinates",

457

latitude: 37.4224,

458

longitude: -122.0856,

459

elevation: 30,

460

address: businessAddress

461

};

462

463

// Geographic area definition

464

const serviceArea: GeoShape = {

465

"@type": "GeoShape",

466

circle: "37.4224,-122.0856,10", // lat,lng,radius in km

467

addressCountry: "US"

468

};

469

```