# GetLayerCategoriesParams

***

The parameters for getting categories from a layer, passed to\
the [LayersController.getCategoryData](/js-sdk-api-reference/layers/layerscontroller.md#getcategorydata) method.

## Properties

### layerId

> **layerId**: `string`

The ID of the layer to get categories from.

***

### attribute

> **attribute**: `string`

The attribute to use for categorization.

***

### limit?

> `optional` **limit**: `number`

The maximum number of categories to return.

***

### filters?

> `optional` **filters**: [`Filters`](/js-sdk-api-reference/layers/filters.md)

Attribute filters for the features to include when calculating the categories.

***

### boundary?

> `optional` **boundary**: [`GeometryFilter`](/js-sdk-api-reference/layers/geometryfilter.md)

The spatial boundary for the features to include when calculating the categories.

***

### values?

> `optional` **values**: [`ValueConfiguration`](/js-sdk-api-reference/layers/valueconfiguration.md)

Configuration for filtering and aggregating values while preserving the full set of\
categories in the results.

This is particularly useful when you want to compare different subsets of data while\
maintaining consistent categories. For example:

* Show all building types in a city, but only count recent buildings in each type
* Keep all neighborhood categories but only sum up residential square footage

Unlike top-level filters which affect both what categories appear AND their values,\
filters in this configuration only affect the values while keeping all possible\
categories in the results.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.felt.com/js-sdk-api-reference/layers/getlayercategoriesparams.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
