BASE

Cloudflare Workers

Cloudflare Workers

A serverless backend and web API hosting · Free + paid

Runs a JavaScript/TypeScript backend on Cloudflare's network: APIs, webhook processing, and website server logic. It needs no continuously running server of your own.

Resource illustration: Cloudflare Workers

Open resource ↗

What you can use for free

Workers Free: 100 000 requests per day and 10 ms CPU per invocation for ordinary Workers.

Paid features and costs

Paid expands CPU/quotas; KV, D1, storage, and other services have their own limits/billing.

Access and limitations

Workers Free: 100 000 requests per day and 10 ms CPU per invocation for ordinary Workers. Paid expands CPU/quotas; KV, D1, storage, and other services have their own limits/billing.

Use cases

  • Publish a small API or webhook
  • Add server-side logic to a web application

Example workflow

A possible workflow; this is not a report of hands-on testing.

Example workflow with Cloudflare Workers: Publish a small API or webhook.

Before you start

  • One endpoint or webhook: a sample request, data schema, and expected response.
  • Access rules, error handling, and an environment for server logic.
  • From the tech stack mentioned on this page, choose an option that suits your project: JavaScript, TypeScript; check version compatibility in the documentation.

Steps

  1. For the task “Publish a small API or webhook”: implement a minimal handler with input validation and an explicit response.
  2. Connect one real client and test a successful request and an error.
  3. Assess repeat calls, runtime limits, and load before expanding the API.

Check your result

  • Invalid requests do not break the handler; the response follows the contract.
  • Secrets stay on the server side; check quotas and package compatibility for the selected environment.

Choosing Cloudflare Workers

Publish a small API or webhook

Choose this when

  • Publish a small API or webhook
  • Add server-side logic to a web application

Things to consider

  • Costs and limits of free use: Paid expands CPU/quotas; KV, D1, storage, and other services have their own limits/billing.
  • Terms of use: A cloud service under Cloudflare Terms; runtime/CLI and dependencies have separate licenses.
  • The Workers CPU quota differs from the Workers AI quota: AI includes 10 000 Neurons per day for free; exceeding the quota requires Workers Paid, and some models require a payment method for paid usage.
  • Static assets are free, but Workers Caching responses are billed as requests; CPU is charged only when the Worker runs.

Frequently asked questions

What can you use for free in Cloudflare Workers?

Workers Free: 100 000 requests per day and 10 ms CPU per invocation for ordinary Workers.

What additional costs might arise with Cloudflare Workers?

Paid expands CPU/quotas; KV, D1, storage, and other services have their own limits/billing.

What terms of use matter for Cloudflare Workers?

A cloud service under Cloudflare Terms; runtime/CLI and dependencies have separate licenses.

Which environment can you use Cloudflare Workers in?

Tech stack: TypeScript, JavaScript.

How do you get started with Cloudflare Workers?

For the task “Publish a small API or webhook”: implement a minimal handler with input validation and an explicit response. Connect one real client and test a successful request and an error. Assess repeat calls, runtime limits, and load before expanding the API.

What should you consider when choosing Cloudflare Workers?

The Workers runtime differs from a standard Node.js server process; check package compatibility.

How do CPU, requests, and waiting time differ in Workers billing?

The table distinguishes incoming requests from CPU time: Free includes 100 000 requests per day and 10 ms of CPU per invocation. Execution time is not billed as duration; outgoing subrequests are not included in request billing. Use Wrangler or the dashboard to limit CPU per invocation.

Tech stack

  • TypeScript
  • JavaScript

License

A cloud service under Cloudflare Terms; runtime/CLI and dependencies have separate licenses.

Proprietary terms — the vendor determines your rights

Use of the software or service is governed by its Terms/EULA and the chosen plan. Free access does not automatically grant rights to modify and distribute source code, resell assets, or use outputs commercially. The specific product's terms define permitted use, export, and commercial rights.

Usage details

Workers runtime differs from an ordinary Node.js server process; check package compatibility. Workers CPU quotas and Workers AI quotas differ: AI includes 10 000 free Neurons per day; usage above that quota requires Workers Paid, and some models require a payment method for paid usage.

Technologies and topics

  • Serverless
  • JavaScript
  • TypeScript
  • Workers
  • Webhooks

Sources

Other resources