GeoCzech API
Requests & tasks
How to send data to a tool, wait for the result or check it later, and download the outputs.
Endpoints
The whole API has three endpoints you need to know:
| Method & path | What it does |
|---|---|
POST /v2/tool/{tool} |
Starts a task. {tool} is converter, geodata or coordinates. |
GET /v2/status/{task_id} |
Returns the current state and the results of a task. |
DELETE /v2/task/{task_id} |
Deletes the inputs and outputs of a finished task right away — see Deleting your data. |
Requests to /v2/tool/… must be sent as multipart/form-data (a web form, like
curl -F). JSON bodies are not accepted — JSON goes inside the form, in the
params field.
MapServer is different: it is a map service called with plain
GET URLs.
Form fields
These fields work the same for every tool. Tool-specific settings go into params
— see the page of each tool.
Request fields
-
paramsJSON string default{} -
Tool settings, for example
{"method": "analyze"}or{"output": {"format": "geojson"}}. Simple settings can also be sent as separate form fields (-F method=search -F q=UTM) — the API merges them intoparamsand convertstrue/falseand numbers automatically. -
filesfile -
A file uploaded from your computer. Repeat the field to send more files. Uploads are limited to about 6 MB per request — for bigger files use
file_urls. -
file_urlsstring (URL) -
A public
http(s)link the API downloads the input from (no login, no cookies). Repeat the field for more files. Works with any size and is faster for big files. Links to cloud drives must be direct download links. -
waitboolean defaultfalse -
true= answer only when the task is finished (or afterwait_timeout).false= answer immediately with atask_id. -
wait_timeoutinteger (seconds) default60 -
How long to wait with
wait=true. Keep it at most 100 s; if the task is not finished by then you get"status": "PENDING"and continue with status checks. -
callback_urlstring (URL) -
A webhook: when the task finishes, the API sends its final status to this URL with an HTTP
POST. -
response_typestring -
jsonputs the main JSON result directly into the response asjson_data(needed for the Coordinates tool). The Converter and Geodata reports are always included.Allowed values:
json
Advanced parameters (3)
-
retention_daysinteger (days) default7 -
How long inputs and outputs are kept, 1–365 days (rounded up to 1, 3, 7, 14 or 28). After that the files are deleted. To delete them sooner, use
DELETE /v2/task/{task_id}. -
estimated_complexitystring defaultsmall -
heavyruns the task on a bigger worker with more memory and no 15-minute time limit. Use it for large datasets (hundreds of MB and more). Pricing is the same.Allowed values:
small·heavy -
api_keystring -
Your API key, if you cannot send the
X-API-Keyheader — see Authentication.
Giving the API your data
Upload (files) is the simplest way for small files on your computer.
Link (file_urls) is better for bigger files, for data that already lives on a
web server or cloud storage, and when you process many files — nothing has to go
through your connection twice.
- Archives (ZIP, 7z, RAR, TAR, GZ) are unpacked automatically, including nested
archives. A zipped Shapefile is the recommended way to send a Shapefile (it needs
its
.shp,.shx,.dbfand ideally.prjtogether). - Formats that are ZIP files by nature — KMZ,
.gdb.zip,.shz— are read as they are. - You can combine several inputs in one request.
Download st-helena-places.geojson first, or use any file of your own.
curl -X POST "https://api.geoczech.dev/v2/tool/geodata" \
-H "X-API-Key: YOUR_API_KEY" \
-F "files=@st-helena-places.geojson" \
--form-string 'params={"method": "analyze"}' \
-F "wait=true"
import json
import requests
API_KEY = "YOUR_API_KEY"
response = requests.post(
"https://api.geoczech.dev/v2/tool/geodata",
headers={"X-API-Key": API_KEY},
files={
"files": ("st-helena-places.geojson", open("st-helena-places.geojson", "rb")),
"params": (None, json.dumps({"method": "analyze"})),
"wait": (None, "true"),
},
timeout=120,
)
response.raise_for_status()
print(response.json())
import { openAsBlob } from "node:fs";
const API_KEY = "YOUR_API_KEY";
const form = new FormData();
form.append("files", await openAsBlob("st-helena-places.geojson"), "st-helena-places.geojson");
form.append("params", JSON.stringify({"method": "analyze"}));
form.append("wait", "true");
const response = await fetch("https://api.geoczech.dev/v2/tool/geodata", {
method: "POST",
headers: { "X-API-Key": API_KEY },
body: form,
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
<?php
$apiKey = "YOUR_API_KEY";
$curl = curl_init("https://api.geoczech.dev/v2/tool/geodata");
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-API-Key: $apiKey"],
CURLOPT_POSTFIELDS => [
"files" => new CURLFile("st-helena-places.geojson"),
"params" => json_encode(["method" => "analyze"]),
"wait" => "true",
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
print_r(json_decode($response, true));
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
using var form = new MultipartFormDataContent();
form.Add(new StreamContent(File.OpenRead("st-helena-places.geojson")), "files", "st-helena-places.geojson");
form.Add(new StringContent("""{"method": "analyze"}"""), "params");
form.Add(new StringContent("true"), "wait");
var response = await client.PostAsync("https://api.geoczech.dev/v2/tool/geodata", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Synchronous or asynchronous?
With wait=true you get the finished result in one call — perfect for scripts
and small files. Without it, the API answers immediately with a task_id and the
task runs in the background; you then check its status. Use that for big files, for
many files at once, and in web applications that must stay responsive.
| State | Meaning |
|---|---|
PENDING |
Accepted, waiting for a worker. |
PROCESSING |
Running. |
SUCCESS |
Done — results are available. message says if there were warnings. |
FAILED |
Something went wrong — see error, error_code and Errors. |
curl -X POST "https://api.geoczech.dev/v2/tool/converter" \
-H "X-API-Key: YOUR_API_KEY" \
-F "file_urls=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip" \
--form-string 'params={"output": {"format": "gpkg"}}'
import json
import requests
API_KEY = "YOUR_API_KEY"
response = requests.post(
"https://api.geoczech.dev/v2/tool/converter",
headers={"X-API-Key": API_KEY},
files={
"file_urls": (None, "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip"),
"params": (None, json.dumps({
"output": {"format": "gpkg"},
})),
},
timeout=120,
)
response.raise_for_status()
print(response.json())
const API_KEY = "YOUR_API_KEY";
const form = new FormData();
form.append("file_urls", "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip");
form.append("params", JSON.stringify({
"output": {"format": "gpkg"}
}));
const response = await fetch("https://api.geoczech.dev/v2/tool/converter", {
method: "POST",
headers: { "X-API-Key": API_KEY },
body: form,
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
<?php
$apiKey = "YOUR_API_KEY";
$curl = curl_init("https://api.geoczech.dev/v2/tool/converter");
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-API-Key: $apiKey"],
CURLOPT_POSTFIELDS => [
"file_urls" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip",
"params" => json_encode([
"output" => ["format" => "gpkg"],
]),
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
print_r(json_decode($response, true));
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
using var form = new MultipartFormDataContent();
form.Add(new StringContent("https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip"), "file_urls");
form.Add(new StringContent("""{"output": {"format": "gpkg"}}"""), "params");
var response = await client.PostAsync("https://api.geoczech.dev/v2/tool/converter", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"task_id": "248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c",
"status": "PENDING",
"reserved_mc": 32000,
"reserved_credits": 32.0
}
Checking the status
Call GET /v2/status/{task_id} with the same API key. You can only see tasks of your
own account. A good rhythm is to check every 2–5 seconds; most tasks finish within a
few seconds.
Every status call returns fresh download links, so you can come back later (within the retention period) and download the results again.
curl "https://api.geoczech.dev/v2/status/248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c" \
-H "X-API-Key: YOUR_API_KEY"
import requests
API_KEY = "YOUR_API_KEY"
response = requests.get(
"https://api.geoczech.dev/v2/status/248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c",
headers={"X-API-Key": API_KEY},
timeout=120,
)
response.raise_for_status()
print(response.json())
const API_KEY = "YOUR_API_KEY";
const response = await fetch("https://api.geoczech.dev/v2/status/248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c", {
headers: { "X-API-Key": API_KEY },
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
<?php
$apiKey = "YOUR_API_KEY";
$curl = curl_init("https://api.geoczech.dev/v2/status/248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c");
curl_setopt_array($curl, [
CURLOPT_HTTPHEADER => ["X-API-Key: $apiKey"],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
print_r(json_decode($response, true));
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
var response = await client.GetAsync("https://api.geoczech.dev/v2/status/248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c");
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"task_id": "248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c",
"status": "SUCCESS",
"message": "Success",
"error": "",
"created_at": "2026-10-14T09:17:35.946328+00:00",
"updated_at": "2026-10-14T09:17:37.287106+00:00",
"duration_sec": 1.251,
"reserved_mc": 32000,
"charged_mc": 6000,
"output_files": [
"https://…/output/result.json?…",
"https://…/output/st-helena-places-utm.gpkg?…"
],
"json_data": {"status": "ok", "outputs": ["…"]}
}
# Start the task and remember its id (needs jq: https://jqlang.org)
TASK_ID=$(curl -s -X POST "https://api.geoczech.dev/v2/tool/converter" \
-H "X-API-Key: YOUR_API_KEY" \
-F "file_urls=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip" \
--form-string 'params={"output": {"format": "gpkg"}}' | jq -r .task_id)
# Check every 3 seconds until the task is finished
while true; do
STATUS=$(curl -s "https://api.geoczech.dev/v2/status/$TASK_ID" -H "X-API-Key: YOUR_API_KEY")
STATE=$(echo "$STATUS" | jq -r .status)
echo "$STATE"
if [ "$STATE" = "SUCCESS" ] || [ "$STATE" = "FAILED" ]; then break; fi
sleep 3
done
echo "$STATUS" | jq .output_files
import json
import time
import requests
API = "https://api.geoczech.dev"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
task = requests.post(
f"{API}/v2/tool/converter",
headers=HEADERS,
files={
"file_urls": (None, "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip"),
"params": (None, json.dumps({"output": {"format": "gpkg"}})),
},
timeout=120,
).json()
while True:
status = requests.get(f"{API}/v2/status/{task['task_id']}", headers=HEADERS, timeout=60).json()
print(status["status"])
if status["status"] in ("SUCCESS", "FAILED"):
break
time.sleep(3)
print(status.get("output_files") or status.get("error"))
const API = "https://api.geoczech.dev";
const headers = { "X-API-Key": "YOUR_API_KEY" };
const form = new FormData();
form.append("file_urls", "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip");
form.append("params", JSON.stringify({ output: { format: "gpkg" } }));
const task = await (await fetch(`${API}/v2/tool/converter`, { method: "POST", headers, body: form })).json();
let status;
do {
await new Promise((resolve) => setTimeout(resolve, 3000));
status = await (await fetch(`${API}/v2/status/${task.task_id}`, { headers })).json();
console.log(status.status);
} while (!["SUCCESS", "FAILED"].includes(status.status));
console.log(status.output_files ?? status.error);
<?php
$api = "https://api.geoczech.dev";
$headers = ["X-API-Key: YOUR_API_KEY"];
function call(string $url, array $headers, ?array $form = null): array {
$curl = curl_init($url);
curl_setopt_array($curl, [CURLOPT_HTTPHEADER => $headers, CURLOPT_RETURNTRANSFER => true]);
if ($form !== null) {
curl_setopt_array($curl, [CURLOPT_POST => true, CURLOPT_POSTFIELDS => $form]);
}
return json_decode(curl_exec($curl), true);
}
$task = call("$api/v2/tool/converter", $headers, [
"file_urls" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip",
"params" => json_encode(["output" => ["format" => "gpkg"]]),
]);
do {
sleep(3);
$status = call("$api/v2/status/{$task['task_id']}", $headers);
echo $status["status"], "\n";
} while (!in_array($status["status"], ["SUCCESS", "FAILED"]));
print_r($status["output_files"] ?? $status["error"]);
using System.Text.Json;
const string Api = "https://api.geoczech.dev";
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
using var form = new MultipartFormDataContent();
form.Add(new StringContent("https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip"), "file_urls");
form.Add(new StringContent("""{"output": {"format": "gpkg"}}"""), "params");
var started = await client.PostAsync($"{Api}/v2/tool/converter", form);
var taskId = JsonDocument.Parse(await started.Content.ReadAsStringAsync())
.RootElement.GetProperty("task_id").GetString();
JsonElement status;
string state;
do
{
await Task.Delay(3000);
var json = await client.GetStringAsync($"{Api}/v2/status/{taskId}");
status = JsonDocument.Parse(json).RootElement;
state = status.GetProperty("status").GetString()!;
Console.WriteLine(state);
} while (state is not ("SUCCESS" or "FAILED"));
Console.WriteLine(status);
The result
A finished task contains:
| Field | Meaning |
|---|---|
status |
SUCCESS or FAILED. |
message |
Short summary, e.g. Success or Succeeded with warnings. |
output_files |
Download links. Valid for 1 hour; no API key needed to download. |
json_data |
The main JSON result (report, list of results …) — no extra download needed. |
warnings |
Things worth knowing, e.g. a field that had to be renamed. |
duration_sec |
Net processing time — the base of the price. |
reserved_mc, charged_mc |
Credits reserved / charged, in thousandths of a credit. |
error, error_code, error_details |
Only for FAILED tasks. |
Inputs and outputs are kept for 7 days by default (see retention_days), then they
are deleted automatically. To delete them sooner, see Deleting your data.
Deleting your data
Call DELETE /v2/task/{task_id} with the same API key once you have downloaded the
results. The uploaded inputs, the output files and the report of the task are deleted
from storage immediately and permanently, and the download links stop working.
- Only tasks of your own account can be deleted; another task answers
404. - The task must be finished (
SUCCESSorFAILED). A task that is still running answers409with the codetask_running— try again when it has finished. - The record of the task stays: its state, times and credits charged. Its status then
contains
data_deleted_atand nooutput_files.
All data is stored and processed in Amazon Web Services (AWS), region US East (N. Virginia), USA. Transfers use HTTPS and stored files are encrypted at rest.
curl -X DELETE "https://api.geoczech.dev/v2/task/248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c" \
-H "X-API-Key: YOUR_API_KEY"
import requests
resp = requests.delete(
"https://api.geoczech.dev/v2/task/248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c",
headers={"X-API-Key": "YOUR_API_KEY"},
timeout=60,
)
print(resp.status_code, resp.json())
const resp = await fetch("https://api.geoczech.dev/v2/task/248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c", {
method: "DELETE",
headers: { "X-API-Key": "YOUR_API_KEY" },
});
console.log(resp.status, await resp.json());
<?php
$curl = curl_init("https://api.geoczech.dev/v2/task/248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c");
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => ["X-API-Key: YOUR_API_KEY"],
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($curl);
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
var resp = await client.DeleteAsync("https://api.geoczech.dev/v2/task/248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c");
Console.WriteLine($"{(int)resp.StatusCode} {await resp.Content.ReadAsStringAsync()}");
{
"task_id": "248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c",
"deleted": true,
"deleted_files": 3,
"data_deleted_at": "2026-11-23T10:15:02.118204+00:00"
}
Webhooks
Instead of checking the status repeatedly, give the API a callback_url. When the
task finishes, the API sends an HTTP POST with a JSON body — the same content as
GET /v2/status/{task_id} — to your URL.
- The URL must be publicly reachable over the internet.
- Delivery is best effort. If your server was down, the task is still fine — just ask for its status.
- Treat the webhook as a notification: take the
task_idfrom it and read the authoritative result withGET /v2/status/{task_id}.
curl -X POST "https://api.geoczech.dev/v2/tool/converter" \
-H "X-API-Key: YOUR_API_KEY" \
-F "file_urls=https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip" \
--form-string 'params={"output": {"format": "gpkg"}}' \
-F "callback_url=https://example.com/hooks/geoczech"
import json
import requests
API_KEY = "YOUR_API_KEY"
response = requests.post(
"https://api.geoczech.dev/v2/tool/converter",
headers={"X-API-Key": API_KEY},
files={
"file_urls": (None, "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip"),
"params": (None, json.dumps({
"output": {"format": "gpkg"},
})),
"callback_url": (None, "https://example.com/hooks/geoczech"),
},
timeout=120,
)
response.raise_for_status()
print(response.json())
const API_KEY = "YOUR_API_KEY";
const form = new FormData();
form.append("file_urls", "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip");
form.append("params", JSON.stringify({
"output": {"format": "gpkg"}
}));
form.append("callback_url", "https://example.com/hooks/geoczech");
const response = await fetch("https://api.geoczech.dev/v2/tool/converter", {
method: "POST",
headers: { "X-API-Key": API_KEY },
body: form,
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
<?php
$apiKey = "YOUR_API_KEY";
$curl = curl_init("https://api.geoczech.dev/v2/tool/converter");
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-API-Key: $apiKey"],
CURLOPT_POSTFIELDS => [
"file_urls" => "https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip",
"params" => json_encode([
"output" => ["format" => "gpkg"],
]),
"callback_url" => "https://example.com/hooks/geoczech",
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
print_r(json_decode($response, true));
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
using var form = new MultipartFormDataContent();
form.Add(new StringContent("https://cdn.geoczech.dev/docs-samples/v1/st-helena-places-utm.zip"), "file_urls");
form.Add(new StringContent("""{"output": {"format": "gpkg"}}"""), "params");
form.Add(new StringContent("https://example.com/hooks/geoczech"), "callback_url");
var response = await client.PostAsync("https://api.geoczech.dev/v2/tool/converter", form);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"task_id": "248fea42-6dfa-4556-ad7d-bb2a3b5c0d3c",
"status": "SUCCESS",
"service_name": "converter",
"updated_at": "2026-10-14T09:17:37.287106+00:00",
"output_files": ["https://…/output/result.json?…", "https://…/output/st-helena-places-utm.gpkg?…"],
"json_data": {"status": "ok", "outputs": ["…"]}
}
Last updated 2026-11-23