{"id":31831270,"url":"https://github.com/raphaelsty/kgsearch","last_synced_at":"2025-10-11T21:48:59.862Z","repository":{"id":114280596,"uuid":"523581432","full_name":"raphaelsty/kgsearch","owner":"raphaelsty","description":"Query and visualize knowledge graphs","archived":false,"fork":false,"pushed_at":"2025-03-21T12:57:46.000Z","size":6314,"stargazers_count":59,"open_issues_count":1,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T19:23:54.470Z","etag":null,"topics":["3d-graph","graph","information-retrieval","knowledge-graph","visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","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/raphaelsty.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":"2022-08-11T04:09:05.000Z","updated_at":"2025-09-26T14:12:54.000Z","dependencies_parsed_at":"2023-07-16T03:01:07.158Z","dependency_job_id":null,"html_url":"https://github.com/raphaelsty/kgsearch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/raphaelsty/kgsearch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsty%2Fkgsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsty%2Fkgsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsty%2Fkgsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsty%2Fkgsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphaelsty","download_url":"https://codeload.github.com/raphaelsty/kgsearch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsty%2Fkgsearch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008823,"owners_count":26084518,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"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":["3d-graph","graph","information-retrieval","knowledge-graph","visualization"],"created_at":"2025-10-11T21:48:54.545Z","updated_at":"2025-10-11T21:48:59.857Z","avatar_url":"https://github.com/raphaelsty.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eKGSearch\u003c/h1\u003e\n\u003c/div\u003e\n\n![](kgsearch.gif)\n\nKGSearch is a minimalist tool for searching and viewing entities in a graph and is dedicated to a local environment. The application provides a Python client with three distinct terminal commands: `add, start, open`. The application default proposes to search through the knowledge graph [Countries](https://www.aaai.org/ocs/index.php/SSS/SSS15/paper/view/10257/10026). You can explore the borders we must cross to get from one country to another and see how small the 🌍 is.\n\n## Installation\n\n```sh\npip install git+https://github.com/raphaelsty/kgsearch\n```\n\n## ✅ Quick Start\n\nThe `start` command starts the API and opens the user interface:\n\n```sh\nkg start\n```\n\n## ⭐️ Query\n\nKGSearch suggests performing multiple queries via the `;` separator.\n\nThe query `france;germany;china` will be divided into three subqueries `france`, `germany`, and `china` to visualize the interactions between the entities of our choice.\n\nThe `top K` field allows selecting the number of candidate entities retrieved by the search engine (1 by default).\n\nThe `neighbours` field selects the number of neighbors to be displayed (1 by default).\n\nThe `prune` field removes entities that have fewer than `prune` connections to other entities (1 by default).\n\n## 🤖 Custom KG\n\nWe can add our graph to KGSearch via the command:\n\n```sh\nkg add -f data.csv\n```\n\nThe graph must be saved in CSV format and structured as triples (head, relation, tail) with a comma separator and without column names. Here is an example of a compatible CSV file:\n\n```sh\nsenegal,neighbor,gambia\nsenegal,neighbor,mauritania\nsenegal,neighbor,mali\nsenegal,neighbor,guinea-bissau\nsenegal,neighbor,guinea\n```\n\nWe can also add custom metadata for each entity to be displayed in the user interface using `meta -f`:\n\n```sh\nkg meta -f metadata.json\n```\n\nwhere the `metadata.json` file has the label of the entity as a key and a set of characteristics:\n\n```json\n{\n  \"senegal\": {\"url\": \"https://en.wikipedia.org/wiki/senegal\"},\n  \"gambia\": {\"url\": \"https://en.wikipedia.org/wiki/gambia\"},\n  \"mauritania\": {\"url\": \"https://en.wikipedia.org/wiki/gambia\"},\n  \"mali\": {\"url\": \"https://en.wikipedia.org/wiki/mali\"},\n}\n```\n\n## 📑 Notes\n\nIf you have already started the application, you can reopen a window with the open command:\n\n```sh\nkg open\n```\n\nThe library [Cherche](https://github.com/raphaelsty/cherche) provides the entity search engine. KGSearch relies on a local flask API. The user interface is developed in React and uses the [3D Force-Directed Graph](https://github.com/vasturiano/3d-force-graph) library.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaelsty%2Fkgsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphaelsty%2Fkgsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaelsty%2Fkgsearch/lists"}