Skip to content

Jwright707/GeeksForGeeksAPI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unofficial GFG API

An unofficial API for GeeksForGeeks for developers to make cool stuff using GFG data.


Functionalities

  • Has all the relevant data from the GFG profile page.
  • Has the count of all the problems solved based on difficulties.
  • Has the links & names of all the problems solved by the user segregated based on difficulties.
  • Methods supported - GET

Endpoints

To access the API, there is only 1 endpoint, https://geeks-for-geeks-api.vercel.app/yourGeeksForGeeksUsername

Sample URL - https://geeks-for-geeks-api.vercel.app/arnoob16

How was it built:

The API was built using Web Scraping the profile page and a server deployed on web.


Instructions to run on your local system


Sample API Responses

Success Response

{
    "info": {
        "name": "Arnab Deep",
        "username": "arnoob16",
        "institution": "SRM Institute of Science and Technology",
        "instituteRank": 62,
        "solved": 84,
        "codingScore": 190,
        "monthlyCodingScore": 4,
        "weeklyCodingScore": 0
    },
    "solvedStats": {
        "school": {
            "count": "0",
            "questions": []
        },
        "basic": {
            "count": "17",
            "questions": [
                {
                    "question": "Height of Binary Tree",
                    "link": "https://practice.geeksforgeeks.org/problems/height-of-binary-tree/1"
                },
                {
                    "question": "Reverse a String",
                    "link": "https://practice.geeksforgeeks.org/problems/reverse-a-string/1"
                },
                ....
            ]
        },
        "easy": {
            "count": "49",
            "questions": [
                {
                    "question": "Deque Implementations",
                    "link": "https://practice.geeksforgeeks.org/problems/deque-implementations/1"
                },
                {
                    "question": "The New Line - Java",
                    "link": "https://practice.geeksforgeeks.org/problems/the-new-line-java/1"
                },
                ....
            ]
        },
        "medium": {
            "count": "16",
            "questions": [
                {
                    "question": " Rearrange Array Alternately",
                    "link": "https://practice.geeksforgeeks.org/problems/-rearrange-array-alternately-1587115620/1"
                },
                {
                    "question": "Part of it.",
                    "link": "https://practice.geeksforgeeks.org/problems/part-of-it1016/1"
                },
                ....
            ]
        },
        "hard": {
            "count": "2",
            "questions": [
                {
                    "question": "QuickSort on Doubly Linked List",
                    "link": "https://practice.geeksforgeeks.org/problems/quicksort-on-doubly-linked-list/1"
                },
                {
                    "question": "Return two prime numbers",
                    "link": "https://practice.geeksforgeeks.org/problems/return-two-prime-numbers2509/1"
                }
            ]
        }
    }
}

Failure Response

{
    "error": "Profile Not Found"
}

Notes

  • If you are using this, do mention about this repository in your readme, I'll also mention your project here in this repository.
  • A star to the repository would be massive boost to a NOOB like me.

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%