{"id":20388820,"url":"https://github.com/mkearney/kaggler","last_synced_at":"2025-10-30T04:02:14.670Z","repository":{"id":52769632,"uuid":"140147830","full_name":"mkearney/kaggler","owner":"mkearney","description":"🏁 API client for Kaggle","archived":false,"fork":false,"pushed_at":"2021-04-19T19:08:06.000Z","size":418,"stargazers_count":59,"open_issues_count":12,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-26T05:41:53.570Z","etag":null,"topics":["api-client","api-wrapper","data","data-api","kaggle","kaggle-api","kaggle-competition","machine-learning","mkearney-dataset","mkearney-r-package","neural-networks","r","r-package","rstats"],"latest_commit_sha":null,"homepage":"https://github.com/mkearney/kaggler","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkearney.png","metadata":{"files":{"readme":"README.Rmd","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":"2018-07-08T07:45:13.000Z","updated_at":"2024-10-07T08:44:59.000Z","dependencies_parsed_at":"2022-08-22T04:20:26.453Z","dependency_job_id":null,"html_url":"https://github.com/mkearney/kaggler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Fkaggler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Fkaggler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Fkaggler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Fkaggler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkearney","download_url":"https://codeload.github.com/mkearney/kaggler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248557844,"owners_count":21124165,"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-client","api-wrapper","data","data-api","kaggle","kaggle-api","kaggle-competition","machine-learning","mkearney-dataset","mkearney-r-package","neural-networks","r","r-package","rstats"],"created_at":"2024-11-15T03:13:26.469Z","updated_at":"2025-10-30T04:02:14.583Z","avatar_url":"https://github.com/mkearney.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\",\n  cache = TRUE\n)\nlibrary(kaggler)\noptions(width = 100)\noptions(tibble.print_min = 5)\noptions(tibble.print_max = 5)\n```\n# kaggler \u003cimg src=\"man/figures/logo.png\" width=\"160px\" align=\"right\" /\u003e\n\n\u003e 🏁 An R client for accessing [Kaggle](https://www.kaggle.com)'s API\n\n## Installation\n\nYou can install the dev version of **{kaggler}** from [CRAN](https://github.com/mkearney/kaggler) with:\n\n```{r, eval = FALSE}\n## install kaggler package from github\ndevtools::install_packages(\"mkearney/kaggler\")\n```\n\n## API authorization\n\n\u003cspan\u003e1.\u003c/span\u003e Go to [https://www.kaggle.com/](kaggle.com) and sign in\n\n\u003cspan\u003e2.\u003c/span\u003e Click `Account` or navigate to `https://www.kaggle.com/{username}/account`\n\n\u003cspan\u003e3.\u003c/span\u003e Scroll down to the `API` section and click `Create New API Token` (which should cause you to download a `kaggle.json` file with your username and API key)\n\n\u003cp style='align:center'\u003e\u003cimg src='tools/readme/kag.png' /\u003e\u003c/p\u003e\n\n\u003cspan\u003e4.\u003c/span\u003e There are a few different ways to store your credentials\n\n   + Save/move the `kaggle.json` file as `~/.kaggle/kaggle.json`\n   + Save/move the `kaggle.json` file to your current working directory\n   + Enter your `username` and `key` and use the `kgl_auth()` function like in the example below\n\n```{r, eval = FALSE}\nkgl_auth(username = \"mkearney\", key = \"9as87f6faf9a8sfd76a9fsd89asdf6dsa9f8\")\n#\u003e Your Kaggle key has been recorded for this session and saved as `KAGGLE_PAT` environment variable for future sessions.\n```\n\n\n## `kgl_competitions_list_.*()`\n\nBrowse or search for Kaggle compeitions.\n\n```{r complist}\n## look through all competitions (paginated)\ncomps1 \u003c- kgl_competitions_list()\ncomps1\n\n## it's paginated, so to see page two:\ncomps2 \u003c- kgl_competitions_list(page = 2)\ncomps2\n\n## search by keyword for competitions\nimagecomps \u003c- kgl_competitions_list(search = \"image\")\nimagecomps\n```\n\n## `kgl_competitions_data_.*()`\n\nLook up the datalist for a given Kaggle competition. **IF you've already accepted the competition rules, then you should be able to download the dataset too (I haven't gotten there yet to test it)**\n\n```{r}\n## data list for a given competition\nc1_datalist \u003c- kgl_competitions_data_list(comps1$id[1])\nc1_datalist\n\n## download set sets (IF YOU HAVE ACCEPTED COMPETITION RULES)\nc1_data \u003c- kgl_competitions_data_download(\n  comps1$id[1], c1_datalist$name[1])\n```\n\n## `kgl_datasets_.*()`\n\nGet a list of all of the datasets.\n\n```{r datalist}\n## get competitions data list\ndatasets \u003c- kgl_datasets_list()\ndatasets\n```\n\n\n## `kgl_competitions_leaderboard_.*()`\n\nView the leaderboard for a given competition.\n\n```{r leaderboard}\n## get competitions data list\nc1_leaderboard \u003c- kgl_competitions_leaderboard_view(comps1$id[1])\nc1_leaderboard\n```\n\n\n## Note(s)\n\n+ The author is in no way affiliated with Kaggle.com, and, as such, makes no\nassurances that there won't be breaking changes to the API at any time.\n\n+ Although I am not affiliated, it's good practice to be informed, so here is\nthe link to Kaggle's terms of service: https://www.kaggle.com/terms\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkearney%2Fkaggler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkearney%2Fkaggler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkearney%2Fkaggler/lists"}