# OpenTofu IaC Registry Provider & Module Scraper (`bifrost-data/opentofu-registry-scraper`) Actor

Search and extract official OpenTofu IaC Registry providers and reusable cloud modules — including v-prefix normalized semver releases, protocol & OS/arch matrices, GPG signing keys, resource/datasource/function counts, and module input/output schemas with zero API keys or proxies.

- **URL**: https://apify.com/bifrost-data/opentofu-registry-scraper.md
- **Developed by:** [SEOK HOON HONG](https://apify.com/bifrost-data) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 verified opentofu registry records

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## OpenTofu IaC Registry Provider & Module Scraper

Extract structured, schema-verified metadata for **4,700+ Infrastructure-as-Code (IaC) providers** and **30,000+ reusable cloud modules** from the official Linux Foundation [OpenTofu Registry](https://search.opentofu.org/provider/hashicorp/aws/latest) — combining both the [OpenTofu Registry Docs & Search API (`api.opentofu.org`)](https://api.opentofu.org/) and the [OpenTofu CLI Provider & Module Registry Protocols (`registry.opentofu.org/v1`)](https://opentofu.org/docs/internals/provider-registry-protocol/) with **zero API keys, zero proxies, and 256 MB lightweight execution**.

### Why DevSecOps, Platform Engineering & AI Agents Use This Actor

1. **Dual-API Reconciliation (`v`-Prefix SemVer Normalization)**: Automatically reconciles `v`-prefixed tags from [`api.opentofu.org`](https://opentofu.org/blog/building-the-opentofu-registry/) (`v5.78.0`) with bare Semantic Versioning strings required by [`registry.opentofu.org/v1`](https://opentofu.org/docs/internals/provider-registry-protocol/) (`5.78.0`) so lockfile auditors, Renovate-style bots, and AI coding agents never hit version-mismatch errors.
2. **Deep Provider & Module Schema Counts**:
   - **Providers**: Managed `resources_count`, `datasources_count`, OpenTofu 1.8+ provider-defined `functions_count`, `guides_count`, SPDX `license`, `fork_of` lineage, and upstream Git `repository_url`.
   - **Modules**: Extracted `inputs_count` (variables), `outputs_count`, `module_resources_count`, `submodules_count`, `examples_count`, and target cloud/system (`aws`, `azurerm`, `google`, `kubernetes`, `hcloud`).
3. **Optional Supply-Chain & Cryptographic Verification**: Enable `enrich_cli_protocol_and_gpg` to query [Provider Registry Protocol](https://opentofu.org/docs/internals/provider-registry-protocol/) and [Module Registry Protocol](https://opentofu.org/docs/internals/module-registry-protocol/) endpoints for supported plugin protocols (`5.0`, `6.0`), OS/architecture binary matrices (`linux/amd64`, `darwin/arm64`), SHA-256 package checksums, GPG signing key IDs, `X-Terraform-Get` Git clone locations, and `discovered_at` dependency-cooldown timestamps.
4. **Ready-to-Paste HCL Snippets for AI Agents & RAG**: Every record includes a deterministic `hcl_snippet` (`required_providers` or `module` block) pinned to the normalized `latest_version`.

### Transparent Pay-Per-Event Pricing

- **Verified OpenTofu Registry Record (`verified-tofu-item`)**: **$0.0018 per record** (**$1.80 per 1,000 verified providers or modules**).
- **Zero Waste Guarantee**: Duplicate search hits, documentation sub-pages (`parent_id`), blocked/empty shell entries, and client-filtered items cost **$0**.

### Quick Input Examples

#### 1. Audit Official Cloud & Kubernetes Providers Updated in the Last 30 Days

```json
{
  "entity_type": "providers",
  "search_queries": ["aws", "kubernetes", "cloudflare", "datadog"],
  "published_within_days": 30,
  "exclude_blocked": true,
  "enrich_docs_and_schemas": true,
  "enrich_cli_protocol_and_gpg": true,
  "max_items": 25
}
```

#### 2. Inspect Exact Providers & Reusable Cloud Modules

```json
{
  "entity_type": "all",
  "exact_coordinates": [
    "opentofu/aws",
    "hetznercloud/hcloud",
    "terraform-aws-modules/vpc/aws",
    "hashicorp/consul/aws"
  ],
  "enrich_docs_and_schemas": true,
  "enrich_cli_protocol_and_gpg": true,
  "max_items": 10
}
```

### Output Fields Overview

| Field | Type | Description |
| :--- | :--- | :--- |
| `coordinate` | `string` | Canonical registry coordinate (`namespace/name` for providers, `namespace/name/target` for modules) |
| `entity_type` | `string` | `"provider"` or `"module"` |
| `latest_version` | `string` | Normalized SemVer without leading `v` (e.g., `"5.78.0"`) |
| `latest_tag` | `string` | Docs/Git tag with leading `v` (e.g., `"v5.78.0"`) |
| `popularity` | `integer \| null` | OpenTofu Registry popularity / GitHub star score |
| `resources_count` / `datasources_count` / `functions_count` | `integer \| null` | Provider documentation component counts |
| `inputs_count` / `outputs_count` / `submodules_count` | `integer \| null` | Module interface & composition counts |
| `protocols` / `platforms` / `gpg_key_ids` | `string[]` | CLI Registry Protocol compatibility & GPG signing key IDs |
| `hcl_snippet` | `string` | Ready-to-use OpenTofu HCL configuration snippet |
| `registry_ui_url` / `docs_api_url` / `protocol_api_url` | `string` | Direct links to OpenTofu Registry UI & official JSON APIs |

# Actor input Schema

## `entity_type` (type: `string`):

Choose 'providers' to audit OpenTofu IaC providers (4,700+ integrations), 'modules' to extract reusable cloud IaC blueprints (30,000+ modules), or 'all' to query both across unified search.

## `search_queries` (type: `array`):

Search OpenTofu providers and modules by keyword (e.g., 'aws', 'eks', 'kubernetes', 'cloudflare', 'vpc', 'proxmox'). Leave empty in Providers or Modules mode to stream directly from the catalog index sorted by popularity.

## `exact_coordinates` (type: `array`):

Look up exact providers ('namespace/name', e.g. 'hashicorp/aws', 'hetznercloud/hcloud') or exact modules ('namespace/name/target', e.g. 'terraform-aws-modules/vpc/aws', 'hashicorp/consul/aws').

## `namespaces` (type: `array`):

Restrict results to specific publisher namespaces (e.g., 'opentofu', 'hashicorp', 'cloudflare', 'datadog', 'terraform-aws-modules', 'azure').

## `target_systems` (type: `array`):

Restrict modules to specific target providers/systems (e.g., 'aws', 'azurerm', 'google', 'kubernetes', 'hcloud'). Applies to module records.

## `min_popularity` (type: `integer`):

Only emit providers or modules with at least this popularity/star score in the OpenTofu Registry.

## `published_within_days` (type: `integer`):

Only return providers or modules whose latest version was published within the last N days (e.g., 7 for weekly CI dependency audits, 30 for monthly platform reviews). Leave unset for no date cutoff.

## `exclude_blocked` (type: `boolean`):

Skip blocked/revoked registry entries and empty repositories with zero published versions ($0 charge).

## `exclude_forks` (type: `boolean`):

Skip providers marked as a fork ('fork_of') of another upstream provider ($0 charge).

## `enrich_docs_and_schemas` (type: `boolean`):

Fetch each item's latest version index.json from api.opentofu.org to extract source Git repository URL, SPDX license, provider resource/datasource/function/guide counts, and module input/output/resource/submodule/example counts.

## `enrich_cli_protocol_and_gpg` (type: `boolean`):

Query registry.opentofu.org/v1 CLI protocol endpoints to attach supported OpenTofu plugin protocols (5.0/6.0), OS/arch binary matrix, SHA-256 package hash, GPG signing key IDs, module X-Terraform-Get Git source URL, and dependency-cooldown discovered_at timestamp.

## `max_items` (type: `integer`):

Maximum verified OpenTofu provider/module records to emit in this run.

## Actor input object example

```json
{
  "entity_type": "providers",
  "search_queries": [
    "aws",
    "kubernetes",
    "cloudflare"
  ],
  "exact_coordinates": [],
  "namespaces": [],
  "target_systems": [],
  "min_popularity": 0,
  "exclude_blocked": true,
  "exclude_forks": false,
  "enrich_docs_and_schemas": true,
  "enrich_cli_protocol_and_gpg": false,
  "max_items": 25
}
```

# Actor output Schema

## `items` (type: `string`):

Schema-verified OpenTofu IaC providers and reusable modules with normalized semver tags, resource/schema counts, and HCL snippets.

## `runMetrics` (type: `string`):

Execution telemetry including deduplicated rows, blocked/fork skips, filtered free items, and validation rate.

# 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 = {
    "search_queries": [
        "aws",
        "kubernetes",
        "cloudflare"
    ],
    "max_items": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("bifrost-data/opentofu-registry-scraper").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 = {
    "search_queries": [
        "aws",
        "kubernetes",
        "cloudflare",
    ],
    "max_items": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("bifrost-data/opentofu-registry-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "search_queries": [
    "aws",
    "kubernetes",
    "cloudflare"
  ],
  "max_items": 25
}' |
apify call bifrost-data/opentofu-registry-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bifrost-data/opentofu-registry-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/jsxwI23cYWbPnOCrI/builds/XPM1hxxG6CrFVUb0u/openapi.json
