# Terraform Registry Scraper (`kawsar/terraform-registry-scraper`) Actor

Search public Terraform Registry modules and providers by keyword or ID. Extract namespace, version, downloads, and publish dates directly into JSON, CSV, or Excel spreadsheets—no login required. Perfect for tech audits and provider tracking

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

## Pricing

from $2.99 / 1,000 results

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/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

## Terraform Registry Scraper: Terraform modules and providers search

Search the Terraform Registry for modules and providers, then export the dataset directly as JSON, CSV, or Excel. The scraper gathers details, waits between requests to maintain smooth execution, and outputs flat, clean structured data for every item found.

### Use cases

- **Module search**: Look up community modules for a keyword like `vpc` while tracking namespaces, current versions, and total download counts.
- **Provider inventory**: Generate a list of available providers and sort your export by popular downloads.
- **Detail lookup**: Pull full info for specific modules or providers when you already have the namespace and name.
- **Version audit**: Re-run queries periodically to compare published updates and verify release timelines.
- **Spreadsheet handoff**: Download a clean CSV or Excel report for offline review and team discussions.

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | string | `searchModules` | Choose between module search, module detail, provider list, or provider detail. |
| `searchQueries` | array | `["vpc"]` | Keywords to look up during module searches. |
| `moduleIds` | array | empty | Direct detail lookup formatted as `namespace/name/provider`. |
| `providerIds` | array | empty | Direct detail lookup formatted as `namespace/name`. |
| `provider` | string | empty | Filter search or list results by a specific provider (for example, `aws`). |
| `verifiedOnly` | boolean | `false` | Limit results to verified modules or official provider tiers. |
| `maxItems` | integer | `100` | Maximum number of rows to collect (up to 1000). |
| `requestDelaySecs` | number | `0.3` | Pause duration between requests (minimum 0.3 seconds). |
| `timeoutSecs` | integer | `300` | Overall run time limit in seconds. |
| `requestTimeoutSecs` | integer | `30` | Timeout setting for individual requests. |
| `proxyConfiguration` | object | `{"useApifyProxy": false}` | Optional proxy settings. |

#### Example input

```json
{
    "mode": "searchModules",
    "searchQueries": ["vpc"],
    "provider": "aws",
    "verifiedOnly": false,
    "maxItems": 100,
    "requestDelaySecs": 0.3,
    "timeoutSecs": 300,
    "requestTimeoutSecs": 30,
    "proxyConfiguration": { "useApifyProxy": false }
}

```

For specific detail lookups, use formats such as `terraform-aws-modules/vpc/aws` for modules or `hashicorp/aws` for providers.

### Extracted Data

Each row in the dataset is output in a flat structure.

```json
{
    "id": "terraform-aws-modules/vpc/aws/6.7.3",
    "owner": "",
    "namespace": "terraform-aws-modules",
    "name": "vpc",
    "version": "6.7.3",
    "provider": "aws",
    "provider_logo_url": "/images/providers/aws.png",
    "itemDescription": "Terraform module to create AWS VPC resources",
    "source": "[https://github.com/terraform-aws-modules/terraform-aws-vpc](https://github.com/terraform-aws-modules/terraform-aws-vpc)",
    "tag": "v6.7.3",
    "published_at": "2026-09-18T19:52:23.7236Z",
    "downloads": 220549170,
    "verified": false,
    "mode": "searchModules",
    "scraped_at": "2026-10-12T00:00:00Z"
}

```

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Unique identifier for the module or provider version. |
| `owner` | string | Registered owner name. |
| `namespace` | string | Namespace name (e.g., `terraform-aws-modules`). |
| `name` | string | Name of the module or provider. |
| `version` | string | Specific release version string. |
| `provider` | string | Associated provider. |
| `provider_logo_url` | string | Relative path to the logo image. |
| `itemDescription` | string | Summary text describing the item. |
| `source` | string | Upstream repository URL. |
| `tag` | string | Git release tag for the version. |
| `published_at` | string | Original publish timestamp. |
| `downloads` | integer | Total recorded download count. |
| `verified` | boolean | Verification flag or official tier status. |
| `mode` | string | Operational mode used during the extraction. |
| `scraped_at` | string | UTC timestamp when the record was saved. |

If a request hits an issue, a record is written containing the error summary and input parameters so the rest of your run finishes smoothly. Duplicates are filtered out automatically, and data streams into the dataset in light batches.

### How it works

