# Terraform Registry API
> The Terraform Registry — the home of Terraform and OpenTofu modules and providers — as an API. Look up any module for its latest version, total downloads, source repository, verified status, publish date and a ready-to-paste usage block, plus counts of its inputs, outputs and managed resources; read a module's full version history; search the registry of thousands of community modules (optionally filtered by provider); and look up any provider for its version, download count and tier (official / partner / community). Covers the infrastructure-as-code ecosystem from the terraform-aws-modules VPC, EKS and RDS modules to the hashicorp/aws, google and azurerm providers. Live from the official registry.terraform.io API. Ideal for IaC and GitOps tooling, module catalogs and dashboards, and platform-engineering automation. Open data from the Terraform Registry.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/terraform-api/..."
```

## Pricing
- **Free** (Free) — 3,720 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 50,100 calls/Mo, 8 req/s
- **Pro** ($14/Mo) — 245,000 calls/Mo, 20 req/s
- **Mega** ($36/Mo) — 1,220,000 calls/Mo, 50 req/s

## Endpoints

### Terraform

#### `GET /v1/module` — Module metadata

**Parameters:**
- `namespace` (query, required, string) — Module namespace, e.g. terraform-aws-modules Example: `terraform-aws-modules`
- `name` (query, required, string) — Module name, e.g. vpc Example: `vpc`
- `provider` (query, required, string) — Provider, e.g. aws Example: `aws`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/terraform-api/v1/module?namespace=terraform-aws-modules&name=vpc&provider=aws"
```

**Response:**
```json
{
    "data": {
        "module": {
            "id": "terraform-aws-modules/vpc/aws/6.6.1",
            "name": "vpc",
            "root": {
                "inputs": 236,
                "outputs": 119,
                "resources": 79,
                "dependencies": 0,
                "provider_dependencies": 1
            },
            "owner": "antonbabenko",
            "usage": "module \"vpc\" {\n  source  = \"terraform-aws-modules/vpc/aws\"\n  version = \"6.6.1\"\n}",
            "source": "https://github.com/terraform-aws-modules/terraform-aws-vpc",
            "version": "6.6.1",
            "provider": "aws",
            "verified": false,
            "downloads": 188513802,
            "namespace": "terraform-aws-modules",
            "providers": [
                "aws"
            ],
            "description": "Terraform module to create AWS VPC resources 🇺🇦",
            "published_at": "2026-04-02T20:22:11.071125Z",
            "registry_url": "https://registry.terraform.io/modules/terraform-aws-modules/vpc/aws",
            "version_count": 240,
            "submodule_count": 2
        }
    },
    "meta": {
        "timestamp": "2026-05-31T14:49:50.815Z",
        "request_id": "b9bcfecb-8c1d-4a40-b5fd-787dd13e62ab"
    },
    "status": "ok",
    "message": "Module retrieved",
    "success": true
}
```

#### `GET /v1/provider` — Provider metadata

**Parameters:**
- `namespace` (query, required, string) — Provider namespace, e.g. hashicorp Example: `hashicorp`
- `name` (query, required, string) — Provider name, e.g. aws Example: `aws`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/terraform-api/v1/provider?namespace=hashicorp&name=aws"
```

**Response:**
```json
{
    "data": {
        "provider": {
            "id": "hashicorp/aws/6.47.0",
            "name": "aws",
            "tier": "official",
            "source": "https://github.com/hashicorp/terraform-provider-aws",
            "version": "6.47.0",
            "logo_url": "/images/providers/aws.png",
            "downloads": 6302881162,
            "namespace": "hashicorp",
            "description": "terraform-provider-aws",
            "published_at": "2026-05-27T23:13:05Z",
            "registry_url": "https://registry.terraform.io/providers/hashicorp/aws",
            "version_count": 489
        }
    },
    "meta": {
        "timestamp": "2026-05-31T14:49:51.105Z",
        "request_id": "dcd19e5d-d2bf-4d73-88fc-eedaafbdb11a"
    },
    "status": "ok",
    "message": "Provider retrieved",
    "success": true
}
```

#### `GET /v1/search` — Search modules

**Parameters:**
- `q` (query, required, string) — Search term Example: `vpc`
- `provider` (query, optional, string) — Filter by provider, e.g. aws
- `limit` (query, optional, string) — Results (1-50, default 20)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/terraform-api/v1/search?q=vpc"
```

