> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# filterNetworks

> Returns a list of networks based on a variety of filters. Reference for the filterNetworks query in the Codex API: arguments, response fields, and usage.

`filterNetworks` returns network-level activity stats with filtering and ranking, so you can compare chains directly instead of aggregating token or pair data yourself. Each [`NetworkFilterResult`](/api-reference/types/networkfilterresult) exposes total liquidity plus volume, volume change, and transaction counts over five rolling windows (5m, 1h, 4h, 12h, and 24h), alongside display metadata (name, short name, icon) and a `mainnet` flag.

## Use this data for

* **Network leaderboards.** Rank by `volume24` or `transactions24` to power a "top chains" view, and use the `volumeChange*` attributes to surface chains gaining momentum.
* **Network pickers with live context.** Show volume or transaction counts next to each network in a selector, using the included name and icon metadata.
* **Scoping discovery to active chains.** Feed the resulting network IDs into [`filterTokens`](/api-reference/queries/filtertokens) or [`filterPairs`](/api-reference/queries/filterpairs) to focus downstream queries on where activity actually is.

<div data-generated>
  ## GraphQL

  ```
  type Query {
    filterNetworks(
      filters: NetworkFilters
      networks: [Int!]
      excludeNetworks: [Int!]
      rankings: [NetworkRanking]
      limit: Int
      offset: Int
    ): NetworkFilterConnection
  }

  type NetworkFilterResult {
    networkId: Int!
    networkName: String
    networkShortName: String
    networkIconUrl: String
    mainnet: Boolean
    timestamp: Int
    liquidity: String
    volume5m: String
    volume1: String
    volume4: String
    volume12: String
    volume24: String
    volumeChange5m: Float
    volumeChange1: Float
    volumeChange4: Float
    volumeChange12: Float
    volumeChange24: Float
    transactions5m: Int
    transactions1: Int
    transactions4: Int
    transactions12: Int
    transactions24: Int
  }

  type NetworkFilterConnection {
    results: [NetworkFilterResult]
    count: Int
    offset: Int
  }

  input NumberFilter {
    gte: Float
    gt: Float
    lte: Float
    lt: Float
  }

  input NetworkFilters {
    mainnet: Boolean
    liquidity: NumberFilter
    volume5m: NumberFilter
    volume1: NumberFilter
    volume4: NumberFilter
    volume12: NumberFilter
    volume24: NumberFilter
    volumeChange5m: NumberFilter
    volumeChange1: NumberFilter
    volumeChange4: NumberFilter
    volumeChange12: NumberFilter
    volumeChange24: NumberFilter
    transactions5m: NumberFilter
    transactions1: NumberFilter
    transactions4: NumberFilter
    transactions12: NumberFilter
    transactions24: NumberFilter
  }

  enum NetworkRankingAttribute {
    liquidity
    volume5m
    volume1
    volume4
    volume12
    volume24
    volumeChange5m
    volumeChange1
    volumeChange4
    volumeChange12
    volumeChange24
    transactions5m
    transactions1
    transactions4
    transactions12
    transactions24
  }

  enum RankingDirection {
    ASC
    DESC
  }

  input NetworkRanking {
    attribute: NetworkRankingAttribute
    direction: RankingDirection
  }
  ```
</div>

### Example

<a href="/explore" target="_blank" rel="noopener noreferrer">Test this query in the Explorer →</a>

```graphql theme={null}
{
  filterNetworks(
    filters: {mainnet: true, volume24: {gt: 1000000}}
    rankings: [{attribute: volume24, direction: DESC}]
    limit: 10
  ) {
    results {
      networkId
      networkName
      networkShortName
      networkIconUrl
      mainnet
      liquidity
      volume24
      volumeChange24
      transactions24
      timestamp
    }
    count
  }
}
```

### Usage Guidelines

* Use `networks` / `excludeNetworks` to scope the result set by ID before filters are applied.
* `timestamp` is when the network's stats were last updated; use it to gauge freshness.
* See the full list of supported networks on [Networks](/networks).
* Response limit: 200 networks per request.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.