{"id":30297244,"url":"https://github.com/zeroone3010/yetanotherwikidataapi","last_synced_at":"2025-08-17T03:53:14.985Z","repository":{"id":197763345,"uuid":"695063701","full_name":"ZeroOne3010/yetanotherwikidataapi","owner":"ZeroOne3010","description":"The Wikidata (Wikibase) API exposed as a Kotlin library.","archived":false,"fork":false,"pushed_at":"2023-10-09T11:25:29.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-10-09T12:31:44.628Z","etag":null,"topics":["kotlin-library","wikidata","wikidata-api"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZeroOne3010.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-22T09:19:49.000Z","updated_at":"2023-10-02T12:17:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"eccf72e0-0771-4ad1-bd4e-a2bb0c06c728","html_url":"https://github.com/ZeroOne3010/yetanotherwikidataapi","commit_stats":null,"previous_names":["zeroone3010/yetanotherwikidataapi"],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/ZeroOne3010/yetanotherwikidataapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroOne3010%2Fyetanotherwikidataapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroOne3010%2Fyetanotherwikidataapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroOne3010%2Fyetanotherwikidataapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroOne3010%2Fyetanotherwikidataapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZeroOne3010","download_url":"https://codeload.github.com/ZeroOne3010/yetanotherwikidataapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroOne3010%2Fyetanotherwikidataapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270803585,"owners_count":24648701,"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-08-17T02:00:09.016Z","response_time":129,"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":["kotlin-library","wikidata","wikidata-api"],"created_at":"2025-08-17T03:53:14.414Z","updated_at":"2025-08-17T03:53:14.972Z","avatar_url":"https://github.com/ZeroOne3010.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"This project exposes the [Wikidata API](https://doc.wikimedia.org/Wikibase/master/js/rest-api/) as a Kotlin library.\n\n# Wikidata API\n\nFor testing, get yourself an API token:\n\n1. Go to https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose/oauth2 to request yourself an API token\n2. Mark the client as confidential\n3. Mark it as consumer use for yourself only and the token is auto-accepted for 30 days. \n4. Request specific permissions, but only the basic rights is enough.\n5. Submit the proposal, get Client application key, Client application secret, and Access token\n\nNow you may try the API with this library, or manually:\n\n1. Go to https://doc.wikimedia.org/Wikibase/master/js/rest-api/ to find examples of all the API calls\n2. Note that the page has an invalid \"example\" server configured to it \n   -- use https://www.wikidata.org/w/rest.php/wikibase/v0 instead, like this:\n\n```shell\ncurl -X 'GET' \\\n   'https://www.wikidata.org/w/rest.php/wikibase/v0/entities/items/Q42' \\\n   -H 'accept: application/json' \\\n   -H 'Authorization: Bearer YOUR_ACCESS_TOKEN_GOES_HERE'\n```\n\n# Using this library\n\nIf you work with Maven, add a new repository into your `~/.m2/settings.xml` file:\n\n```xml\n\n\u003crepository\u003e\n   \u003cid\u003egithub\u003c/id\u003e\n   \u003curl\u003ehttps://maven.pkg.github.com/ZeroOne3010/yetanotherwikidataapi\u003c/url\u003e\n   \u003c!--snapshots\u003e\n     \u003cenabled\u003etrue\u003c/enabled\u003e\n   \u003c/snapshots--\u003e\n\u003c/repository\u003e\n```\n\nAlso add [username and access token for GitHub Packages](https://docs.github.com/en/packages/learn-github-packages/about-permissions-for-github-packages):\n\n```xml\n\n\u003cservers\u003e\n   \u003cserver\u003e\n      \u003cid\u003egithub\u003c/id\u003e\n      \u003cusername\u003eYOUR_GITHUB_USERNAME\u003c/username\u003e\n      \u003cpassword\u003eYOUR_GITHUB_TOKEN_WITH_READ_PACKAGES_PRIVILEGE\u003c/password\u003e\n   \u003c/server\u003e\n\u003c/servers\u003e\n```\n\nThen, in your project's pom.xml, include this artifact:\n\n```xml\n\n\u003cdependency\u003e\n   \u003cgroupId\u003eio.github.zeroone3010\u003c/groupId\u003e\n   \u003cartifactId\u003eyetanotherwikidataapi\u003c/artifactId\u003e\n   \u003cversion\u003e0.0.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nNow, a minimal code example would look like this:\n\n```java\nimport io.github.zeroone3010.wikidata.Item;\nimport io.github.zeroone3010.wikidata.Wikidata;\n\npublic class Main {\n   public static void main(String[] args) {\n      Wikidata wikidata = new Wikidata(args[0]);\n      String itemId = \"Q1085\";\n      Item item = wikidata.getItem(itemId);\n      System.out.println(itemId + \" is \" + item.getLabels().get(\"en\"));\n   }\n}\n```\n\nAnd it would print out \"`Q1085 is Prague`\". \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroone3010%2Fyetanotherwikidataapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeroone3010%2Fyetanotherwikidataapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroone3010%2Fyetanotherwikidataapi/lists"}