**Response:**
```json
{
    "data": {
        "count": 20,
        "query": "vpc",
        "results": [
            {
                "id": "terraform-google-modules/project-factory/google/18.2.0",
                "name": "project-factory",
                "source": "https://github.com/terraform-google-modules/terraform-google-project-factory",
                "version": "18.2.0",
                "provider": "google",
                "verified": true,
                "downloads": 71083095,
                "namespace": "terraform-google-modules",
                "description": "Creates an opinionated Google Cloud project by using Shared VPC, IAM, and Google Cloud APIs",
                "registry_url": "https://registry.terraform.io/modules/terraform-google-modules/project-factory/google"
            },
            {
                "id": "terraform-aws-modules/vpc/aws/6.6.1",
                "name": "vpc",
                "source": "https://github.com/terraform-aws-modules/terraform-aws-vpc",
                "version": "6.6.1",
                "provider": "aws",
                "verified": false,
                "downloads": 188513802,
                "namespace": "terraform-aws-modules",
                "description": "Terraform module to create AWS VPC resources 🇺🇦",
                "registry_url": "https://registry.terraform.io/modules/terraform-aws-modules/vpc/aws"
            },
            {
                "id": "ViktorUJ/vpc/aws/1.1.0",
                "name": "vpc",
                "
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/versions` — Module version history

**Parameters:**
- `namespace` (query, required, string) — Module namespace, e.g. terraform-aws-modules Example: `terraform-aws-modules`
- `name` (query, required, string) — Module name, e.g. vpc Example: `vpc`
- `provider` (query, required, string) — Provider, e.g. aws Example: `aws`
- `limit` (query, optional, string) — Max versions (1-1000, default 100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/terraform-api/v1/versions?namespace=terraform-aws-modules&name=vpc&provider=aws"
```

**Response:**
```json
{
    "data": {
        "count": 100,
        "total": 240,
        "module": "terraform-aws-modules/vpc/aws",
        "versions": [
            "6.6.1",
            "6.6.0",
            "6.5.1",
            "6.5.0",
            "6.4.1",
            "6.4.0",
            "6.3.0",
            "6.2.0",
            "6.1.0",
            "6.0.1",
            "6.0.0",
            "5.21.0",
            "5.20.0",
            "5.19.0",
            "5.18.1",
            "5.18.0",
            "5.17.0",
            "5.16.0",
            "5.15.0",
            "5.14.0",
            "5.13.0",
            "5.12.1",
            "5.12.0",
            "5.11.0",
            "5.10.0",
            "5.9.0",
            "5.8.1",
            "5.8.0",
            "5.7.2",
            "5.7.1",
            "5.7.0",
            "5.6.0",
            "5.5.3",
            "5.5.2",
            "5.5.1",
            "5.5.0",
            "5.4.0",
            "5.3.0",
            "5.2.0",
            "5.1.2",
            "5.1.1",
            "5.1.0",
            "5.0.0",
            "4.0.2",
            "4.0.1",
            "4.0.0",
            "3.19.0",
            "3.18.1",
            "3.18.0",
            "3.17.0",
            "3.16.1",
            "3.16.0",
            "3.15.0",
            "3.14.4",
            "3.14.3",
            "3.14.2",
            "3.14.1",
            "3.14.0",
            "3.13.0",
            "3.12.0",
            "3.11.5",
            "3.11.4",
            "3.11.3",
            "
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Source & options

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/terraform-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Live Terraform Registry data. /v1/module = module metadata (version, downloads, source, input/output/resource counts) + a ready-to-paste usage block; /v1/versions = module version history; /v1/search = search modules (optional provider= filter); /v1/provider = provider metadata (version, downloads, tier). Modules are addressed by namespace+name+provider (e.g. terraform-aws-modules / vpc / aws).",
        "source": "Terraform Registry — the Terraform / OpenTofu module & provider registry (registry.terraform.io)",
        "endpoints": [
            "/v1/module",
            "/v1/versions",
            "/v1/search",
            "/v1/provider",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-05-31T14:49:51.543Z",
        "request_id": "7b013696-953c-4aa8-950d-7b732221831e"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/terraform-api
OpenAPI spec: https://www.oanor.com/api/terraform-api/openapi.json
