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

# Get Mapping

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

Returns the field mapping for the default index in the `{collection}`.

Use this mapping to understand which fields are available and how they are typed, 
so you can [craft precise search queries](/knowledge-base/query-language/) using Lucene Query Syntax.

Each field or subfield will include either a `field_type` or `children` property:

- A `field_type` indicates that the field is a leaf node in the mapping tree.
- A `children` property indicates a parent field that contains nested fields.

Example:
```json
{
  "leaf": {
    "field_type": "type"
  },
  "parent": {
    "children": [
      {
        "leaf": {
          "field_type": "type"
        }
      }
    ]
  }
}
```

❗️__Note__: This endpoint returns the search mapping, which may slightly differ from the structure of actual search results.
Refer to the response examples for each data collection to see how fields are represented in real-world data.

## Path parameters

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

## Response `200`

__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)
