{"id":22194135,"url":"https://github.com/filiprokita/iplookup","last_synced_at":"2026-05-13T07:09:00.609Z","repository":{"id":252588077,"uuid":"840851471","full_name":"FilipRokita/iplookup","owner":"FilipRokita","description":"A Python-based tool that performs IP address lookups using multiple services. Includes a command-line script and a Flask web application for easy querying and result display.","archived":false,"fork":false,"pushed_at":"2025-03-04T23:50:01.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T00:28:11.788Z","etag":null,"topics":["api","cli","command-line-interface","flask","flask-app","geolocation","geolocation-services","ip-geolocation","ip-lookup","json","open-source","python","python-script","requests","web-application","web-development"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/FilipRokita.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":"2024-08-10T22:10:21.000Z","updated_at":"2025-03-04T23:50:04.000Z","dependencies_parsed_at":"2024-08-11T01:26:12.463Z","dependency_job_id":"ef855990-225f-4ed7-9bbd-78f266ccfcea","html_url":"https://github.com/FilipRokita/iplookup","commit_stats":null,"previous_names":["filiprokita/iplookup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FilipRokita%2Fiplookup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FilipRokita%2Fiplookup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FilipRokita%2Fiplookup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FilipRokita%2Fiplookup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FilipRokita","download_url":"https://codeload.github.com/FilipRokita/iplookup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245353855,"owners_count":20601441,"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":["api","cli","command-line-interface","flask","flask-app","geolocation","geolocation-services","ip-geolocation","ip-lookup","json","open-source","python","python-script","requests","web-application","web-development"],"created_at":"2024-12-02T13:11:33.825Z","updated_at":"2026-05-13T07:08:55.549Z","avatar_url":"https://github.com/FilipRokita.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IP Lookup\n\nThis project consists of a Python script and a web application to perform IP address lookups using various IP geolocation services. The IP lookup can be executed via command line or through a web interface.\n\n## Screenshot\n![Screenshot of the application](screenshot.png)\n\nThis screenshot shows how the IP Lookup looks when running.\n\n## Components\n\n1. **`iplookup.py`**: A Python script that queries multiple IP geolocation services and returns the results.\n2. **`index.html`**: A simple HTML page with a form to input an IP address and display the lookup results.\n3. **`app.py`**: A Flask web application that serves the HTML page and handles IP lookup requests by invoking the `iplookup.py` script.\n\n## Requirements\n\nYou can install the required Python libraries using pip:\n\n```bash\npip3 install -r requirements.txt\n```\n\n## Usage\n\n### Command Line\n\n1. **Basic Lookup**: \n\n   To lookup an IP address, run:\n\n   ```bash\n   python3 iplookup.py \u003cip-address\u003e\n   ```\n\n   This will output the results from all the geolocation services in JSON format.\n\n2. **Save to File**:\n\n   To save the results to a file named `ip_lookup_result.json`, use:\n\n   ```bash\n   python3 iplookup.py -s \u003cip-address\u003e\n   ```\n\n### Web Interface\n\n1. Start the Flask application:\n\n   ```bash\n   python3 app.py\n   ```\n\n2. Open your web browser and navigate to `http://localhost:5000`.\n\n3. Enter an IP address in the input field and click the \"Lookup\" button. The results will be displayed below the button.\n\n## File Details\n\n### `iplookup.py`\n\nThis script performs the IP lookup using various geolocation APIs. It defines a list of APIs and fetches information from each of them. The results are then printed or saved to a file based on the command-line arguments.\n\n### `index.html`\n\nThis is a static HTML file providing a user interface to input an IP address and view the lookup results. The page is styled for simplicity and ease of use.\n\n### `app.py`\n\nThis Flask application serves the HTML file and handles API requests. It calls the `iplookup.py` script to perform the IP lookup and returns the results as JSON.\n\n## Troubleshooting\n\n- **Error: IP address is required**: Ensure that you provide an IP address as a query parameter when using the web interface.\n- **Error running script**: Make sure `iplookup.py` is in the same directory as `app.py` and that it is executable.\n- **JSON decoding errors**: Verify that `iplookup.py` is generating valid JSON output.\n\n## Contributing\n\nFeel free to open issues or submit pull requests to improve the functionality or add more features. Contributions are welcome!\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\nFor any further questions or assistance, please feel free to contact the project maintainers. Happy IP lookup!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiliprokita%2Fiplookup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiliprokita%2Fiplookup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiliprokita%2Fiplookup/lists"}