{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Solar & Distributed Generation Radar (ANEEL GD)",
    "description": "Market sizing and project lists for Brazil's 4.7 million distributed-generation (mostly solar) connections from ANEEL's official open data. Aggregate by state, city, utility, source, class, month or size, or list company-owned (PJ) projects with CNPJ. Individuals' names and CPF are never output.",
    "version": "0.1",
    "x-build-id": "NcDs5Jjxwhk2RTy7L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kman-br~aneel-geracao-distribuida-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kman-br-aneel-geracao-distribuida-radar",
        "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/kman-br~aneel-geracao-distribuida-radar/runs": {
      "post": {
        "operationId": "runs-sync-kman-br-aneel-geracao-distribuida-radar",
        "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/kman-br~aneel-geracao-distribuida-radar/run-sync": {
      "post": {
        "operationId": "run-sync-kman-br-aneel-geracao-distribuida-radar",
        "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",
        "properties": {
          "modo": {
            "title": "Modo",
            "enum": [
              "agregado",
              "empreendimentos"
            ],
            "type": "string",
            "description": "Agregado soma quantidade e kW por dimensão. Empreendimentos lista projetos (PF sem nome e sem CPF).",
            "default": "agregado"
          },
          "agruparPor": {
            "title": "Agrupar por",
            "type": "array",
            "description": "Só no modo agregado.",
            "items": {
              "type": "string",
              "enum": [
                "uf",
                "municipio",
                "distribuidora",
                "fonte",
                "classe",
                "mes",
                "ano",
                "porte",
                "modalidade",
                "tipo_consumidor"
              ]
            },
            "default": [
              "uf",
              "municipio",
              "fonte"
            ]
          },
          "ufs": {
            "title": "UFs",
            "type": "array",
            "description": "Ex.: SP, MG. Vazio = Brasil todo.",
            "items": {
              "type": "string"
            }
          },
          "municipiosIbge": {
            "title": "Municípios (código IBGE)",
            "type": "array",
            "description": "Código de 7 dígitos, ex.: 3550308.",
            "items": {
              "type": "string"
            }
          },
          "municipios": {
            "title": "Municípios (nome)",
            "type": "array",
            "description": "Nome exato, sem diferenciar acento.",
            "items": {
              "type": "string"
            }
          },
          "distribuidoras": {
            "title": "Distribuidoras",
            "type": "array",
            "description": "Sigla (CEMIG-D) ou parte do nome (cpfl).",
            "items": {
              "type": "string"
            }
          },
          "tiposGeracao": {
            "title": "Tipo de geração",
            "type": "array",
            "description": "Vazio = todos.",
            "items": {
              "type": "string",
              "enum": [
                "UFV",
                "EOL",
                "UTE",
                "CGH"
              ],
              "enumTitles": [
                "Solar (UFV)",
                "Eólica (EOL)",
                "Térmica (UTE)",
                "Hídrica (CGH)"
              ]
            }
          },
          "classesConsumo": {
            "title": "Classes de consumo",
            "type": "array",
            "description": "Residencial, Comercial, Rural, Industrial, Poder Público…",
            "items": {
              "type": "string"
            }
          },
          "tipoConsumidor": {
            "title": "Tipo de titular",
            "enum": [
              "todos",
              "PF",
              "PJ"
            ],
            "type": "string",
            "description": "PJ traz CNPJ e razão social.",
            "default": "todos"
          },
          "conectadoDesde": {
            "title": "Conectado desde",
            "type": "string",
            "description": "AAAA-MM-DD (data de atualização cadastral do empreendimento)."
          },
          "conectadoAte": {
            "title": "Conectado até",
            "type": "string",
            "description": "AAAA-MM-DD."
          },
          "potenciaMinimaKw": {
            "title": "Potência mínima (kW)",
            "minimum": 0,
            "type": "integer",
            "description": "Ex.: 75 para minigeração."
          },
          "potenciaMaximaKw": {
            "title": "Potência máxima (kW)",
            "minimum": 0,
            "type": "integer",
            "description": "Opcional."
          },
          "ordenarPor": {
            "title": "Ordenar por",
            "enum": [
              "potencia",
              "quantidade",
              "recente"
            ],
            "type": "string",
            "description": "Ordem das linhas entregues.",
            "default": "potencia"
          },
          "maxItems": {
            "title": "Máximo de linhas",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Linhas cobradas no dataset.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}