---
title: Subregions API Reference
version: 1.0.0
description: Retrieve all subregions within a specified geographical region, or all subregions across every region when none is specified. The region parameter is optional. Returns a flat array of subregion names such as Western Europe, Southern Asia, or Northern America. Invalid region names return a 400 error; a region with no subregions (Polar) returns a 404.
openapi: 3.1.1
servers:
  - https://api.apifreaks.com/v1.0
paths: 1
operations: 1
schemas: 2
---

## Table of Contents

- [Subregions API Reference v1.0.0](#subregions-api-reference-v100)
  - [Authentication](#authentication)
  - [GeoDB APIs](#geodb-apis)
    - [getSubregionsByRegion](#getsubregionsbyregion)
      - [Parameters](#parameters)
      - [Responses](#responses)
  - [Schemas](#schemas)
    - [SubregionsResponse](#subregionsresponse)
    - [ErrorResponse](#errorresponse)



# Subregions API Reference v1.0.0

Retrieve all subregions within a specified geographical region, or all subregions across every region when none is specified. The region parameter is optional. Returns a flat array of subregion names such as Western Europe, Southern Asia, or Northern America. Invalid region names return a 400 error; a region with no subregions (Polar) returns a 404.

Base URLs:

* [https://api.apifreaks.com/v1.0](https://api.apifreaks.com/v1.0)

## Authentication

* API Key (ApiKeyAuthHeader)
    - Parameter Name: **X-apiKey**, in: header. Pass your API key via the X-apiKey request header.

* API Key (ApiKeyAuthQuery)
    - Parameter Name: **apiKey**, in: query. Pass your API key via the apiKey query parameter.

## GeoDB APIs

### getSubregionsByRegion

`GET /geo/subregions`

*Retrieve subregions for a specific geographical region*

Returns all subregions within a specified region, or all subregions across every region when the region parameter is omitted.

#### Parameters

|Name|In|Type|Required|Description|
|---|---|---|---|---|
|format|query|string|false|Format of the response. Possible values: json, xml.|
|region|query|string|false|Name of the region to retrieve subregions for. Omit to return all subregions across every region.|

##### Enumerated Values

|Parameter|Value|
|---|---|
|format|json|
|format|xml|

> Example responses

> Successful response with list of subregions

```json
{
  "subregions": [
    "Eastern Europe",
    "Northern Europe",
    "Southern Europe",
    "Western Europe"
  ]
}
```

```json
{
  "subregions": [
    "Australia and New Zealand",
    "Caribbean",
    "Central America",
    "Central Asia",
    "Eastern Africa",
    "Eastern Asia",
    "Eastern Europe",
    "Melanesia",
    "Micronesia",
    "Middle Africa",
    "Northern Africa",
    "Northern America",
    "Northern Europe",
    "Polynesia",
    "South America",
    "South-Eastern Asia",
    "Southern Africa",
    "Southern Asia",
    "Southern Europe",
    "Western Africa",
    "Western Asia",
    "Western Europe"
  ]
}
```

> Bad Request — Region name is not a recognized region

```json
{
  "timestamp": "2026-07-24T11:00:12.748Z",
  "path": "/v1/subregions",
  "status": 400,
  "error": "Invalid Region Name provided",
  "message": "Please provide a valid region name."
}
```

> Not Found — Region is valid but has no subregions (e.g. Polar)

```json
{
  "timestamp": "2026-07-24T11:00:06.003Z",
  "path": "/v1/subregions",
  "status": 404,
  "error": "No subregions exist",
  "message": "This region does not have any subregions."
}
```

#### Responses

|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Successful response with list of subregions|[SubregionsResponse](#subregionsresponse)|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Bad Request — Region name is not a recognized region|[ErrorResponse](#errorresponse)|
|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|Not Found — Region is valid but has no subregions (e.g. Polar)|[ErrorResponse](#errorresponse)|

#### Response Headers

|Status|Header|Type|Format|Description|
|---|---|---|---|---|
|200|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|400|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|
|404|X-AF-Credits-Cost|integer||Specifies the number of credits consumed by the current request.|

To perform this operation, you must be authenticated by means of one of the following methods:
ApiKeyAuthHeader, ApiKeyAuthQuery

## Schemas

### SubregionsResponse

Response containing subregion names for the requested region, or all subregions across every region when unfiltered.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|subregions|[string]|true|none|An array of subregion names within the specified region.|

### ErrorResponse

Standard error envelope returned by the API on failed requests.

#### Properties

|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|error|string|false|none|Short error category or exception type.|
|message|string|true|none|Human-readable error message describing the failure.|
|path|string|false|none|API endpoint path that produced the error.|
|status|integer|false|none|HTTP status code returned with the error.|
|timestamp|string(date-time)|false|none|Timestamp when the error occurred (ISO 8601).|
