{"id":23417636,"url":"https://github.com/santoshvarmaaddala/leetcode_api","last_synced_at":"2026-05-09T15:23:40.074Z","repository":{"id":248723582,"uuid":"829470869","full_name":"santoshvarmaaddala/Leetcode_API","owner":"santoshvarmaaddala","description":"Leetcode Api to fetch the leetcode user details easily","archived":false,"fork":false,"pushed_at":"2024-07-16T16:10:18.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T01:45:33.389Z","etag":null,"topics":["api","endpoint","fastapi","graphql","leetcode","python3","request","uvicorn","webscarpping"],"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/santoshvarmaaddala.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":"2024-07-16T13:47:18.000Z","updated_at":"2024-08-01T05:56:43.000Z","dependencies_parsed_at":"2024-07-16T19:38:59.505Z","dependency_job_id":null,"html_url":"https://github.com/santoshvarmaaddala/Leetcode_API","commit_stats":null,"previous_names":["santoshvarmaaddala/leetcode_api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santoshvarmaaddala%2FLeetcode_API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santoshvarmaaddala%2FLeetcode_API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santoshvarmaaddala%2FLeetcode_API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santoshvarmaaddala%2FLeetcode_API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santoshvarmaaddala","download_url":"https://codeload.github.com/santoshvarmaaddala/Leetcode_API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247998621,"owners_count":21030824,"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","endpoint","fastapi","graphql","leetcode","python3","request","uvicorn","webscarpping"],"created_at":"2024-12-22T23:19:09.683Z","updated_at":"2026-05-09T15:23:35.017Z","avatar_url":"https://github.com/santoshvarmaaddala.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# LeetCode API with FastAPI\r\n\r\nThis project provides a FastAPI-based API to fetch user details from LeetCode, including their global ranking and total problems solved.\r\n\r\n## Features\r\n\r\n- Fetch LeetCode user profile details.\r\n- Fetch the global ranking of a LeetCode user.\r\n- Fetch the total number of problems solved by a LeetCode user, categorized by difficulty.\r\n\r\n## Endpoints\r\n\r\n### Get User Profile\r\n\r\n- **URL**: `/leetcode/{username}`\r\n- **Method**: `GET`\r\n- **Description**: Fetches the complete profile details of a LeetCode user.\r\n- **Response**:\r\n  ```json\r\n  {\r\n      \"username\": \"user123\",\r\n      \"profile\": {\r\n          \"realName\": \"User Name\",\r\n          \"aboutMe\": \"About the user\",\r\n          \"school\": \"User's School\",\r\n          \"websites\": [\"website1\", \"website2\"],\r\n          \"countryName\": \"Country\",\r\n          \"company\": \"User's Company\",\r\n          \"ranking\": 12345\r\n      },\r\n      \"submitStats\": {\r\n          \"acSubmissionNum\": [\r\n              {\r\n                  \"difficulty\": \"All\",\r\n                  \"count\": 100,\r\n                  \"submissions\": 150\r\n              },\r\n          ]\r\n      }\r\n  }\r\n\r\n# Installation\r\n### 1.Clone the repository:\r\n```sh\r\ngit clone https://github.com/yourusername/leetcode-api.git\r\ncd leetcode-api\r\n```\r\n### 2.Create a virtual environment and activate it:\r\n```sh\r\npython -m venv .venv\r\nsource .venv/bin/activate  # On Windows use `.venv\\Scripts\\activate`\r\n```\r\n### 3.Install the dependencies:\r\n```sh\r\npip install -r requirements.txt\r\n```\r\n### 4.Run the FastAPI app:\r\n```sh\r\nuvicorn main:app --reload\r\n```\r\n### 5.Access the API documentation at:\r\n    http://localhost:8000/docs\r\n    or\r\n    http://localhost:8000/redoc\r\n\r\n## Dependencies\r\n    FastAPI\r\n    requests\r\n    uvicorn\r\n## License\r\nThis project is licensed under the MIT License. See the LICENSE file for details.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantoshvarmaaddala%2Fleetcode_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsantoshvarmaaddala%2Fleetcode_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantoshvarmaaddala%2Fleetcode_api/lists"}