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.
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
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-examples-fetch-json-workflow-guide.md | A 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.text | A 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.text | A 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.text | A 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.text | A 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
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - 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
