> For the complete documentation index, see [llms.txt](https://docs.gridstatus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gridstatus.io/developers/api-reference/dataset-metadata.md).

# Dataset Metadata

## List Datasets

> List all published datasets a user has access to\
> \
> See list of available datasets here: <https://www.gridstatus.io/datasets>

```json
{"openapi":"3.1.0","info":{"title":"Grid Status API","version":"1.3.0"},"servers":[{"url":"https://api.gridstatus.io/v1"}],"paths":{"/datasets":{"get":{"tags":["Dataset Metadata"],"summary":"List Datasets","description":"List all published datasets a user has access to\n\nSee list of available datasets here: https://www.gridstatus.io/datasets","operationId":"list_datasets_v1_datasets_get","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication (query)","title":"Api Key"},"description":"API key for authentication (query)"},{"name":"return_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ReturnFormat","description":"The return format of the response","default":"json"},"description":"The return format of the response"},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to download the file or not","default":false,"title":"Download"},"description":"Whether to download the file or not"},{"name":"json_schema","in":"query","required":false,"schema":{"$ref":"#/components/schemas/JSONSchema","description":"The json schema of the response","default":"array-of-objects"},"description":"The json schema of the response"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication (header)","title":"X-Api-Key"},"description":"API key for authentication (header)"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDatasetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ReturnFormat":{"type":"string","enum":["json","csv"],"title":"ReturnFormat"},"JSONSchema":{"type":"string","enum":["array-of-objects","array-of-arrays"],"title":"JSONSchema"},"ListDatasetsResponse":{"properties":{"status_code":{"type":"integer","title":"Status Code"},"data":{"items":{"$ref":"#/components/schemas/DatasetResponse"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/MetadataResponse"},"dataset_metadata":{"$ref":"#/components/schemas/ListDatasetsDatasetMetadataResponse"}},"type":"object","required":["status_code","data","meta","dataset_metadata"],"title":"ListDatasetsResponse"},"DatasetResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"earliest_available_time_utc":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Earliest Available Time Utc"},"latest_available_time_utc":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Available Time Utc"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"last_checked_time_utc":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked Time Utc"},"primary_key_columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Primary Key Columns"},"publish_time_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publish Time Column"},"time_index_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time Index Column"},"subseries_index_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subseries Index Column"},"all_columns":{"anyOf":[{"items":{"$ref":"#/components/schemas/ColumnResponse"},"type":"array"},{"type":"null"}],"title":"All Columns"},"number_of_rows_approximate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Rows Approximate"},"table_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table Type"},"is_in_snowflake":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is In Snowflake"},"data_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Frequency"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"publication_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publication Frequency"},"is_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Published"},"created_at_utc":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At Utc"},"status":{"anyOf":[{"$ref":"#/components/schemas/DatasetStatusEnum"},{"type":"null"}]},"popularity_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Popularity Rank"},"is_in_clickhouse":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is In Clickhouse"}},"type":"object","required":["id","name","description","earliest_available_time_utc","latest_available_time_utc","source","last_checked_time_utc","primary_key_columns","publish_time_column","time_index_column","subseries_index_column","all_columns","number_of_rows_approximate","table_type","is_in_snowflake","data_frequency","source_url","publication_frequency","is_published","created_at_utc","status"],"title":"DatasetResponse"},"ColumnResponse":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"is_numeric":{"type":"boolean","title":"Is Numeric"},"is_date":{"type":"boolean","title":"Is Date","default":false},"is_datetime":{"type":"boolean","title":"Is Datetime"}},"type":"object","required":["name","type","is_numeric","is_datetime"],"title":"ColumnResponse"},"DatasetStatusEnum":{"type":"string","enum":["retired","active","deprecated"],"title":"DatasetStatusEnum"},"MetadataResponse":{"properties":{"page":{"type":"integer","title":"Page"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"page_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Size"},"hasNextPage":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hasnextpage"},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},"type":"object","required":["page","limit","page_size","hasNextPage","cursor"],"title":"MetadataResponse"},"ListDatasetsDatasetMetadataResponse":{"properties":{"resample_conversion":{"additionalProperties":{"type":"integer"},"type":"object","title":"Resample Conversion","default":{"1_MINUTE":60,"5_MINUTES":300,"10_MINUTES":600,"15_MINUTES":900,"1_HOUR":3600,"1_DAY":86400,"1_DAY_MARKET":86400,"1_WEEK":604800,"1_MONTH":2592000,"1_YEAR":31536000,"IRREGULAR":-1}}},"type":"object","title":"ListDatasetsDatasetMetadataResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get Dataset Metadata

> Get a dataset and its metadata

```json
{"openapi":"3.1.0","info":{"title":"Grid Status API","version":"1.3.0"},"servers":[{"url":"https://api.gridstatus.io/v1"}],"paths":{"/datasets/{dataset_id}":{"get":{"tags":["Dataset Metadata"],"summary":"Get Dataset Metadata","description":"Get a dataset and its metadata","operationId":"get_dataset_metadata_v1_datasets__dataset_id__get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication (query)","title":"Api Key"},"description":"API key for authentication (query)"},{"name":"return_format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ReturnFormat","description":"The return format of the response","default":"json"},"description":"The return format of the response"},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to download the file or not","default":false,"title":"Download"},"description":"Whether to download the file or not"},{"name":"json_schema","in":"query","required":false,"schema":{"$ref":"#/components/schemas/JSONSchema","description":"The json schema of the response","default":"array-of-objects"},"description":"The json schema of the response"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"API key for authentication (header)","title":"X-Api-Key"},"description":"API key for authentication (header)"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ReturnFormat":{"type":"string","enum":["json","csv"],"title":"ReturnFormat"},"JSONSchema":{"type":"string","enum":["array-of-objects","array-of-arrays"],"title":"JSONSchema"},"DatasetResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"earliest_available_time_utc":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Earliest Available Time Utc"},"latest_available_time_utc":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Available Time Utc"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"last_checked_time_utc":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked Time Utc"},"primary_key_columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Primary Key Columns"},"publish_time_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publish Time Column"},"time_index_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time Index Column"},"subseries_index_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subseries Index Column"},"all_columns":{"anyOf":[{"items":{"$ref":"#/components/schemas/ColumnResponse"},"type":"array"},{"type":"null"}],"title":"All Columns"},"number_of_rows_approximate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Rows Approximate"},"table_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table Type"},"is_in_snowflake":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is In Snowflake"},"data_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Frequency"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"publication_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publication Frequency"},"is_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Published"},"created_at_utc":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At Utc"},"status":{"anyOf":[{"$ref":"#/components/schemas/DatasetStatusEnum"},{"type":"null"}]},"popularity_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Popularity Rank"},"is_in_clickhouse":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is In Clickhouse"}},"type":"object","required":["id","name","description","earliest_available_time_utc","latest_available_time_utc","source","last_checked_time_utc","primary_key_columns","publish_time_column","time_index_column","subseries_index_column","all_columns","number_of_rows_approximate","table_type","is_in_snowflake","data_frequency","source_url","publication_frequency","is_published","created_at_utc","status"],"title":"DatasetResponse"},"ColumnResponse":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"is_numeric":{"type":"boolean","title":"Is Numeric"},"is_date":{"type":"boolean","title":"Is Date","default":false},"is_datetime":{"type":"boolean","title":"Is Datetime"}},"type":"object","required":["name","type","is_numeric","is_datetime"],"title":"ColumnResponse"},"DatasetStatusEnum":{"type":"string","enum":["retired","active","deprecated"],"title":"DatasetStatusEnum"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.gridstatus.io/developers/api-reference/dataset-metadata.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
