{"id":50788208,"url":"https://github.com/peterbenoit/weather-data-api","last_synced_at":"2026-06-12T09:32:43.338Z","repository":{"id":357564418,"uuid":"868582176","full_name":"peterbenoit/weather-data-api","owner":"peterbenoit","description":"This repository provides a Node.js-based proxy for the OpenWeather API. It allows you to fetch current weather or forecast data by providing either latitude and longitude coordinates or a city name as a query parameter. The proxy adds CORS headers and handles requests to both the current weather and forecast endpoints of the OpenWeather API.","archived":false,"fork":false,"pushed_at":"2024-10-07T14:22:43.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-13T10:49:33.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://weather-data-api-nine.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterbenoit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-06T18:39:20.000Z","updated_at":"2024-11-19T11:41:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/peterbenoit/weather-data-api","commit_stats":null,"previous_names":["peterbenoit/weather-data-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/peterbenoit/weather-data-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterbenoit%2Fweather-data-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterbenoit%2Fweather-data-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterbenoit%2Fweather-data-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterbenoit%2Fweather-data-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterbenoit","download_url":"https://codeload.github.com/peterbenoit/weather-data-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterbenoit%2Fweather-data-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34238713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-06-12T09:32:42.583Z","updated_at":"2026-06-12T09:32:43.334Z","avatar_url":"https://github.com/peterbenoit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weather API Proxy\n\nThis repository provides a Node.js-based proxy for the OpenWeather API. It allows you to fetch current weather or forecast data by providing either latitude and longitude coordinates or a city name as a query parameter. The proxy adds CORS headers and handles requests to both the current weather and forecast endpoints of the OpenWeather API.\n\n## Features\n\n-   Supports querying weather data using either:\n    -   Latitude and longitude (`lat` and `lon`)\n    -   City name (`q`)\n-   Fetches both current weather and forecast data based on the `type` query parameter (`weather` by default, `forecast` for 5-day forecast).\n-   Adds CORS headers to allow cross-origin requests.\n-   Handles errors and provides clear error messages for invalid inputs or API issues.\n\n## Requirements\n\n-   Node.js (\u003e=14.x)\n-   OpenWeather API key\n\n## Environment Variables\n\n-   `OPENWEATHER_API_KEY`: Your OpenWeather API key, required to access the weather data.\n\n## Installation\n\n### 1. Download or Clone the Repository\n\nYou can download this repository as a ZIP file, or clone it using Git:\n\n**Download as ZIP:**\n\n-   [Download ZIP](https://github.com/your-username/weather-api-proxy/archive/refs/heads/main.zip)\n\n**Clone the repository:**\n\n```bash\ngit clone https://github.com/your-username/weather-api-proxy.git\ncd weather-api-proxy\n```\n\n### 2. Install dependencies\n\n```bash\nnpm install\n```\n\n### 3. Create a `.env` file in the project root and add your OpenWeather API key:\n\n```\nOPENWEATHER_API_KEY=your_api_key_here\n```\n\n### 4. Start the server:\n\n```bash\nnpm start\n```\n\n## Usage\n\nOnce the server is running, you can make GET requests to the proxy endpoint.\n\n### Query Parameters\n\n-   `lat`: Latitude coordinate for weather data.\n-   `lon`: Longitude coordinate for weather data.\n-   `q`: City name for weather data.\n-   `type`: Type of data to fetch (`weather` or `forecast`).\n\n## Example Request\n\n```\nGET /api/weather?lat=35\u0026lon=139\u0026type=forecast\n```\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterbenoit%2Fweather-data-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterbenoit%2Fweather-data-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterbenoit%2Fweather-data-api/lists"}