> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Geographic Visualization of Requests Coming to Apinizer with Kibana Maps

> Visualizing geolocation data on a map using Kibana Maps

This document will explain how to visualize which cities requests come from on a map using the Kibana Maps feature for geolocation data used in Apinizer.

You can use the geolocation feature in Apinizer with version 2025. To use the geolocation feature, you can check the relevant documentation on the [Geolocation City-Based Access Control](/en/operations/administrator-guides/geolocation-city-based-access-control) page.

## 1) Geolocation Data Provided by Apinizer

In Apinizer, the geographic location data of incoming requests is represented in Elasticsearch in JSON format as follows.

```json theme={null}
{
  "toClientBody": "[]",
  "loc": {
    "lat": 41.0,
    "lon": 28.0
  }
}
```

Lat (latitude) and lon (longitude) values are geographic coordinates used to determine the position of a point on Earth.

**For example:**

* Latitude: 41.0082° N, Longitude: 28.9784° E (Istanbul, Turkey)
* Latitude: 40.7128° N, Longitude: 74.0060° W (New York, USA)

## 2) Transferring Data to Kibana

### 2.1) Creating Index Pattern

In the step of transferring data to Kibana, Kibana **installation** and **integration** must be provided. For Kibana installation, you can check the relevant documentation on the [Kibana API Traffic Log Visualization](/en/tutorials/api-analytics-and-observability-scenarios/kibana-api-traffic-log-visualization) page.

After installation, in Kibana, on the **Stack Management → Index Patterns** page, a new index pattern can be created from the '**Create Index Pattern**' section:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/01-index-pattern-create.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=78c36a4deb1edae605a73ef7386a33fd" alt="Index Pattern Creation" width="1000" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/01-index-pattern-create.png" />

The steps are completed by selecting the **data stream** used in Elasticsearch and the creation process is performed:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/02-data-stream-select.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=d560a7b9ad4722f69c05807587c57d09" alt="Data Stream Selection" width="1000" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/02-data-stream-select.png" />

After the creation process is completed, you can see the relevant fields (**fields**) on the page below:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/03-fields-view.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=1475780a21b9db115f6f06a1dac575dd" alt="Index Pattern Fields View" width="1000" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/03-fields-view.png" />

### 2.2) Checking Existing Index Pattern

If Kibana was **previously installed** and **index pattern exists**, refresh the index you added to Kibana from the **Stack Management → Index Patterns** page below. You should check that the relevant value exists by writing **'loc'** in the search section.

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/04-loc-field-check.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=379eb33046619e120986bbd0991918fb" alt="loc Field Check" width="1000" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/04-loc-field-check.png" />

Kibana enables the **visualization** of incoming requests on a **map** using this **'loc'** data (**latitude and longitude**).

## 3) Adding Map Panel with Kibana Maps and Visualization

Click on the "**Maps**" tab in the left menu on the **Kibana** main page. This is the application you will use to create map visualizations:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/05-maps-menu.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=ae693d8ae8fb94796b003e1dbd87fea4" alt="Kibana Maps Menu" width="1000" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/05-maps-menu.png" />

Click the **Add layer** button. Prefer the **Documents** option:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/06-add-layer-documents.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=de191ddc6c8532abac09186d2c389533" alt="Add Layer Documents Selection" width="1000" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/06-add-layer-documents.png" />

After selecting the index pattern, the 'loc' field will be automatically selected. Then, click the '**Add layer'** button to **add** the layer, **name** it and **save** it:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/07-add-layer-loc.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=160e232fdfd288c2ddc754f276532a61" alt="Add Layer with loc Field" width="1000" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/07-add-layer-loc.png" />

## 4) Result

In this document, after the **IP information of requests coming to Apinizer is converted to geographic data** and sent to Elasticsearch, it was explained step by step how to **visualize** which cities requests come from using **Kibana Maps**.

Thanks to this structure, user accesses can be analyzed on a city basis.

Incoming requests on the map will be shown with **green markers**:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/08-map-result.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=734ec20410c0e1ee3fea176abaa587a5" alt="Kibana Maps Map Result" width="1000" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/08-map-result.png" />
