Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Fetch JSON

Demonstrates how to perform a GET request and parse the resulting JSON response within a Cloudflare Worker using JavaScript, TypeScript, Python, or Hono.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Fetch JSON

Demonstrates how to perform a GET request and parse the resulting JSON response within a Cloudflare Worker using JavaScript, TypeScript, Python, or Hono.

When To Use

Use when you need to implement a Cloudflare Worker that retrieves and processes external data from a JSON API endpoint.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-examples-fetch-json-workflow-guide.mdA markdown guide demonstrating how to send a GET request and parse a JSON response within a Cloudflare Worker.Questions about a markdown guide demonstrating how to send a GET request and parse a JSON response within a Cloudflare Worker.
examples/workers-examples-fetch-json-cloudflare-workers-fetch-json.textA JavaScript code example demonstrating how to fetch and parse a JSON response within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to fetch and parse a JSON response within a Cloudflare Worker.
examples/workers-examples-fetch-json-cloudflare-workers-fetch-json-2.textA Cloudflare Workers script demonstrating how to fetch a JSON resource and extract both the content-type header and the response body.Exact payloads, commands, or snippets shown in A Cloudflare Workers script demonstrating how to fetch a JSON resource and extract both the content-type header and t...
examples/workers-examples-fetch-json-cloudflare-workers-python-fetch-json.textA Python implementation for a Cloudflare Worker that fetches and processes a JSON response from an external API.Exact payloads, commands, or snippets shown in A Python implementation for a Cloudflare Worker that fetches and processes a JSON response from an external API.
examples/workers-examples-fetch-json-cloudflare-workers-fetch-json-hono.textA TypeScript example using the Hono framework to fetch and parse JSON data from an external API within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A TypeScript example using the Hono framework to fetch and parse JSON data from an external API within a Cloudflare W...

What This Skill Covers

  • Send a GET request and read in JSON from the response. Use to fetch external data.
  • Main sections: Tags.

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/examples/fetch-json