{"id":35735933,"url":"https://github.com/miksyr/entity_search_engines","last_synced_at":"2026-01-06T13:00:16.747Z","repository":{"id":46567071,"uuid":"320666089","full_name":"miksyr/entity_search_engines","owner":"miksyr","description":"Entity search engines for Google and Wikidata.  Helping to link the two together and provide a way to ground entities","archived":false,"fork":false,"pushed_at":"2021-10-05T14:55:14.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-04T13:16:09.036Z","etag":null,"topics":["entity","entity-grounding","entity-linking","entity-search-engines"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miksyr.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}},"created_at":"2020-12-11T19:32:34.000Z","updated_at":"2021-12-09T23:30:17.000Z","dependencies_parsed_at":"2022-08-26T03:51:52.733Z","dependency_job_id":null,"html_url":"https://github.com/miksyr/entity_search_engines","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/miksyr/entity_search_engines","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miksyr%2Fentity_search_engines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miksyr%2Fentity_search_engines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miksyr%2Fentity_search_engines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miksyr%2Fentity_search_engines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miksyr","download_url":"https://codeload.github.com/miksyr/entity_search_engines/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miksyr%2Fentity_search_engines/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28217978,"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":"2026-01-05T02:00:06.358Z","response_time":57,"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":["entity","entity-grounding","entity-linking","entity-search-engines"],"created_at":"2026-01-06T13:00:01.201Z","updated_at":"2026-01-06T13:00:16.735Z","avatar_url":"https://github.com/miksyr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Entity Search Engines\n\nThis package provides classes that wrap the Google Knowledge Graph API and the Wikidata API.\n\nIt provides;  \n* `search_for_entity` functions for both of these knowledge bases, for when you need to do a text search for entities with unknown Google/Wikidata ids.\n* `get_entity` functions for both knowledge bases for when you know the IDs for an entity and want to pull more information.\n\n## Installation\n```pip install entity_search_engines```\n\n## Usage\n\nThere are some slight differences when using either the Google or Wikidata engines.\n* Both engines will attempt to retrieve both IDs for an entity.  For example, when using the Google search class, it'll also attempt to fill in the WikiID for the returned entity class.  However, sometimes this mapping isn't available and it would be up to the user to resolve this by using both engines.\n* Descriptions will only be filled in for the engine type that has been used.  (i.e. the Google engine will only fill out the \"googleDescription\" for an entity and not the \"wikidataDescription\").\n* The wikidata API currently returns many more surface forms than the Google API (as Google doesn't seem to provide that information).\n\nMerging both classes into a single class that does everything would seem like a good idea, but entangling functionalities could create more problems than it solves.\n\n### Google API\n```\nfrom entity_search_engines import GoogleEntityEngine\n\ngoogleSearchEngine = GoogleEntityEngine(apiKey=API_KEY)\n\nsearchResults = googleSearchEngine.search_for_entity(\n    query='Liverpool', \n    types=['SportsTeam'],\n    limit=3\n)\n\nprint(searchResults[0])  # this is an 'Entity' class\n\n\nEntity(\"Liverpool F.C.\", type: SportsTeam|Corporation|Organization|Thing, qid: Q1130849, googleId: /m/04ltf, entitySource: Google)\nsurfaceForms: ['Liverpool F.C.']\ngoogleDescription: Liverpool Football Club is a professional football club in Liverpool, England, that competes in the Premier League, the top tier of English football. \nwikidataDescription: None\nwikiUrl: https://wikidata.org/wiki/Q1130849\ngoogleUrl: https://www.google.com/search?q=Liverpool%20F.C.\n```\n\nSimilarly, the `googleSearchEngine.get_entity(googleId=GOOGLE_ID)` can be used to retrieve an Entity class containing relevant information.\n\n### Wikidata API\n```\nfrom entity_search_engines import WikidataEntityEngine\n\nwikidataSearchEngine = WikidataEntityEngine()\n\nsearchResults = wikidataSearchEngine.search_for_entity(\n    query='Liverpool FC'\n)\n\nprint(searchResults[0])  # this is an 'Entity' class\n\n\nEntity(\"Liverpool F.C.\", type: None, qid: Q1130849, googleId: /m/04ltf, entitySource: wikidata)\nsurfaceForms: ['Liverpool Football Club', 'Liverpool FC', 'Liverpool', 'The Reds', 'LFC']\ngoogleDescription: None\nwikidataDescription: association football club in Liverpool, England\nwikiUrl: https://wikidata.org/wiki/Q1130849\ngoogleUrl: https://www.google.com/search?q=Liverpool%20F.C.\n```\n\nSimilarly, the `wikidataSearchEngine.get_entity(wikiId=WIKI_ID)` can be used to retrieve an Entity class containing relevant information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiksyr%2Fentity_search_engines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiksyr%2Fentity_search_engines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiksyr%2Fentity_search_engines/lists"}