# OGC API Coverages Extractor (`datamule/ogc-api-coverages-extractor`) Actor

Point at ANY OGC API - Coverages endpoint (the JSON/CoverageJSON successor to WCS) — pygeoapi, GNOSIS, ldproxy, GeoServer. List coverage collections, describe their schema (axes, params, CRS), or summarize CoverageJSON (axis shape + value count) as flat rows. Pay per record.

- **URL**: https://apify.com/datamule/ogc-api-coverages-extractor.md
- **Developed by:** [Datamule](https://apify.com/datamule) (community)
- **Categories:** Developer tools, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## OGC API Coverages Extractor

A generic **"point at any OGC API - Coverages endpoint"** scraper. [OGC API -
Coverages](https://ogcapi.ogc.org/coverages/) is the modern **JSON / CoverageJSON**
REST standard for gridded and raster coverage data — the successor to the older
XML **Web Coverage Service (WCS)**. Earth observation, climate reanalysis,
elevation / DEM, land-cover, weather grids and satellite imagery are all
published as *coverage collections* by national mapping agencies, space agencies,
research data centres and spatial data infrastructures.

**One actor spans them all.** Point it at any OGC API landing/root URL and it
lists every coverage collection, describes their schema, or summarizes the
CoverageJSON — with the **same normalized row shape regardless of the server
software** (pygeoapi, Ecere GNOSIS, ldproxy, GeoServer, …). No per-server
scraper needed.

### Three modes

| Mode | What you get (one flat row per…) |
|------|----------------------------------|
| **collections** (default) | …coverage collection — `collectionId`, `title`, `coverage_available`, WGS84 `wgs84_bbox`, `temporal_interval`, `crs`, `coverageUrl` |
| **describe** | …collection's schema — `domainType`, `axisLabels`, `axisSizes`, `referenceSystems`, `rangeParameters`, `parameterCount` |
| **coverage** | …range **parameter** — `param`, `axis_shape`, `value_count`, `dataType`, `axisNames`, `unit`, `observedProperty` |

Every row also carries provenance (`_sourceService`, `_ogcApi`,
`_serverSoftware`, `_mode`) and a lossless, size-capped `_raw`.

### Why the coverage summary is safe (and fast)

A single CoverageJSON grid can be **100 MB+** — the raw pixel/cell array is
enormous. This actor never downloads it. The CoverageJSON `domain`, `parameters`
and range headers all precede the giant `ranges.values` array, so the fetch is
**byte-capped and streamed**: it reads just enough to summarize the axes, the
range parameters and their shape (and computes `value_count` as the product of
the grid axes), then stops. You get the full structure of a multi-million-cell
coverage as one compact row — **never one row per cell**.

### Input

```json
{
  "sources": ["https://demo.pygeoapi.io/master", "https://maps.gnosis.earth/ogcapi"],
  "mode": "collections",
  "collectionIds": ["gdps-temperature"],
  "maxRecords": 1000
}
````

- **sources** (required) — one or more OGC API landing/root URLs. Point at the
  root, not `/collections` or `/coverage`.
- **mode** — `collections` (default), `describe`, or `coverage`.
- **collectionIds** — restrict `describe` / `coverage` to specific collection
  ids; leave empty to process every coverage collection the endpoint exposes.
- **maxRecords** — total row cap (each row is one billable event). Default 1000.
- **bearerToken** / **extraHeaders** — optional, for auth-gated deployments.
  Not required for public OGC API endpoints. Never logged.

### Output (collections mode, example row)

```json
{
  "_mode": "collection",
  "collectionId": "gdps-temperature",
  "title": "Global Deterministic Prediction System sample",
  "coverage_available": true,
  "wgs84_bbox": [-180.0, -90.0, 180.0, 90.0],
  "temporal_interval": null,
  "crs": ["http://www.opengis.net/def/crs/OGC/1.3/CRS84"],
  "coverageUrl": "https://demo.pygeoapi.io/master/collections/gdps-temperature/coverage",
  "_sourceService": "https://demo.pygeoapi.io/master",
  "_ogcApi": "coverages",
  "_serverSoftware": "pygeoapi"
}
```

### Behaviour & honesty

- **Coverage-only.** Feature and record collections are filtered out — a coverage
  collection is detected by an `itemType: "coverage"` or a `coverage` link
  relation, so feature endpoints are never mis-scraped.
- **Zero coverages is a real state.** A reachable endpoint that exposes no
  coverage collections returns 0 rows and exits cleanly — no fabricated data.
- **Bad sources are skipped** with a warning and the run continues; if *every*
  source fails, the run fails fast so nothing broken ships.

### Pricing

Pay-per-event: one **record** charge per row returned.

### Verified

Tested live against two independent server families: **pygeoapi** (ECCC weather
grids) and **Ecere GNOSIS** (NaturalEarth rasters + CMIP/ERA5 climate coverages),
confirming identical normalized output across vendors.

# Actor input Schema

## `sources` (type: `array`):

One or more root URLs of ANY OGC API - Coverages endpoint (the modern JSON/CoverageJSON successor to WCS for gridded/raster coverage data). Examples: https://demo.pygeoapi.io/master (pygeoapi reference server, weather grids) and https://maps.gnosis.earth/ogcapi (Ecere GNOSIS, NaturalEarth + climate rasters). Point at the landing/API root — do NOT include /collections or /coverage.

## `mode` (type: `string`):

What to extract. "collections" (default): one row per COVERAGE collection the endpoint exposes (id, title, WGS84 bbox, temporal interval, CRS, coverage URL). "describe": one row per collection with its coverage schema (domain type, axis labels + sizes, reference systems, range parameter list). "coverage": one row per range PARAMETER with its grid axis\_shape + value\_count (the CoverageJSON is summarized from a byte-capped stream — never the multi-GB pixel array).

## `collectionIds` (type: `array`):

Coverage collection id(s) to describe / summarize (used by the "describe" and "coverage" modes), e.g. gdps-temperature. Leave EMPTY to process EVERY coverage collection the endpoint exposes. Ignored in "collections" mode.

## `maxRecords` (type: `integer`):

Maximum total number of rows to emit across all sources and collections. Each returned row is one billable event. Default 1000.

## `bearerToken` (type: `string`):

Optional OAuth2 bearer token for auth-gated deployments. Sent as Authorization: Bearer \*\*\*. NOT required for public OGC API endpoints (pygeoapi, GNOSIS demos) — leave empty. Never logged.

## `extraHeaders` (type: `object`):

Optional extra HTTP headers to send with every request, as a JSON object, e.g. {"api-key": "..."} for a service that takes an API key in a header. Leave empty for public services.

## Actor input object example

```json
{
  "sources": [
    "https://demo.pygeoapi.io/master"
  ],
  "mode": "collections",
  "collectionIds": [
    "gdps-temperature"
  ],
  "maxRecords": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sources": [
        "https://demo.pygeoapi.io/master"
    ],
    "collectionIds": [
        "gdps-temperature"
    ],
    "maxRecords": 1000
};

// Run the Actor and wait for it to finish
const run = await client.actor("datamule/ogc-api-coverages-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sources": ["https://demo.pygeoapi.io/master"],
    "collectionIds": ["gdps-temperature"],
    "maxRecords": 1000,
}

# Run the Actor and wait for it to finish
run = client.actor("datamule/ogc-api-coverages-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sources": [
    "https://demo.pygeoapi.io/master"
  ],
  "collectionIds": [
    "gdps-temperature"
  ],
  "maxRecords": 1000
}' |
apify call datamule/ogc-api-coverages-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=datamule/ogc-api-coverages-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OGC API Coverages Extractor",
        "description": "Point at ANY OGC API - Coverages endpoint (the JSON/CoverageJSON successor to WCS) — pygeoapi, GNOSIS, ldproxy, GeoServer. List coverage collections, describe their schema (axes, params, CRS), or summarize CoverageJSON (axis shape + value count) as flat rows. Pay per record.",
        "version": "0.1",
        "x-build-id": "rxcLxmS9Od9egOhit"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datamule~ogc-api-coverages-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datamule-ogc-api-coverages-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~ogc-api-coverages-extractor/runs": {
            "post": {
                "operationId": "runs-sync-datamule-ogc-api-coverages-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~ogc-api-coverages-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-datamule-ogc-api-coverages-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": [
                    "sources"
                ],
                "properties": {
                    "sources": {
                        "title": "OGC API service root URL(s)",
                        "type": "array",
                        "description": "One or more root URLs of ANY OGC API - Coverages endpoint (the modern JSON/CoverageJSON successor to WCS for gridded/raster coverage data). Examples: https://demo.pygeoapi.io/master (pygeoapi reference server, weather grids) and https://maps.gnosis.earth/ogcapi (Ecere GNOSIS, NaturalEarth + climate rasters). Point at the landing/API root — do NOT include /collections or /coverage.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "collections",
                            "describe",
                            "coverage"
                        ],
                        "type": "string",
                        "description": "What to extract. \"collections\" (default): one row per COVERAGE collection the endpoint exposes (id, title, WGS84 bbox, temporal interval, CRS, coverage URL). \"describe\": one row per collection with its coverage schema (domain type, axis labels + sizes, reference systems, range parameter list). \"coverage\": one row per range PARAMETER with its grid axis_shape + value_count (the CoverageJSON is summarized from a byte-capped stream — never the multi-GB pixel array).",
                        "default": "collections"
                    },
                    "collectionIds": {
                        "title": "Collection id(s)",
                        "type": "array",
                        "description": "Coverage collection id(s) to describe / summarize (used by the \"describe\" and \"coverage\" modes), e.g. gdps-temperature. Leave EMPTY to process EVERY coverage collection the endpoint exposes. Ignored in \"collections\" mode.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxRecords": {
                        "title": "Max records (total)",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum total number of rows to emit across all sources and collections. Each returned row is one billable event. Default 1000.",
                        "default": 1000
                    },
                    "bearerToken": {
                        "title": "Bearer token (optional)",
                        "type": "string",
                        "description": "Optional OAuth2 bearer token for auth-gated deployments. Sent as Authorization: Bearer ***. NOT required for public OGC API endpoints (pygeoapi, GNOSIS 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. {\"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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
