---
title: "Get Facet Mapping"
method: GET
path: "/api/mapping/{collection}/facet/"
tags: ["Mapping"]
---

# Get Facet Mapping

`GET /api/mapping/{collection}/facet/`

Returns the facet-specific field mapping for the `{collection}`.

This mapping includes only fields that are suitable for use in **facet (group-by)** searches. 
Not all fields in the regular mapping can be used for aggregation, so fields that are not aggregatable 
(e.g., large text fields, arrays) are excluded from the facet mapping.

Use this endpoint to discover which fields are available for grouping results in your search queries.

## Path parameters

- `collection` 'responses' | 'domains' | 'whois_ip' | 'whois_domains' | 'certs', required — Type of the data collection.

## Response `200`

__Facet  Field Mapping__

- MappingResponse — A compact recursive representation of the search mapping. Each top-level key is a field name. Leaf fields contain `field_type`. Parent fields contain `children`, where each item is an object with a single nested field name mapped to another generic mapping node.

## Other responses

- `400` — __Bad Request__: Some required parameters were not passed or were not validated
- `404` — __Not Found__: Requested resource could not be found
- `500` — __Internal Server Error__: Details are included in the response body

---

[API](https://skmtc.net/netlas/apis/netlas-api.md) · [All operations](https://skmtc.net/netlas/apis/netlas-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netlas/netlas-api/revisions/2b1f84425791/schema)
