getCategories

getCategories

Function
getCategories(requestOptionsIGetCategoriesOptions): Promise<IGetCategoriesResponse>

The ArcGIS Places service has many categories (or types) of place, from art museums to zoos. This endpoint returns all the categories including their label and categoryId. The category Id can be used to search for types of places with a places/near-point or places/within-extentrequest.

Categories also have information on their parent. This allows you to search for specific categories such as "French Restaurant" - or to look for more generic types such as "Restaurant".

1
2
3
4
5
6
7
8
import { getCategories } from "@esri/arcgis-rest-places";
import { ApiKeyManager } from "@esri/arcgis-rest-request";

const response = await getCategories({
  authentication: ApiKeyManager.fromKey("YOUR_API_KEY")
});

console.log(response.categories);
Parameters
ParameterType
requestOptions
IGetCategoriesOptions
Returns 
Promise<IGetCategoriesResponse>

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close