{
  "openapi": "3.0.1",
  "info": {
    "title": "US Public Lands Near a Point: PAD-US Protected Areas",
    "description": "Public and protected land units of the United States as rows: unit name, designation, managing agency, owner type, state, public-access status, GAP status, IUCN category and acreage. Search by coordinates and radius, by map bounding box, or by state, agency and designation.",
    "version": "0.1",
    "x-build-id": "FkeTxpvdXySXZVrvW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~padus-public-lands/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-padus-public-lands",
        "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/yadroo~padus-public-lands/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-padus-public-lands",
        "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/yadroo~padus-public-lands/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-padus-public-lands",
        "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": {
          "mode": {
            "title": "How to look up land",
            "enum": [
              "nearby",
              "boundingBox",
              "search"
            ],
            "type": "string",
            "description": "Three different questions. `nearby` answers \"what public land is around this spot\" from a latitude, a longitude and a radius. `boundingBox` answers the same for a rectangle of the map, which is what a map view or a tile job needs. `search` ignores geography and selects by state, managing agency, designation or unit name. Filters further down are applied in every mode.",
            "default": "nearby"
          },
          "latitude": {
            "title": "Latitude (nearby mode)",
            "type": "string",
            "description": "Decimal degrees as text, north positive (38.5733 is Moab, Utah). Text, because the platform's number fields take whole numbers only and a quarter of a degree is 17 miles. Used only in `nearby` mode, together with the longitude and the radius below. Values outside -90 to 90 stop the run with a clear message instead of returning an empty dataset."
          },
          "longitude": {
            "title": "Longitude (nearby mode)",
            "type": "string",
            "description": "Decimal degrees as text, east positive, so the United States is negative (-109.5498 is Moab, Utah). Used only in `nearby` mode. Values outside -180 to 180 stop the run with a clear message."
          },
          "radiusMiles": {
            "title": "Radius in miles",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How far around the point to look, in statute miles. Every land unit whose boundary touches the circle is returned, so a large unit counts even when the point itself is outside it. A wide radius in a public-land state can match hundreds of units - the row cap decides how many are written.",
            "default": 10
          },
          "boundingBox": {
            "title": "Bounding box (map-area mode)",
            "type": "string",
            "description": "Four decimal degrees separated by commas, in the order west, south, east, north: `minLongitude,minLatitude,maxLongitude,maxLatitude`. The example is the Yellowstone area. Used only in `boundingBox` mode. Spaces are ignored; a box with west above east, or an area larger than 10 degrees on a side, is refused with a message rather than silently clipped."
          },
          "states": {
            "title": "States",
            "maxItems": 10,
            "type": "array",
            "description": "Keep only units in these states, one per line. Either the two-letter code or the full name is accepted (`UT`, `Utah`, `new mexico`), case and spaces ignored; a name that matches nothing stops the run naming the closest states. PAD-US stores the code, and a unit crossing a border carries several codes, so such a unit is returned for each of its states.",
            "items": {
              "type": "string"
            }
          },
          "managerNames": {
            "title": "Managing agencies",
            "maxItems": 10,
            "type": "array",
            "description": "Keep only units managed by these agencies, one per line. PAD-US codes and their plain names both work: `BLM` or `Bureau of Land Management`, `NPS`, `USFS` or `Forest Service`, `FWS`, `DOD`, `STAT` for a state agency, `TRIB`, `NGO`, `PVT`. Case and spaces are ignored and an unknown value is refused with the closest matches; the README lists every code the database uses.",
            "items": {
              "type": "string"
            }
          },
          "managerTypes": {
            "title": "Manager types",
            "maxItems": 8,
            "type": "array",
            "description": "Coarser than the agency filter: who the manager is, not which office. Codes or names, one per line: `FED` or `federal`, `STAT` or `state`, `LOC` for city and county land, `DIST` for special districts, `TRIB`, `NGO`, `PVT`, `JNT` for joint management, `UNK`. Case and spaces are ignored, unknown values are refused with the closest matches.",
            "items": {
              "type": "string"
            }
          },
          "designationTypes": {
            "title": "Designation types",
            "maxItems": 10,
            "type": "array",
            "description": "Keep only units with these designations, one per line. The PAD-US code or its name both work: `NP` or `National Park`, `WA` or `Wilderness Area`, `NWR` or `National Wildlife Refuge`, `NF` or `National Forest`, `SP` or `State Park`, `ACEC`, `NM`. The service publishes the full list of about 60 designations and the actor reads it at the start of the run, so any current value is accepted; an unknown one is refused with the closest matches instead of a wider result.",
            "items": {
              "type": "string"
            }
          },
          "unitNameContains": {
            "title": "Unit name contains",
            "type": "string",
            "description": "Keep only units whose name contains this text, compared without case (`canyon`, `wildlife management area`, `yosemite`). Passed to the service as a wildcard match on the unit name, so partial words work. Combine it with a state to find one named place quickly."
          },
          "publicAccess": {
            "title": "Public access",
            "enum": [
              "any",
              "open",
              "restricted",
              "closed",
              "unknown"
            ],
            "type": "string",
            "description": "The access status the land steward reported to PAD-US. `open` is the filter for trip planning and hunting access; `unknown` is common on private and NGO easements, so excluding it also drops land that may well be open. Every row keeps its raw code (`OA`, `RA`, `XA`, `UK`) in `publicAccess` and the plain wording in `publicAccessName`.",
            "default": "any"
          },
          "protectionCategory": {
            "title": "Protection mechanism",
            "enum": [
              "any",
              "fee",
              "easement",
              "designation",
              "marine",
              "proclamation"
            ],
            "type": "string",
            "description": "PAD-US records the same ground more than once: a national forest is a fee unit, a wilderness inside it is a designation, and a proclamation boundary may wrap both. `fee` answers \"who owns this ground\" with one row per owner, which is what most land and parcel questions need. Proclamation boundaries include private inholdings and are left out of other categories for that reason.",
            "default": "any"
          },
          "gapStatusCodes": {
            "title": "GAP status codes",
            "maxItems": 4,
            "type": "array",
            "description": "Biodiversity protection level, as scored by the USGS Gap Analysis Project: 1 and 2 are managed for biodiversity (1 lets natural disturbance run, 2 does not), 3 is multiple use where extraction is allowed somewhere in the unit, 4 has no conservation mandate. Pick one or more to keep only those levels. The platform refuses any other value before the run starts.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4"
              ],
              "enumTitles": [
                "1 - managed for biodiversity, natural disturbance allowed",
                "2 - managed for biodiversity, disturbance suppressed",
                "3 - multiple use, extraction allowed somewhere",
                "4 - no known biodiversity mandate"
              ]
            }
          },
          "minAcres": {
            "title": "Minimum acres",
            "minimum": 0,
            "type": "integer",
            "description": "Drop units smaller than this. PAD-US contains many small city parks and easements, so a threshold of 1000 is a quick way to see only land worth a trip. The acreage is computed from the mapped boundary, not from a deed, and it is rounded to whole acres, so sub-acre parcels carry 0."
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "acresDesc",
              "acresAsc",
              "unitName",
              "state"
            ],
            "type": "string",
            "description": "The order the service returns, and therefore which rows the row cap keeps. Largest first puts the national forest or BLM field office at the top and the pocket park at the bottom; name order is easier to read when you export a state list.",
            "default": "acresDesc"
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on the rows this run writes, and so on what it costs. The actor reads pages of 500 units, so the largest run (1000 rows) is two requests. The run also stops at the maximum cost per run you set on the platform and says so in its status.",
            "default": 50
          },
          "fields": {
            "title": "Only these columns",
            "type": "array",
            "description": "Keep only the named columns, in the order given - for example `unitName, managerName, acres, publicAccessName`. Empty = every column. `unitName`, `url` and `fetchedAt` are always written; name one of them here and it moves to the position you gave it. Unknown names are reported in the run status rather than silently ignored.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}