# Data.gov Catalog Rights & Release Ledger (`flintglade/datagov-catalog-rights-release-ledger`) Actor

Track public Data.gov catalog access, license, rights, publisher-release, and distribution metadata. Establish a deterministic baseline and emit complete hashed before/after evidence only when material catalog fields change.

- **URL**: https://apify.com/flintglade/datagov-catalog-rights-release-ledger.md
- **Developed by:** [Flintglade](https://apify.com/flintglade) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 dataset checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Data.gov Catalog Rights & Release Ledger

Turn a public catalog check into dated, deterministic evidence. This Actor remembers a bounded Data.gov Catalog API v4 query or identifier list and reports when catalog access, license, rights, publisher-release, or listed distribution metadata materially changes.

It is intentionally not another bulk scraper. It never downloads linked datasets, probes distribution URLs, follows harvest links, accepts customer credentials, or treats metadata as legal permission.

### Paid outcome

- **$0.003 — Dataset checked:** one complete first baseline, unchanged result, or harvest-churn-only result.
- **$0.020 — Material catalog change report:** one complete before/after row containing every classified material change for that dataset. This replaces, rather than adds to, the lower event.

The exact Apify event names are `dataset-checked` and `catalog-change-report`. The Actor runs with
Limited permissions, Standby disabled, platform usage included, and no default dataset-item event.

Invalid, unresolved, restricted/non-public, malformed, source-failed, and spend-limit-skipped records are uncharged and do not advance their baseline. Apify platform usage is included.

### What changes count

The Actor distinguishes material publisher/catalog changes from ingestion noise:

- catalog title or publisher;
- publisher-supplied issued, modified, or accrual values;
- access level, license, or rights text;
- distributions added or removed;
- distribution location, format/MIME/type, checksum, or release dates.

A change only to Data.gov's `last_harvested_date` or harvest-record reference is labeled `harvest-churn-only`, not a publisher release.

### Input

Choose one mode:

1. `datasetIdentifiers`: 1–25 exact identifiers. Each goes through official v4 search and an exact local identifier match.
2. `query`: 1–200 characters with `maxRecords` from 1–100. Optional organization and keyword filters are exact, bounded local filters.

Leave both selection fields and all query-only controls empty to run the bounded one-record `climate` example. Explicitly supplying both is rejected; `orgSlug`, `keyword`, and `maxRecords` require an explicit query and are rejected in identifier mode.

Keep a stable `watchId` for recurring runs. A watch refuses a changed query signature unless `resetBaseline` is explicitly set. Query top-N disappearance is never reported as dataset deletion.

The default example searches for one public `climate` result and normally completes in under five minutes.

### Output and verification

Each paid dataset row includes the allowlisted current metadata, prior/current material and source-state hashes, a sorted complete material change set, a retrieval time, and a `recordHash`. Record hashes exclude run/retrieval metadata so equivalent evidence stays stable.

Contact points, author/maintainer identities, descriptions, raw responses, response headers, linked content, and hidden configuration are omitted. The run summary is stored separately and is not a paid dataset event.

Each source response is capped at 16 MiB and the run retains at most 8 MiB of raw catalog records before projection, preventing a bounded multi-page or identifier batch from accumulating unbounded source objects.

### Source, rights, and privacy boundary

Production calls only `https://api.gsa.gov/technology/datagov/v4/` using a Flintglade-managed encrypted `DATAGOV_API_KEY`. Customers never supply a key. The public `DEMO_KEY` is structurally rejected by the hosted Actor and exists only as a local smoke-test fallback.

Catalog metadata does not grant reuse rights, guarantee quality, prove a linked resource works, or establish publisher endorsement. Federal/public-domain assumptions must not be applied to non-federal or third-party resources; follow each dataset's actual terms.

This unofficial tool is not affiliated with or endorsed by Data.gov, GSA, or listed publishers.

### Limitations

- No linked-file download or validation.
- No legal, compliance, or data-quality conclusion.
- No deletion claim from a capped query window or unresolved exact search.
- Baselines are scoped to the Actor's default key-value store and query signature.
- Data.gov v4 availability and metadata completeness remain upstream dependencies.

Support: `support@flintglade.com`

# Actor input Schema

## `datasetIdentifiers` (type: `array`):

One to 25 exact catalog identifiers. Each is searched and then exact-matched locally. Leave this and query empty for the one-record example.
## `query` (type: `string`):

Plain Data.gov Catalog API v4 search text. Leave this and identifiers empty for the one-record example.
## `orgSlug` (type: `string`):

Optional exact local organization slug/name filter for query results.
## `keyword` (type: `string`):

Optional exact local DCAT keyword filter for query results.
## `maxRecords` (type: `integer`):

Maximum complete results for an explicitly supplied query.
## `watchId` (type: `string`):

Stable name for this query's private baseline.
## `resetBaseline` (type: `boolean`):

Replace this watch's existing baseline and query signature.
## `requestTimeoutSeconds` (type: `integer`):

Per-request timeout in seconds for the official Data.gov API.
## `maxRetries` (type: `integer`):

Maximum bounded retries for transient source failures.
## `maxConcurrency` (type: `integer`):

Maximum simultaneous exact-identifier lookups.

## Actor input object example

```json
{
  "query": "climate",
  "maxRecords": 1,
  "watchId": "my-datagov-watch",
  "resetBaseline": false,
  "requestTimeoutSeconds": 20,
  "maxRetries": 3,
  "maxConcurrency": 2
}
````

# Actor output Schema

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

No description

## `runSummary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("flintglade/datagov-catalog-rights-release-ledger").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("flintglade/datagov-catalog-rights-release-ledger").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 '{}' |
apify call flintglade/datagov-catalog-rights-release-ledger --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=flintglade/datagov-catalog-rights-release-ledger",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Data.gov Catalog Rights & Release Ledger",
        "description": "Track public Data.gov catalog access, license, rights, publisher-release, and distribution metadata. Establish a deterministic baseline and emit complete hashed before/after evidence only when material catalog fields change.",
        "version": "0.1",
        "x-build-id": "rVTIRA5ITWHtkcxI6"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/flintglade~datagov-catalog-rights-release-ledger/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-flintglade-datagov-catalog-rights-release-ledger",
                "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/flintglade~datagov-catalog-rights-release-ledger/runs": {
            "post": {
                "operationId": "runs-sync-flintglade-datagov-catalog-rights-release-ledger",
                "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/flintglade~datagov-catalog-rights-release-ledger/run-sync": {
            "post": {
                "operationId": "run-sync-flintglade-datagov-catalog-rights-release-ledger",
                "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": [
                    "watchId"
                ],
                "properties": {
                    "datasetIdentifiers": {
                        "title": "Exact Data.gov identifiers",
                        "minItems": 1,
                        "maxItems": 25,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "One to 25 exact catalog identifiers. Each is searched and then exact-matched locally. Leave this and query empty for the one-record example.",
                        "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 512
                        }
                    },
                    "query": {
                        "title": "Catalog search",
                        "minLength": 1,
                        "maxLength": 200,
                        "type": "string",
                        "description": "Plain Data.gov Catalog API v4 search text. Leave this and identifiers empty for the one-record example."
                    },
                    "orgSlug": {
                        "title": "Organization filter",
                        "minLength": 1,
                        "maxLength": 100,
                        "type": "string",
                        "description": "Optional exact local organization slug/name filter for query results."
                    },
                    "keyword": {
                        "title": "Keyword filter",
                        "minLength": 1,
                        "maxLength": 100,
                        "type": "string",
                        "description": "Optional exact local DCAT keyword filter for query results."
                    },
                    "maxRecords": {
                        "title": "Maximum query records",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum complete results for an explicitly supplied query."
                    },
                    "watchId": {
                        "title": "Watch ID",
                        "pattern": "^[A-Za-z0-9_-]{1,64}$",
                        "type": "string",
                        "description": "Stable name for this query's private baseline.",
                        "default": "my-datagov-watch"
                    },
                    "resetBaseline": {
                        "title": "Reset baseline",
                        "type": "boolean",
                        "description": "Replace this watch's existing baseline and query signature.",
                        "default": false
                    },
                    "requestTimeoutSeconds": {
                        "title": "Request timeout",
                        "minimum": 5,
                        "maximum": 30,
                        "type": "integer",
                        "description": "Per-request timeout in seconds for the official Data.gov API.",
                        "default": 20
                    },
                    "maxRetries": {
                        "title": "Maximum retries",
                        "minimum": 0,
                        "maximum": 4,
                        "type": "integer",
                        "description": "Maximum bounded retries for transient source failures.",
                        "default": 3
                    },
                    "maxConcurrency": {
                        "title": "Identifier lookup concurrency",
                        "minimum": 1,
                        "maximum": 3,
                        "type": "integer",
                        "description": "Maximum simultaneous exact-identifier lookups.",
                        "default": 2
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
