> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.navisavitravel.com/llms.txt.

# Get a location

GET https://api.navisavitravel.com/v1/locations/{locationId}

Returns rich detail for a specific location including a hero image, breadcrumb, nearby locations in the same locality, seasons, experience categories, vibes, audience segments, and an SEO-ready description.

Reference: https://api-docs.navisavitravel.com/api-reference/geography/get-location

## Authentication

- `x-api-key` header (required) — API key issued with your NaviSavi plan

## Servers

- `https://api.navisavitravel.com` (Production, default)
- `https://api-dev.navisavitravel.com` (Development)

## Request

### Path parameters

- `locationId` (integer, optional)

## Response

### 200

Location detail

- `id` (integer, required)
- `name` (string, required)
- `localityId` (integer, required)
- `localityName` (string, required, nullable)
- `regionId` (integer, required)
- `regionName` (string, required, nullable)
- `countryId` (integer, required)
- `countryName` (string, required, nullable)
- `breadcrumbList` (list of string, required)
- `heroImageUrl` (string, required, nullable)
- `description` (string, required)
- `editorial` (LocationDetailEditorial, required, nullable)
- `nearbyLocations` (list of LocationDetailNearbyLocationsItems, required)
- `topSeasons` (list of LocationDetailTopSeasonsItems, required)
- `topExperienceCategories` (list of LocationDetailTopExperienceCategoriesItems, required)
- `topVibes` (list of LocationDetailTopVibesItems, required)
- `topAudienceSegments` (list of LocationDetailTopAudienceSegmentsItems, required)
- `relatedDestinations` (list of LocationDetailRelatedDestinationsItems, required)

## Errors

### 400 Bad Request Error

Invalid request parameters

- `error` (string, required)
- `details` (map from string to any, optional)

### 403 Forbidden Error

Missing or invalid API key

- `error` (string, required)
- `details` (map from string to any, optional)

### 404 Not Found Error

Resource not found

- `error` (string, required)
- `details` (map from string to any, optional)

### 500 Internal Server Error

Internal server error

- `error` (string, required)
- `details` (map from string to any, optional)

## Types

### LocationDetailEditorial

- `description` (string, required)
- `metaTitle` (string, required)
- `metaDescription` (string, required)

### LocationDetailNearbyLocationsItems

- `id` (integer, required)
- `name` (string, required)

### LocationDetailTopSeasonsItems

- `name` (string, required)

### LocationDetailTopExperienceCategoriesItems

- `id` (integer, required)
- `name` (string, required)

### LocationDetailTopVibesItems

- `id` (integer, required)
- `name` (string, required)

### LocationDetailTopAudienceSegmentsItems

- `id` (integer, required)
- `name` (string, required)

### LocationDetailRelatedDestinationsItems

- `id` (integer, required)
- `name` (string, required)
- `slug` (string, required)
- `category` (string, required)

## Examples

**Response**

```json
{
  "id": 200,
  "name": "Plage de Palombaggia",
  "localityId": 55,
  "localityName": "Ajaccio",
  "regionId": 12,
  "regionName": "Corsica",
  "countryId": 1,
  "countryName": "France",
  "breadcrumbList": [
    "France",
    "Corsica",
    "Ajaccio",
    "Plage de Palombaggia"
  ],
  "heroImageUrl": "https://cdn.example.com/thumb.png",
  "description": "Plage de Palombaggia is a notable spot within Ajaccio, France. Visitors come for its Nature & Outdoors credentials and Adventurous character, best experienced during Summer. Nearby, Calanques de Piana and Bonifacio are also worth your time.",
  "editorial": {
    "description": "string",
    "metaTitle": "string",
    "metaDescription": "string"
  },
  "nearbyLocations": [
    {
      "id": 201,
      "name": "Calanques de Piana"
    }
  ],
  "topSeasons": [
    {
      "name": "Summer"
    }
  ],
  "topExperienceCategories": [
    {
      "id": 1,
      "name": "Nature & Outdoors"
    }
  ],
  "topVibes": [
    {
      "id": 9,
      "name": "Adventurous"
    }
  ],
  "topAudienceSegments": [
    {
      "id": 1,
      "name": "Couples"
    }
  ],
  "relatedDestinations": [
    {
      "id": 2,
      "name": "Mediterranean Islands",
      "slug": "mediterranean-islands",
      "category": "Multi-country"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.navisavitravel.com/v1/locations/200"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.navisavitravel.com/v1/locations/200';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.navisavitravel.com/v1/locations/200"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.navisavitravel.com/v1/locations/200")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.navisavitravel.com/v1/locations/200")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.navisavitravel.com/v1/locations/200', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.navisavitravel.com/v1/locations/200");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.navisavitravel.com/v1/locations/200")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```