Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers APIs

How to integrate Cloudflare Workers with third-party APIs using the Fetch API, including securing credentials with Wrangler secrets and optimizing requests with the Cache API.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers APIs

How to integrate Cloudflare Workers with third-party APIs using the Fetch API, including securing credentials with Wrangler secrets and optimizing requests with the Cache API.

When To Use

Use when you need to make HTTP requests to external services from a Worker, secure API keys using Wrangler secrets, or implement caching for third-party API responses.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-configuration-integrations-apis-workflow-guide.mdA guide explaining how to use the fetch API within Cloudflare Workers to integrate with third-party API endpoints.Questions about a guide explaining how to use the fetch API within Cloudflare Workers to integrate with third-party API endpoints.
examples/workers-configuration-integrations-apis-cloudflare-workers-api-fetch-req.textA JavaScript code snippet demonstrating how to use the fetch API within a Cloudflare Worker to request data from a third-party endpoint.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to use the fetch API within a Cloudflare Worker to request data from a th...
examples/workers-configuration-integrations-apis-cloudflare-workers-wrangler-secr.textA command line example demonstrating how to use the Wrangler CLI to set a secret in a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A command line example demonstrating how to use the Wrangler CLI to set a secret in a Cloudflare Workers environment.
examples/workers-configuration-integrations-apis-cloudflare-workers-api-environme.textA code snippet demonstrating how to access environment variables and secrets within a Cloudflare Workers script.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to access environment variables and secrets within a Cloudflare Workers script.

What This Skill Covers

  • To integrate with third party APIs from Cloudflare Workers, use the fetch API to make HTTP requests to the API endpoint. Then use the response data to modify...
  • Main sections: Authentication, Tips.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/configuration/integrations/apis