{
  "openapi": "3.0.1",
  "info": {
    "title": "Cosmos-SDK Validator & LCD Extractor",
    "description": "Export validator data from a Cosmos-SDK chain's public LCD (REST) endpoint you choose: moniker, status, jailed, tokens, commission. The ready-to-run sample lists 20 bonded Cosmos Hub validators. Also reads governance proposals, supply, balances, delegations and inflation. Amounts stay raw strings.",
    "version": "0.1",
    "x-build-id": "KhrNXUVmaLlFjVWYy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~cosmos-lcd-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-cosmos-lcd-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/datamule~cosmos-lcd-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-cosmos-lcd-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/datamule~cosmos-lcd-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-cosmos-lcd-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "restUrl"
        ],
        "properties": {
          "restUrl": {
            "title": "Chain LCD (REST) base URL",
            "type": "string",
            "description": "Base URL of ANY Cosmos-SDK chain's public LCD / REST (gRPC-gateway) endpoint. The module path is appended automatically. Examples: https://cosmos-rest.publicnode.com (Cosmos Hub) · https://rest.cosmos.directory/cosmoshub (the chain-registry proxy — swap the last segment for osmosis, juno, celestia, injective, …) · https://cosmos-api.polkachu.com. Every Cosmos-SDK chain exposes the same /cosmos/<module>/… REST, so one actor reads the whole ecosystem."
          },
          "module": {
            "title": "Module",
            "enum": [
              "validators",
              "proposals",
              "supply",
              "balances",
              "delegations",
              "inflation"
            ],
            "type": "string",
            "description": "Which Cosmos-SDK module to read. validators = the staking validator set; proposals = governance proposals (auto-falls back from gov v1 to v1beta1 on older chains); supply = total token supply per denom; balances = an account's balances (requires address); delegations = an account's delegations (requires address); inflation = the chain's current annual inflation rate (single value).",
            "default": "validators"
          },
          "address": {
            "title": "Account address (bech32)",
            "type": "string",
            "description": "Required for the 'balances' and 'delegations' modules: a bech32 account address for the target chain (e.g. cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh on Cosmos Hub, osmo1… on Osmosis). Ignored by the other modules."
          },
          "status": {
            "title": "Validator bond status filter (optional)",
            "enum": [
              "",
              "BOND_STATUS_BONDED",
              "BOND_STATUS_UNBONDING",
              "BOND_STATUS_UNBONDED"
            ],
            "type": "string",
            "description": "Only for the 'validators' module: restrict to one bond status. Choose 'Bonded' for the active set that signs blocks. 'Any status' (the default) also returns unbonded and jailed validators, and on Cosmos Hub those come first in the list. Rows come in the node's order (by operator address), not ranked by stake.",
            "default": ""
          },
          "maxRecords": {
            "title": "Max records",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after emitting this many rows. Pagination through pagination.next_key halts early once reached. Each emitted record (one validator / proposal / supply denom / balance / delegation) is billed as one record.",
            "default": 2000
          },
          "pageLimit": {
            "title": "Page size",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many items to request per page via pagination.limit. Cosmos LCD nodes typically cap this around 100; larger values may be silently reduced by the server.",
            "default": 100
          },
          "userAgent": {
            "title": "User-Agent (optional)",
            "type": "string",
            "description": "Override the default descriptive User-Agent header. Public LCD nodes are shared community infrastructure — please keep a descriptive agent and reasonable request rates."
          },
          "timeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "type": "integer",
            "description": "Per-request timeout in seconds for each LCD page fetch.",
            "default": 60
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}