1. Reads your mode and constructs the task queue from your queries or target IDs.
2. Processes requests sequentially while respecting delay settings.
3. Applies your provider and verification filters to incoming rows.
4. Saves unique entries, stops when reaching `maxItems` or your time limit, and outputs the collected dataset.

### FAQ

**How fresh is the data?**

Data is collected live during execution. Timestamps reflect exact publishing times and extraction times.

**Can I export directly to Excel or CSV?**

Yes. You can export your final dataset from Apify in JSON, CSV, or Excel format whenever you're ready.

**What happens if a module path isn't found?**

It outputs an error record with details on what was requested, allowing the rest of your run to continue without interruption.

**Why is the summary stored as `itemDescription`?**

`itemDescription` is used to keep the dataset field name distinct and easy to work with across tabular exports.

#### Trademark Notice

Terraform Registry and related names, logos, and trademarks belong to their respective owners. Their use in this documentation is solely to identify the source of the data and does not imply affiliation, sponsorship, endorsement, or partnership.

#### Disclaimer

This Actor is an independent tool developed by kawsar and is not affiliated with, endorsed by, sponsored by, or otherwise officially associated with Terraform Registry or its owners. All data is gathered from public sources. Users are responsible for complying with the source's terms of use, rate limits, and attribution or licensing requirements.

#### Is web scraping legal?

This Actor only collects publicly available data without bypassing any access controls. Scraping public data is generally recognized as legal, but how you handle the data matters:

- **Personal data:** If any collected data contains personal information (such as personal names or contact details), privacy frameworks like the GDPR or CCPA may apply. Only collect and process personal data when you have a clear, legitimate reason.
- **Copyright:** Content such as full articles, documentation, or images may be protected under copyright law. Avoid re-publishing complete copyrighted text without proper authorization.
- **Terms of use:** Always respect rate limits, attribution guidelines, and non-commercial restrictions where applicable.
- **Legal advice:** This overview is for informational purposes only and does not constitute legal advice. Please consult a qualified legal professional if you have specific questions.

To learn more, read Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

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

What to collect: module search, one module record, the provider list, or one provider record.

## `searchQueries` (type: `array`):

Keywords for module search. Each query is sent to the public module search endpoint. Ignored in other modes.

## `moduleIds` (type: `array`):

Module paths for detail mode, written as namespace/name/provider. Example: terraform-aws-modules/vpc/aws.

## `providerIds` (type: `array`):

Provider paths for detail mode, written as namespace/name. Example: hashicorp/aws.

## `provider` (type: `string`):

Keep module rows whose provider matches this value, or provider rows whose name matches it. Example: aws. Leave empty to keep every row.

## `verifiedOnly` (type: `boolean`):

When enabled, module search keeps verified modules and the provider list keeps official-tier providers.

## `maxItems` (type: `integer`):

Maximum successful rows to store in one run. The free cap is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between registry requests. The minimum polite delay is 0.3 seconds.

## `timeoutSecs` (type: `integer`):

Stop the run after this many seconds, even if more pages remain.

## `requestTimeoutSecs` (type: `integer`):

Seconds to wait for a single registry response before retrying.

## `proxyConfiguration` (type: `object`):

Optional proxy for registry requests. The default sends traffic directly, without Apify Proxy.

## Actor input object example

```json
{
  "mode": "searchModules",
  "searchQueries": [
    "vpc"
  ],
  "moduleIds": [
    "terraform-aws-modules/vpc/aws"
  ],
  "providerIds": [
    "hashicorp/aws"
  ],
  "provider": "",
  "verifiedOnly": false,
  "maxItems": 100,
  "requestDelaySecs": 0.3,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Table of modules and providers stored by this run.

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

Full dataset, including error rows.

# 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 = {
    "mode": "searchModules",
    "searchQueries": [
        "vpc"
    ],
    "moduleIds": [
        "terraform-aws-modules/vpc/aws"
    ],
    "providerIds": [
        "hashicorp/aws"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/terraform-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 = {
    "mode": "searchModules",
    "searchQueries": ["vpc"],
    "moduleIds": ["terraform-aws-modules/vpc/aws"],
    "providerIds": ["hashicorp/aws"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("kawsar/terraform-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 '{
  "mode": "searchModules",
  "searchQueries": [
    "vpc"
  ],
  "moduleIds": [
    "terraform-aws-modules/vpc/aws"
  ],
  "providerIds": [
    "hashicorp/aws"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call kawsar/terraform-registry-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kawsar/terraform-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/g52RDFY80YhW2KxCv/builds/UNYazfOAYaohPBcaM/openapi.json
