# Explore your data schema with Flux

This page documents an earlier version of InfluxDB. InfluxDB v2.3 is the latest stable version. View this page in the v2.3 documentation.

Flux provides functions that let you explore the structure and schema of your data stored in InfluxDB.

## List buckets

Use the `buckets()` function to list buckets in your organization.

``````buckets()
``````

## List measurements

Use the `schema.measurements()` function to list measurements in a bucket.

``````import "influxdata/influxdb/schema"

schema.measurements(bucket: "example-bucket")
``````

## List field keys

Use the `schema.fieldKeys` function to list field keys in a bucket.

``````import "influxdata/influxdb/schema"

schema.fieldKeys(bucket: "example-bucket")
``````

### List fields in a measurement

Use the `schema.measurementFieldKeys` function to list field keys in a measurement.

``````import "influxdata/influxdb/schema"

schema.measurementFieldKeys(
bucket: "example-bucket",
measurement: "example-measurement",
)
``````

## List tag keys

Use the `schema.tagKeys()` function to list tag keys in a bucket.

``````import "influxdata/influxdb/schema"

schema.tagKeys(bucket: "example-bucket")
``````

### List tag keys in a measurement

Use the `schema.measurementTagKeys` function to list tag keys in a measurement. This function returns results from the last 30 days.

``````import "influxdata/influxdb/schema"

schema.measurementTagKeys(
bucket: "example-bucket",
measurement: "example-measurement",
)
``````

## List tag values

Use the `schema.tagValues()` function to list tag values for a given tag in a bucket.

``````import "influxdata/influxdb/schema"

schema.tagValues(bucket: "example-bucket", tag: "example-tag")
``````

### List tag values in a measurement

Use the `schema.measurementTagValues` function to list tag values for a given tag in a measurement. This function returns results from the last 30 days.

``````import "influxdata/influxdb/schema"

schema.measurementTagValues(
bucket: "example-bucket",
tag: "example-tag",
measurement: "example-measurement",
)
``````
{"ft_lang_label":"__label__en","ft_lang_prob":0.51152986,"math_prob":0.41514462,"size":2248,"snap":"2022-40-2023-06","text_gpt3_token_len":519,"char_repetition_ratio":0.20499109,"word_repetition_ratio":0.21863799,"special_character_ratio":0.19350533,"punctuation_ratio":0.14882506,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9694535,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-09-30T13:09:36Z\",\"WARC-Record-ID\":\"<urn:uuid:169ee5c0-6326-445b-9ce4-2bc151298ee1>\",\"Content-Length\":\"118649\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c5a20f1b-e7ed-44b5-b94a-a8f9e28118ff>\",\"WARC-Concurrent-To\":\"<urn:uuid:2577c47a-b181-46a9-957f-f16ec96010be>\",\"WARC-IP-Address\":\"18.154.227.87\",\"WARC-Target-URI\":\"https://test2.docs.influxdata.com/influxdb/v2.1/query-data/flux/explore-schema/\",\"WARC-Payload-Digest\":\"sha1:ZYCZFPP5YE7HBXVZDPP6UQEBDK3ZNJZO\",\"WARC-Block-Digest\":\"sha1:6G3E6ZGQKR7SCQWWO3UA2MAMBBDBQ7SI\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030335469.40_warc_CC-MAIN-20220930113830-20220930143830-00402.warc.gz\"}"}