The World resource

The “World” resource sits at the top of the geographical hierarchy and serves as an entry point for accessing other regions within the structure. This is the generic way of working in The DataGarden hierarchy, where child regions can be retrieved by simply querying the parent region resource. In addition to its hierarchical function, a region resource also provides general information and metadata about the region in scope.

World Resource API Endpoint

Authentication Required - Registration only

The World resource serves as your gateway to global geographical data, providing access to all continental regions through a straightforward GET request.

# Example: Retrieving the World resource
>>> url = "https://www.the-datagarden.io/world/"
>>> headers = {'Content-Type': 'application/json', 'Authorization': 'Bearer <access_token>'}
>>> 
>>> response = requests.request("GET", url, headers=headers)
>>> print(response.json())

Upon successful authentication, the API returns a structured JSON response containing the world's geographical hierarchy:

{
  "un_country_code": "900",
  "continents": [
	  "https://www.the-datagarden.io/continent/africa/",
	  "https://www.the-datagarden.io/continent/asia/",
	  "https://www.the-datagarden.io/continent/europe/",	  
	  "https://www.the-datagarden.io/continent/latin-america-and-the-caribbean/",	  
	  "https://www.the-datagarden.io/continent/northern-america/",	  
	  "https://www.the-datagarden.io/continent/oceania/"
  ],
}
			

The response includes:

  • A standardized UN country code (900 for worldwide)
  • Direct REST API links to each continental endpoint
  • Full coverage of all major geographical regions

Each continental endpoint can be accessed individually for more detailed regional information. These URLs serve as your entry points for drilling down into specific geographical areas.