Geolocation by Name API

Retrieve a specific geolocation by searching with its name

Security

Geolocation by Name API

Look up a specific geolocation using the country name. Retrieve country codes, geo discounts, and other location details.

Name Search

Find by country name.

Location Details

Complete geo information.

Quick Lookup

Single result response.


Endpoint Overview

QUERY/graphql

Retrieve details for a specific geolocation by searching with its country name.

Authentication:Bearer Token
Required scopes:adminuser

Request Parameters

nameString!Required

The name of the country to search for (e.g., "United States", "Germany").


GraphQL Query

query geolocationByName($name: String!) {
  geolocationByName(name: $name) {
    id
    name
    code
    threeCharCode
    geoDiscount
  }
}

Variables:

{
  "name": "Netherlands"
}

HTTP Request:

curl -X POST https://api.orbnet.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "query": "query geolocationByName($name: String!) { geolocationByName(name: $name) { id name code threeCharCode geoDiscount } }",
    "variables": {
      "name": "Netherlands"
    }
  }'

Response

200Geolocation Found
{
  "data": {
    "geolocationByName": {
      "id": "4",
      "name": "Netherlands",
      "code": "NL",
      "threeCharCode": "NLD",
      "geoDiscount": 0
    }
  }
}
404Geolocation Not Found
{
  "errors": [
    {
      "message": "Geolocation not found",
      "path": ["geolocationByName"],
      "extensions": {
        "code": "NOT_FOUND"
      }
    }
  ],
  "data": null
}

Response Fields

idID!

Unique identifier for the geolocation.

nameString!

Full country name.

codeString!

ISO 2-character country code.

threeCharCodeString!

ISO 3-character country code.

geoDiscountInt!

Regional discount percentage.


Use Cases

Validation

Verify country name exists.

Code Lookup

Get ISO codes from name.

Discount Check

Verify regional pricing.

Server Filter

Find servers by country.



Case Sensitivity

The name search is case-insensitive. "netherlands", "Netherlands", and "NETHERLANDS" will all return the same result.

Browse All Locations

View the complete list of available geolocations.

All Geolocations