# Get Custom Metadata Schema

Discover the custom metadata fields that have been used in events for a given use case. This is useful for building queries with `customMetadataFilters`.

```python
import roboflow

roboflow.login()

rf = roboflow.Roboflow()
ws = rf.workspace()

schema = ws.get_vision_event_metadata_schema("a1b3c8e1")

for field, info in schema["fields"].items():
    print(f"{field}: {info['types']}")
```

The response contains a `fields` dict mapping each discovered field name to its observed types (e.g., `["string"]`, `["number"]`). You can use this information to construct typed filters when [querying events](/developer/python-sdk/vision-events/query-vision-events.md):

```python
page = ws.query_vision_events(
    "a1b3c8e1",
    customMetadataFilters=[
        {"field": "temperature", "operator": "gt", "value": 70, "type": "number"}
    ],
)
```

For more details, see the [REST API reference](/developer/rest-api/vision-events/get-custom-metadata-schema.md).


---

# 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://docs.roboflow.com/developer/python-sdk/vision-events/get-custom-metadata-schema.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.
