cloudflare · Cloudflare Workers Docs
Workers Geolocation: Hello World
Demonstrates how to access and display geolocation data fields within a Cloudflare Worker using JavaScript, TypeScript, or Python.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Geolocation: Hello World
Demonstrates how to access and display geolocation data fields within a Cloudflare Worker using JavaScript, TypeScript, or Python.
When To Use
Use when you need to implement a Cloudflare Worker that retrieves and displays user location information such as country, city, or latitude and longitude in a web application.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-examples-geolocation-hello-world-workflow-guide.md | A markdown guide demonstrating how to retrieve and display geolocation data fields within a Cloudflare Worker. | Questions about a markdown guide demonstrating how to retrieve and display geolocation data fields within a Cloudflare Worker. |
examples/workers-examples-geolocation-hello-world-cloudflare-workers-geolocation-.text | A Cloudflare Workers script that uses the request.cf object to display geolocation data including country, city, and continent in an HTML response. | Exact payloads, commands, or snippets shown in A Cloudflare Workers script that uses the request.cf object to display geolocation data including country, city, and... |
examples/workers-examples-geolocation-hello-world-cloudflare-workers-geolocation--2.text | A JavaScript Cloudflare Worker script that extracts and displays geolocation data such as country, city, and continent from the request object. | Exact payloads, commands, or snippets shown in A JavaScript Cloudflare Worker script that extracts and displays geolocation data such as country, city, and continen... |
examples/workers-examples-geolocation-hello-world-cloudflare-workers-geolocation--3.text | A Python Worker script that uses the request.cf object to display the user's colocation, country, and city in an HTML response. | Exact payloads, commands, or snippets shown in A Python Worker script that uses the request.cf object to display the user's colocation, country, and city in an HTML... |
examples/workers-examples-geolocation-hello-world-cloudflare-workers-geolocation--4.text | A Hono-based Cloudflare Worker script that extracts and displays geolocation data from the request object. | Exact payloads, commands, or snippets shown in A Hono-based Cloudflare Worker script that extracts and displays geolocation data from the request object. |
What This Skill Covers
- Get all geolocation data fields and display them in HTML.
- 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/geolocation-hello-world
