{"id":28286086,"url":"https://github.com/mrdevanony/ipinfobot","last_synced_at":"2025-07-27T20:40:50.585Z","repository":{"id":271129581,"uuid":"912470771","full_name":"MrDevAnony/IPinfoBot","owner":"MrDevAnony","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-05T17:52:21.000Z","size":5,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T20:11:42.932Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/MrDevAnony.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-05T17:02:24.000Z","updated_at":"2025-05-19T22:59:24.000Z","dependencies_parsed_at":"2025-01-05T18:37:24.735Z","dependency_job_id":null,"html_url":"https://github.com/MrDevAnony/IPinfoBot","commit_stats":null,"previous_names":["mrdevanony/ipinfobot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MrDevAnony/IPinfoBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrDevAnony%2FIPinfoBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrDevAnony%2FIPinfoBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrDevAnony%2FIPinfoBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrDevAnony%2FIPinfoBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrDevAnony","download_url":"https://codeload.github.com/MrDevAnony/IPinfoBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrDevAnony%2FIPinfoBot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260461849,"owners_count":23012989,"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":[],"created_at":"2025-05-21T20:11:36.440Z","updated_at":"2025-07-27T20:40:50.568Z","avatar_url":"https://github.com/MrDevAnony.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram Bot for IP Information Lookup\n\nThis project is a Telegram bot designed to provide detailed information about a given IP address (IPv4 or IPv6). The bot leverages the [IPInfo.io](https://ipinfo.io/) API to fetch geographical and network-related data. It is built to run seamlessly on [Cloudflare Workers](https://workers.cloudflare.com/), making it a cost-effective and scalable solution.\n\n## Features\n- Accepts IP addresses (both IPv4 and IPv6) from users.\n- Returns detailed information about the IP address, including:\n  - City\n  - Region\n  - Country\n  - Location (Latitude and Longitude)\n  - Organization\n  - Postal Code\n  - Timezone\n- Supports `/start` command to provide an introduction to the bot.\n- Provides meaningful error messages for invalid or unrecognized inputs.\n- Leverages the **IPInfo.io API** to fetch accurate and up-to-date IP data.\n\n## How It Works\n1. The bot receives messages from users via Telegram.\n2. It validates the input to ensure it matches an IP address format.\n3. If valid, it queries the [IPInfo.io API](https://ipinfo.io/) to retrieve information about the IP.\n4. The bot formats the data and sends it back to the user in a readable format.\n\n## Deployment on Cloudflare Workers\nThis bot is optimized for deployment on Cloudflare Workers. Here's why Cloudflare Workers is a great fit:\n- **Free Tier:** Cloudflare Workers offers a generous free tier, making it a cost-effective hosting option.\n- **Global Edge Network:** Responses are served with low latency thanks to Cloudflare's global network.\n- **Ease of Deployment:** The bot's code is written in JavaScript, which integrates seamlessly with Cloudflare Workers.\n\n### Installation and Deployment\n\n#### 1. Clone the Repository\n   ```bash\n   git clone https://github.com/MrDevAnony/IPinfoBot.git\n   cd IPinfoBot\n   ```\n#### 2. Set up environment variables for security:\n  1. TELEGRAM_API_TOKEN: Your Telegram bot token.\n  2. IPINFO_TOKEN: Your token from IPInfo.io.\n  \n### 3. Deploy to Cloudflare Workers\n1. install [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/):\n```bash\nnpm install -g wrangler\n```\n2. Authenticate with Cloudflare:\n```bash\nwrangler login\n```\n3. Deploy the bot:\n```bash\nwrangler publish\n```\nNote the generated Worker URL and set it as your bot's webhook using the following command:\n```bash\ncurl -X POST \"https://api.telegram.org/bot\u003cYOUR_BOT_TOKEN\u003e/setWebhook?url=\u003cYOUR_WORKER_URL\u003e\"\n```\nDone!\n\n---\n\n## Cloudflare Workers Benefits\n\n- **Free Plan**: Cloudflare Workers provides 100,000 free requests per day.\n- **Scalability**: Automatically scales with traffic.\n- **Low Latency**: Serves requests from the edge, ensuring fast responses globally.\n- **No Server Management**: Eliminate the need for managing servers or infrastructure.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdevanony%2Fipinfobot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrdevanony%2Fipinfobot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdevanony%2Fipinfobot/lists"}