Skip to content

location()

Geographic and address data.

MethodReturnsDescription
.city()TextFakerCity name
.country()TextFakerCountry name
.countryCode()TextFakerISO country code
.state()TextFakerState/province
.street()TextFakerStreet name
.streetAddress()TextFakerFull street address
.zipCode()TextFakerPostal code
.latitude()NumericFakerLatitude (-90 to 90)
.longitude()NumericFakerLongitude (-180 to 180)
.timezone()TextFakerIANA timezone
typescript
location().city().create()                      // 'San Francisco'
location().latitude().precision(4).create()     // 44.8271

← Back to Faker API