{
  "openapi": "3.0.1",
  "info": {
    "title": "GeoJSON Converter for CSV, KML and GPX",
    "description": "Convert CSV lat/lon, KML and GPX to GeoJSON, or GeoJSON to CSV, with validation, bbox and centroids. Use when you need map data in another format or checked.",
    "version": "0.0",
    "x-build-id": "9Bbt70be8FnuETINT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plainpipe~geojson-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plainpipe-geojson-converter",
        "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/plainpipe~geojson-converter/runs": {
      "post": {
        "operationId": "runs-sync-plainpipe-geojson-converter",
        "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/plainpipe~geojson-converter/run-sync": {
      "post": {
        "operationId": "run-sync-plainpipe-geojson-converter",
        "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": {
          "inputText": {
            "title": "Input text",
            "type": "string",
            "description": "Paste geo data here: CSV with latitude and longitude columns (e.g. name,lat,lon then Paris,48.8566,2.3522), GeoJSON (FeatureCollection, Feature or geometry), KML or GPX. The format is detected from the content."
          },
          "inputUrls": {
            "title": "Input URLs",
            "type": "array",
            "description": "Direct links to CSV, GeoJSON, KML or GPX files, one per line, e.g. https://raw.githubusercontent.com/<owner>/<repo>/main/places.geojson. Use the raw file link, not a web page that shows the file. Each link is read and converted separately.",
            "items": {
              "type": "string"
            }
          },
          "inputFile": {
            "title": "Upload a file (optional)",
            "type": "string",
            "description": "Or upload one CSV, GeoJSON, KML or GPX file here, in addition to the text and links. Example: a track.gpx from a GPS device."
          },
          "inputFormat": {
            "title": "Input format",
            "enum": [
              "auto",
              "csv",
              "geojson",
              "kml",
              "gpx"
            ],
            "type": "string",
            "description": "Leave on auto-detect (default), or force one format for every source, e.g. csv for a .txt file with lat/lon columns.",
            "default": "auto"
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "features",
              "file"
            ],
            "type": "string",
            "description": "Features: one dataset row per output feature (export the dataset as CSV for one line per feature with longitude/latitude). File: one dataset row per input file with counts, bbox and validation, and the full FeatureCollection (.geojson) plus a centroid CSV saved in the key-value store.",
            "default": "features"
          },
          "latColumn": {
            "title": "CSV latitude column",
            "type": "string",
            "description": "Name of the latitude column in CSV input, e.g. Breite or y_coord. Leave empty (default) to detect lat, latitude or y."
          },
          "lonColumn": {
            "title": "CSV longitude column",
            "type": "string",
            "description": "Name of the longitude column in CSV input, e.g. Länge or x_coord. Leave empty (default) to detect lon, lng, long, longitude or x."
          },
          "keepRowsWithoutCoordinates": {
            "title": "Keep CSV rows without coordinates",
            "type": "boolean",
            "description": "Off (default): CSV rows whose latitude or longitude is empty or not a number are skipped. On: keep them as features with null geometry, e.g. to see which addresses still need coordinates.",
            "default": false
          },
          "includeGeometry": {
            "title": "Include geometry",
            "type": "boolean",
            "description": "On (default): in features mode, add the full GeoJSON geometry to each row. Turn off for compact rows with only centroid and bbox, e.g. for a CSV export.",
            "default": true
          },
          "coordinatePrecision": {
            "title": "Decimal places",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "Decimal places for computed longitude, latitude and bbox values (default 6, about 10 cm; e.g. 3 for about 100 m). Geometry coordinates are kept as given.",
            "default": 6
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many results: features in features mode, files in file mode (default 100, e.g. 5000). You are charged per result.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}