{
  "openapi": "3.0.1",
  "info": {
    "title": "WFS Feature Extractor",
    "description": "Point at ANY classic OGC WFS 2.0/1.1 service (GeoServer, MapServer, deegree, QGIS-Server) behind national & city SDIs. Reads GetCapabilities, pages GetFeature by bbox/CQL, returns flat feature rows (geometry, lon/lat, computed bbox, properties, SRS) from GeoJSON OR GML. Pay per feature.",
    "version": "0.1",
    "x-build-id": "ib9Uz8TPXELarztVk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~wfs-feature-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-wfs-feature-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~wfs-feature-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-wfs-feature-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~wfs-feature-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-wfs-feature-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": [
          "wfsUrl"
        ],
        "properties": {
          "wfsUrl": {
            "title": "WFS service URL",
            "type": "string",
            "description": "The base URL of ANY classic OGC WFS service (the older, XML GetCapabilities → GetFeature protocol — distinct from the modern JSON 'OGC API - Features'). This is the endpoint the service answers SERVICE=WFS&REQUEST=GetCapabilities on. Examples: https://demo.mapserver.org/cgi-bin/wfs (MapServer) or https://service.pdok.nl/lv/bag/wfs/v2_0 (PDOK / GeoServer). Any pre-existing query (e.g. ?map=...) is preserved."
          },
          "typeNames": {
            "title": "Feature type name(s)",
            "type": "array",
            "description": "Feature type(s) to pull, e.g. ms:cities, bag:pand, or a bare local name like cities. Accepts one or more. Leave EMPTY to run in discovery mode (list every feature type the service advertises). Turn on \"List feature types only\" below to just browse the catalog first.",
            "items": {
              "type": "string"
            }
          },
          "listTypesOnly": {
            "title": "List feature types only (discovery)",
            "type": "boolean",
            "description": "When on, the actor only reads GetCapabilities and returns one row per advertised feature type (name, title, abstract, default CRS, supported output formats) — it does NOT fetch any features. Use this to discover what a service exposes, then set Feature type name(s) + a bbox/CQL filter to extract features.",
            "default": false
          },
          "wfsVersion": {
            "title": "WFS version",
            "enum": [
              "2.0.0",
              "1.1.0",
              "1.0.0"
            ],
            "type": "string",
            "description": "Preferred WFS protocol version. The actor negotiates automatically — if the service doesn't speak the preferred version it falls back through 2.0.0 → 1.1.0 → 1.0.0 — and the version reported on every row is the one the server actually served.",
            "default": "2.0.0"
          },
          "bbox": {
            "title": "Bounding box (BBOX)",
            "type": "string",
            "description": "Optional spatial filter passed as the WFS BBOX parameter, as a comma string. WFS 2.0.0 form: minX,minY,maxX,maxY,CRS (e.g. -60,-40,-50,-30,urn:ogc:def:crs:EPSG::4326). Axis order and CRS follow the target service — check GetCapabilities. Leave empty for no spatial filter."
          },
          "cqlFilter": {
            "title": "CQL filter",
            "type": "string",
            "description": "Optional CQL_FILTER expression (GeoServer / MapServer support this vendor extension), e.g. POPULATION > 1000000 or NAME = 'Manila'. Mutually exclusive with an XML Filter below — if both are set, CQL is sent. Leave empty for no attribute filter."
          },
          "filter": {
            "title": "OGC XML filter",
            "type": "string",
            "description": "Optional raw OGC Filter Encoding XML passed as the FILTER parameter (the standards-based alternative to CQL, supported by all classic WFS servers). Advanced — leave empty unless you have a specific <fes:Filter>…</fes:Filter> to send."
          },
          "outputFormat": {
            "title": "Output format override",
            "type": "string",
            "description": "Optional OUTPUTFORMAT override. By default the actor auto-negotiates: it prefers a GeoJSON format the type advertises, and falls back to the server-default GML (which it fully parses to the same row shape). Only set this to force a specific token, e.g. application/json; subtype=geojson or text/xml; subtype=gml/3.1.1. Leave empty for auto."
          },
          "srsName": {
            "title": "Output SRS (srsName)",
            "type": "string",
            "description": "Optional SRSNAME to request features reprojected to a specific CRS, e.g. urn:ogc:def:crs:EPSG::4326 or EPSG:3857 (only honored if the type advertises that CRS). Leave empty to use the service's default CRS."
          },
          "maxFeatures": {
            "title": "Max features (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum total number of features to pull across all pages and feature types (the actor auto-paginates via STARTINDEX on 2.0.0 until this cap or the result set is exhausted). Each returned feature is one billable event. Default 1000.",
            "default": 1000
          },
          "pageSize": {
            "title": "Page size",
            "minimum": 1,
            "type": "integer",
            "description": "Server-side page size requested per GetFeature call (COUNT on 2.0.0 / MAXFEATURES on 1.1.0). The actor auto-follows pages regardless. Most servers cap this around 1000–10000. Leave at the default unless you have a reason to change it.",
            "default": 100
          },
          "extraParams": {
            "title": "Extra query parameters",
            "type": "object",
            "description": "Arbitrary extra query-string parameters appended to each GetFeature request, as a JSON object — the generic passthrough for vendor-specific keys (e.g. {\"propertyName\": \"NAME,POPULATION\"} or a MapServer {\"map\": \"/path/to.map\"}). The reserved WFS control keys (service/version/request/typenames/count/startindex/outputformat/srsname/bbox/cql_filter/filter) are managed by the actor and ignored here. Leave empty for none."
          },
          "bearerToken": {
            "title": "Bearer token (optional)",
            "type": "string",
            "description": "Optional OAuth2 bearer token for auth-gated WFS deployments. Sent as Authorization: Bearer ***. NOT required for public services (MapServer, PDOK demos) — leave empty. Never logged."
          },
          "extraHeaders": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Optional extra HTTP headers to send with every request, as a JSON object, e.g. {\"x-api-key\": \"...\"} for a service that takes an API key in a header. Leave empty for public services."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}