BYTETOOLS

Terraform Registry API

Query the public Terraform Registry for modules and providers, with versions, download counts and source repositories. No API key. Verified example included.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 21 Aug 2026

What is the Terraform Registry API?

The Terraform Registry has a documented public API. `GET https://registry.terraform.io/v1/modules?limit=2` lists published modules with their namespace, provider, version, source repository and download count. No API key or HashiCorp account is required for public reads.

Module identity in Terraform is a four-part coordinate, `namespace/name/provider/version`, and the API returns it pre-joined in the `id` field as well as broken into components. That is more helpful than it sounds, because the `source` argument in a Terraform configuration wants the first three parts joined with slashes while your UI probably wants them separate. Both forms in one response saves a round of string surgery.

The `verified` flag deserves attention if you are building anything that recommends modules. It means HashiCorp has confirmed the publisher, not that the module is audited, maintained or safe. Combine it with `published_at` and `downloads` to form a real judgement. Paging is offset-based and the response hands you a ready-made `meta.next_url`, so following the cursor is easier than constructing it.

Quick facts

Base URL
https://registry.terraform.io/v1
Authentication
Public modules and providers need no token. Private registries under Terraform Cloud require a bearer token, which is a separate API.
Rate limit
Not published for the public registry. Terraform's own CLI uses these endpoints, so behave like a well-mannered client and cache.
Pricing
Free for the public registry.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the Terraform Registry API

Every request below was executed against the live API on 21 Aug 2026, and the response shown is the real body it returned — not an illustration.

1. List published Terraform modules

GET https://registry.terraform.io/v1/modules?limit=2

curl
curl 'https://registry.terraform.io/v1/modules?limit=2'
JavaScript (fetch)
const res = await fetch("https://registry.terraform.io/v1/modules?limit=2");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://registry.terraform.io/v1/modules?limit=2", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "meta": {
    "limit": 2,
    "current_offset": 0,
    "next_offset": 2,
    "next_url": "https://registry.terraform.io/v1/modules?limit=2&offset=2"
  },
  "modules": [
    {
      "id": "GoogleCloudPlatform/lb-http/google/14.2.0",
      "owner": "",
      "namespace": "GoogleCloudPlatform",
      "name": "lb-http",
      "version": "14.2.0",
      "provider": "google",
      "provider_logo_url": "/images/providers/google-cloud.svg",
      "description": "Creates a global HTTP load balancer for Compute Engine by using forwarding rules",
      "source": "https://github.com/terraform-google-modules/terraform-google-lb-http",
      "tag": "v14.2.0",
      "published_at": "2026-01-15T00:10:36.13339Z",
      "downloads": 11391763,
      "verified": true
    },
    {
      "id": "GoogleCloudPlatform/managed-instance-group/google/1.1.15",
      "owner": "",
      "namespace": "GoogleCloudPlatform",
      "name": "managed-instance-group",
      "version": "1.1.15",
      "provider": "google",
      "provider_logo_url": "/images/providers/google-cloud.svg",
      "description": "Modular Google Compute Engine managed instance group for Terraform.",
      "source": "https://github.com/GoogleCloudPlatform/terraform-google-managed-instance-group",
      "tag": "1.1.15",
      "published_at": "2019-02-14T16:55:26.567562Z",
      "downloads": 179084,
      "verified": true
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
limitintegerOptionalResults per page, up to the registry's maximum. 2
offsetintegerOptionalZero-based offset for paging. `meta.next_offset` gives you the next value. 2
providerstringOptionalFilter to modules for one provider, such as `aws`, `google` or `azurerm`. aws
verifiedbooleanOptionalRestrict results to publisher-verified modules. true
/v1/modules/searchpathOptionalSearch endpoint accepting a `q` parameter for free-text queries. ?q=vpc

Response fields

metaobject
Paging state: `limit`, `current_offset`, `next_offset` and a prepared `next_url`. Follow `next_url` rather than building the query yourself.
modules[].idstring
Full coordinate `namespace/name/provider/version`. Strip the version to get the value for a Terraform `source` argument.
modules[].namespace / name / provider / versionstring
The coordinate split into parts. `provider` is the cloud the module targets, not the publisher.
modules[].sourcestring
Repository URL, almost always GitHub. This is where the code actually lives.
modules[].downloadsinteger
Cumulative download count. Useful as a popularity proxy, though it heavily favours older modules.
modules[].verifiedboolean
HashiCorp has verified the publisher. It is not a security or quality audit; treat it as identity only.
modules[].published_atstring
ISO 8601 publication timestamp of that version. Pair it with `downloads` to spot popular but stale modules.
modules[].ownerstring
Frequently an empty string rather than null, so test for emptiness, not for absence.

What you can build with the Terraform Registry API

  • Check whether a module you depend on has a newer version before an upgrade
  • Build an internal catalogue of approved Terraform modules
  • Flag modules that have not been published to in years during an infrastructure review
  • Resolve a module name to its source repository for a code review
  • Compare module popularity when choosing between competing implementations

Common errors and how to fix them

404

The module path is wrong. The registry needs all three coordinate parts.

Fix: Use `/v1/modules/{namespace}/{name}/{provider}` for a specific module; two parts will not resolve.

Empty results with a provider filter

`provider` means the target cloud, not the publisher.

Fix: Filter on `aws` or `google`, not on the organisation that published the module.

Paging never advances

You reused the same `offset` value.

Fix: Read `meta.next_offset`, or simply request `meta.next_url`, which already carries the correct query string.

Terraform Registry API — frequently asked questions

Does the Terraform Registry API need a token?

Not for the public registry. Anonymous GET requests return modules and providers. Private registries in Terraform Cloud are a separate, authenticated API.

What does the verified flag actually mean?

That HashiCorp confirmed who publishes the module. It says nothing about code quality, maintenance or security, so do not present it as an endorsement.

How do I get the download URL for a module version?

The version endpoint returns a `X-Terraform-Get` header pointing at the source archive. For most purposes the `source` repository URL in the listing is what you want.

Can I query providers as well as modules?

Yes. `/v1/providers` mirrors the module endpoints and returns provider metadata, versions and supported platforms.

Tools that pair with this API

Alternatives to Terraform Registry API

If Terraform Registry does not fit, these developer & testing apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.

APIWhat it doesAuthCORSLast verified
GitHub REST APIGitHub REST API with no key for public data: repository details, users, issues, releases and commits. 60 req/hour unauthenticated, 5,000 with a token.No keyYes19 Aug 2026
JSONPlaceholderFree fake REST API for testing and prototyping. Posts, comments, users and todos with full GET, POST, PUT and DELETE support. No key. Real curl examples.No keyYes19 Aug 2026
Postman EchoPostman Echo reflects your HTTP request back as JSON: headers, body, query params and auth. Free, no key, ideal for debugging clients. Real POST example.No keyNo19 Aug 2026
DummyJSONFree fake REST API with realistic products, users, carts, recipes and auth. Supports search, pagination, sorting and POST. No key. Tested GET and POST examples.No keyYes19 Aug 2026
unpkgFree unpkg CDN with no key: fetch any file from any npm package by URL, including package.json, with version ranges and directory listings. Tested example.No keyYes20 Aug 2026
UUID Tools APIFree UUID generator API with no key. Generate v1, v3, v4 and v5 UUIDs in bulk over HTTP. Tested curl example, live response and guidance on when to use it.No keyYes19 Aug 2026
All Developer & Testing APIs

Terraform Registry is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 21 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.