---
updatedAt: 2025-10-08T09:21:05.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Get Geo-Targeting

## Why Get Geo-Targeting?

When you want to retrieve properties and details for a flight's geo-targeting settings, the Kevel API enables you to return this information using the Get Geo-Targeting API endpoint. When you make this API request to the endpoint with the `FlightID` and `LocationID`, a JSON object will be returned to you with all properties and settings for the flight you specified.

## API Syntax

When using the Get Geo-Targeting API endpoint, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

`GET https://api.kevel.co/v1/flight/{FlightID}/geotargeting/{LocationID}`

Where:

* `GET` - the type of API request being made.
* `https://api.kevel.co` - the URL for the request.
* `v1` - the API version.
* `flight` - the API endpoint being called.
* `FlightID` - the ID associated with the flight.
* `geotargeting` - the geo-targeting settings for the flight.
* `LocationID` - the ID from the geo-targeting endpoint.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "management-api-2",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.kevel.co"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Adzerk-ApiKey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/flight/{FlightID}/geotargeting/{LocationID}": {
      "get": {
        "summary": "Get Geo-Targeting",
        "description": "",
        "operationId": "get-geo-targeting",
        "parameters": [
          {
            "name": "FlightID",
            "in": "path",
            "description": "ID of the Flight",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "LocationID",
            "in": "path",
            "description": "ID from the Geo-Targeting Endpoint",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"LocationId\":76543,\n  \"FlightId\":12345,\n  \"CountryCode\":\"US\",\n  \"Region\":\"NC\",\n  \"MetroCode\":560,\n  \"City\":\"Durham\",\n  \"CityGeonameId\":4464368,\n  \"IsExclude\":false\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "LocationId": {
                      "type": "integer",
                      "example": 76543,
                      "default": 0
                    },
                    "FlightId": {
                      "type": "integer",
                      "example": 12345,
                      "default": 0
                    },
                    "CountryCode": {
                      "type": "string",
                      "example": "US"
                    },
                    "Region": {
                      "type": "string",
                      "example": "NC"
                    },
                    "MetroCode": {
                      "type": "integer",
                      "example": 560,
                      "default": 0
                    },
                    "City": {
                      "type": "string",
                      "example": "Durham"
                    },
                    "CityGeonameId": {
                      "type": "integer",
                      "example": 4464368,
                      "default": 0
                    },
                    "IsExclude": {
                      "type": "boolean",
                      "example": false,
                      "default": "false"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X GET -H 'X-Adzerk-ApiKey:<APIKEY>' \"https://api.kevel.co/v1/flight/12345/geotargeting/76543\""
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/management-sdk');\nconst apiKey = process.env.ADZERK_API_KEY;\n\nasync function getGeoTargeting() {\n  let specifications = await Adzerk.fetchSpecifications();\n  let client = await Adzerk.buildClient({apiKey, specifications});\n\n  let geoTargeting = await client.run(\"geoTargeting\", \"get\", {\n    locationId: 76544,\n    flightId: 12345,\n  });\n\n  console.log(geoTargeting);\n}\n\ngetGeoTargeting();"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk\"\n\ndef get_geo_targeting()\n    client = Adzerk::Client.new(ENV[\"ADZERK_API_KEY\"])\n    flight_id = 12345\n    location_id = 67890\n    pp client.geotargetings.get(flight_id, location_id)\nend\nget_geo_targeting()"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "ruby"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "X-Adzerk-Sdk-Version",
        "value": "Readme.io:ManagementAPI2"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```