From 3b3d52206f1f7542e60d3846f47467568670f4b7 Mon Sep 17 00:00:00 2001 From: zzaebok <44357534+zzaebok@users.noreply.github.com> Date: Tue, 11 Feb 2025 10:12:38 +0900 Subject: [PATCH] community: change wikidata rest api version from v0 to v1 (#29708) **Description:** According to the [wikidata documentation](https://www.wikidata.org/wiki/Wikidata_talk:REST_API), Wikibase REST API version 1 (stable) is released from November 11, 2024. Their guide is to use the new v1 API and, it just requires replacing v0 in the routes with v1 in almost all cases. So I replaced WIKIDATA_REST_API_URL from v0 to v1 for stable usage. Co-authored-by: ccurme --- libs/community/langchain_community/utilities/wikidata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/utilities/wikidata.py b/libs/community/langchain_community/utilities/wikidata.py index 4e2e3c06977..f341826d5ff 100644 --- a/libs/community/langchain_community/utilities/wikidata.py +++ b/libs/community/langchain_community/utilities/wikidata.py @@ -70,7 +70,7 @@ DEFAULT_PROPERTIES = [ DEFAULT_LANG_CODE = "en" WIKIDATA_USER_AGENT = "langchain-wikidata" WIKIDATA_API_URL = "https://www.wikidata.org/w/api.php" -WIKIDATA_REST_API_URL = "https://www.wikidata.org/w/rest.php/wikibase/v0/" +WIKIDATA_REST_API_URL = "https://www.wikidata.org/w/rest.php/wikibase/v1/" class WikidataAPIWrapper(BaseModel):