---
title: "List Contingencies"
method: GET
path: "/constraints/contingencies"
tags: ["Constraints"]
---

# List Contingencies

`GET /constraints/contingencies`

Get a list of contingencies with optional filtering by ISOs and a search term.

Returns all rows and columns from the contingencies table where market_id
matches an item in the comma-separated isos list and contingency_name
contains the search term. When sort_order is not specified and there is a
search term, results are sorted by relevance (shorter contingency_names
first). When sort_order is not specified and there is no search term,
results are sorted by latest_seen_utc descending (most recently seen first),
then market_id ascending, then contingency_name ascending for consistent
ordering.

Args:
    params: Query parameters (isos, search, active_after, limit,
        sort_column, sort_order)

## Query parameters

- `api_key` string, nullable — API key for authentication (query)
- `isos` string, nullable — Comma-separated list of market IDs to filter by
- `active_after` string, date-time, nullable — Filter latest_seen_utc to be on or after this timestamp
- `limit` integer, nullable — Maximum number of results to return (default: 10000)
- `sort_order` 'asc' | 'desc'
- `search` string, nullable — Optional search term to filter by contingency_name
- `sort_column` 'contingency_name' | 'market_id' | 'earliest_seen_utc' | 'latest_seen_utc', nullable — Column to sort by. Must be one of: contingency_name, market_id, earliest_seen_utc, latest_seen_utc

## Headers

- `x-api-key` string, nullable — API key for authentication (header)

## Response `200`

Successful Response

- ContingencyListResponse[]
  - `gs_entity_id` string, required
  - `contingency_name` string, required
  - `market_id` string, nullable, required
  - `earliest_seen_utc` string, date-time, nullable, required
  - `latest_seen_utc` string, date-time, nullable, required
  - `available_datasets` string[], nullable, required
  - `gs_created_at_utc` string, date-time, required
  - `gs_updated_at_utc` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/gridstatus/apis/grid-status-api.md) · [All operations](https://skmtc.net/gridstatus/apis/grid-status-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gridstatus/grid-status-api/versions/fa1f094be2d4/schema)
