{"id":13582910,"url":"https://github.com/DavidJKTofan/cloudflare-radar-api-geojson","last_synced_at":"2025-04-06T17:32:34.037Z","repository":{"id":170929621,"uuid":"647214267","full_name":"DavidJKTofan/cloudflare-radar-api-geojson","owner":"DavidJKTofan","description":"Cloudflare Workers which uses the Cloudflare API to fetch data from multiple Cloudflare RADAR endpoints and returns the results as GeoJSON.","archived":false,"fork":false,"pushed_at":"2023-09-03T20:59:12.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T05:09:58.305Z","etag":null,"topics":["cloudflare-api","cloudflare-radar","cloudflare-workers","geojson"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavidJKTofan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-30T09:52:40.000Z","updated_at":"2023-06-06T19:07:39.000Z","dependencies_parsed_at":"2023-09-25T02:10:29.589Z","dependency_job_id":null,"html_url":"https://github.com/DavidJKTofan/cloudflare-radar-api-geojson","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"d0c56791dd706432052988e618231a9af501a6a8"},"previous_names":["davidjktofan/cloudflare-radar-api-geojson"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidJKTofan%2Fcloudflare-radar-api-geojson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidJKTofan%2Fcloudflare-radar-api-geojson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidJKTofan%2Fcloudflare-radar-api-geojson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidJKTofan%2Fcloudflare-radar-api-geojson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidJKTofan","download_url":"https://codeload.github.com/DavidJKTofan/cloudflare-radar-api-geojson/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247522767,"owners_count":20952619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare-api","cloudflare-radar","cloudflare-workers","geojson"],"created_at":"2024-08-01T15:03:07.172Z","updated_at":"2025-04-06T17:32:30.418Z","avatar_url":"https://github.com/DavidJKTofan.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"## Cloudflare Workers for Cloudflare RADAR API\n\nCloudflare Workers which uses the Cloudflare API to fetch data from multiple Cloudflare RADAR endpoints and returns the results as a GeoJSON.\n\nAlternative JSON Output: https://github.com/DavidJKTofan/cloudflare-radar-api\n\n### GeoJSON\n\nDisplay the output on [geojson.io](https://geojson.io/).\n\n### Get Started\n\n- Replace the `YOUR_ACCOUNT_ID` with your Cloudflare Account ID in the `wrangler.toml` file.\n\n- Replace `'YOUR_API_TOKEN'` with your actual Cloudflare API token in the `worker.js` file.\n\n- Replace `'YOUR_AUTH_EMAIL'` with your Cloudflare account email in the `worker.js` file.\n\n#### Example Output\n\nUsing the parameters `7d` and `DE`:\n\n```\n{\n  \"type\": \"FeatureCollection\",\n  \"features\": [\n    {\n      \"type\": \"Feature\",\n      \"properties\": {\n        \"country\": \"DE\",\n        \"layer7Summary\": {\n          \"ddos\": \"48.1448\",\n          \"waf\": \"41.76143\",\n          \"ip_reputation\": \"7.052715\",\n          \"access_rules\": \"2.478033\",\n          \"bot_management\": \"0.563022\",\n          \"api_shield\": \"0.0\",\n          \"data_loss_prevention\": \"0.0\"\n        },\n        \"layer7OriginLocations\": [\n          {\n            \"originCountryName\": \"United States\",\n            \"originCountryAlpha2\": \"US\",\n            \"value\": \"33.88264\",\n            \"rank\": 1\n          },\n          {\n            \"originCountryName\": \"Germany\",\n            \"originCountryAlpha2\": \"DE\",\n            \"value\": \"7.412015\",\n            \"rank\": 2\n          },\n          {\n            \"originCountryName\": \"India\",\n            \"originCountryAlpha2\": \"IN\",\n            \"value\": \"4.154708\",\n            \"rank\": 3\n          },\n          {\n            \"originCountryName\": \"United Kingdom\",\n            \"originCountryAlpha2\": \"GB\",\n            \"value\": \"3.918962\",\n            \"rank\": 4\n          },\n          {\n            \"originCountryName\": \"China\",\n            \"originCountryAlpha2\": \"CN\",\n            \"value\": \"3.591646\",\n            \"rank\": 5\n          }\n        ],\n        \"botClassSummary\": {\n          \"bot\": \"54.38295\",\n          \"human\": \"45.61705\"\n        },\n        \"deviceTypeSummary\": {\n          \"desktop\": \"76.327628\",\n          \"mobile\": \"23.641822\",\n          \"other\": \"0.03055\"\n        },\n        \"httpVersionSummary\": {\n          \"HTTP/1.x\": \"45.193363\",\n          \"HTTP/2\": \"42.09331\",\n          \"HTTP/3\": \"12.713327\"\n        }\n      },\n      \"geometry\": {\n        \"type\": \"Point\",\n        \"coordinates\": [\n          10.4478313,\n          51.1638175\n        ]\n      }\n    }\n  ]\n}\n```\n\n### Endpoints\n\nThis project fetches data from the following [Cloudflare API endpoints](https://developers.cloudflare.com/api/):\n\n- `attacks/layer7/summary`: Provides a summary of Layer 7 attacks.\n\n- `attacks/layer7/top/locations/origin`: Lists the top locations of Layer 7 attacks by origin.\n\n- `http/summary/bot_class`: Provides a summary of HTTP requests by bot class.\n\n- `http/summary/device_type`: Provides a summary of HTTP requests by device type.\n\n- `http/summary/http_version`: Provides a summary of HTTP requests by HTTP version.\n\nEach endpoint is fetched individually, and the responses are combined and returned as a JSON object.\n\n## Contributing\n\nContributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDavidJKTofan%2Fcloudflare-radar-api-geojson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDavidJKTofan%2Fcloudflare-radar-api-geojson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDavidJKTofan%2Fcloudflare-radar-api-geojson/lists"}