{
  "openapi": "3.0.1",
  "info": {
    "title": "Transmission Line & Substation Distance API by Coordinates",
    "description": "For each lat/lon site: distance to the nearest transmission line (kV, owner, overhead/underground), nearest substation, nearest power plant, the serving utility and its ISO/RTO, plus generation and battery-storage MW nearby. Includes sub-100 kV. Data-center, renewable, BESS and EV siting.",
    "version": "1.2",
    "x-build-id": "DodHsox1cLeoIYK4U"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~hifld-grid-proximity-screener/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-hifld-grid-proximity-screener",
        "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/malonestar~hifld-grid-proximity-screener/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-hifld-grid-proximity-screener",
        "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/malonestar~hifld-grid-proximity-screener/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-hifld-grid-proximity-screener",
        "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": [
          "assets"
        ],
        "properties": {
          "assets": {
            "title": "Assets (sites to screen)",
            "type": "array",
            "description": "Sites to screen for grid access. Each entry is an object { \"lat\": number, \"lon\": number, \"label\": \"optional name\" }. Also accepts \"lat,lon\" strings or [lat, lon] arrays. One dataset row (one billed result) is produced per asset; a bad entry yields an ERROR row and the run continues."
          },
          "radiusMiles": {
            "title": "Search radius (miles)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Radius around each asset to search for transmission lines, substations and power plants, in miles (1-50). Features beyond this distance are ignored. Default 5.",
            "default": 5
          },
          "minVoltageKv": {
            "title": "Minimum line voltage (kV)",
            "minimum": 1,
            "maximum": 1200,
            "type": "integer",
            "description": "Optional. Only count/consider transmission lines at or above this many kV. Since v1.2 the underlying layer includes sub-100 kV sub-transmission (69/46/34.5 kV), so values below 100 are now meaningful — leave empty to include every line, or set 115/230 to screen for high-voltage access only. Lines with an unknown voltage are excluded when this is set. Does not filter substations or power plants."
          },
          "includeSubstations": {
            "title": "Screen electric substations",
            "type": "boolean",
            "description": "Also report the nearest electric substation (name, distance, max/min voltage, connected line count) plus substations within the radius. On by default — set to false to skip substation screening and speed up large batches.",
            "default": true
          },
          "includePowerPlants": {
            "title": "Screen power plants and storage",
            "type": "boolean",
            "description": "Also report the nearest power plant (name, distance, fuel, technology, capacity MW, EIA plant code) plus total generation, battery-storage, solar and wind MW within the radius. Sourced from EIA's monthly plant inventory. On by default — set to false to skip and speed up large batches.",
            "default": true
          },
          "includeUtility": {
            "title": "Resolve serving utility and ISO/RTO",
            "type": "boolean",
            "description": "Also resolve which retail electric utility serves each site, its ownership type, holding company, customer count and summer peak, plus the balancing authority and ISO/RTO (PJM, ERCOT, CAISO, MISO, SPP, ISO-NE, NYISO). Where service territories overlap, the largest utility by summer peak load is reported as primary. On by default — one extra lookup per site.",
            "default": true
          },
          "includePlanned": {
            "title": "Flag non-authoritative planned lines (advanced)",
            "type": "boolean",
            "description": "Advanced/opt-in. Also check a 'planned transmission line' scratch layer that carries NO owner/voltage/status metadata. It is NOT an authoritative planned-line dataset — the planned_line_nearby flag is a low-confidence 'a planned-line geometry exists nearby' hint only. Default false.",
            "default": false
          },
          "skipErrorRows": {
            "title": "Skip ERROR rows (do not emit or bill them)",
            "type": "boolean",
            "description": "When true, assets that could not be screened are logged but not written to the dataset, so you are not billed for them. Default false, which keeps every asset accounted for as an ERROR row. Note that a run in which EVERY asset fails always fails outright and bills nothing, regardless of this setting.",
            "default": false
          },
          "eiaApiKey": {
            "title": "EIA API key (optional)",
            "type": "string",
            "description": "Optional. A free EIA API key (https://www.eia.gov/opendata/register.php) enables the state industrial and commercial electricity price columns. Everything else works without it — leave this empty and those two columns are simply null. One lookup per distinct state, not per site."
          },
          "maxResults": {
            "title": "Max assets to screen",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of assets processed in one run (1-2000). One result row is emitted (and billed) per asset. Default 500.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}