├── LICENSE ├── README.md └── main.py /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Evicka 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GeoGuessr API 2 | 3 | This Python script contains a list of endpoints for the GeoGuessr API. It uses the `requests` library to make HTTP requests to the API and retrieve data. 4 | 5 | ## Getting Started 6 | 7 | To use this script, you'll need to have Python 3 installed on your computer. You can download it from the official website: https://www.python.org/downloads/ 8 | 9 | You'll also need to install the `requests` library. You can do this by running the following command in your terminal: 10 | 11 | `pip install requests` 12 | 13 | ### Authentication 14 | 15 | To access the most endpoint, you'll need to provide a `_ncfa` cookie. You can extract this cookie from your browser by following these steps: 16 | 17 | 1. Open the GeoGuessr website in your browser and log in to your account. 18 | 2. Open the developer tools in your browser. 19 | 3. Navigate to the "Network" tab in the developer tools. 20 | 4. Refresh the page to capture the network traffic. 21 | 5. Look for a request like to the `profiles` endpoint in the network traffic. 22 | 6. Click on the request to open it. 23 | 7. In the request headers, look for the `_ncfa` cookie and copy its value. 24 | 8. Paste the `_ncfa` token into the script where indicated. 25 | 26 | ## Usage 27 | 28 | To use the script, simply run it from the command line: 29 | 30 | `python main.py` 31 | 32 | This script sends a GET request to the GeoGuessr API using the endpoint you set and prints the response to the console. 33 | 34 | ## API Endpoints 35 | 36 | The following API endpoints are available: 37 | 38 | - v3/accounts/delete 39 | - v3/accounts/signin 40 | - v3/apple/signin 41 | - v3/experiments 42 | - v3/facebook/signin 43 | - v3/games 44 | - v3/games/streak 45 | - v3/googleplus/signin 46 | - v3/likes 47 | - v3/profiles 48 | - v3/profiles/maps 49 | - v3/profiles/pin 50 | - v3/profiles/resetpassword 51 | - v3/profiles/setpassword 52 | - v3/scores/maps 53 | - v3/search/user 54 | - v3/social/badges/claim 55 | - v3/social/badges/unclaimed 56 | - v3/social/events/unfinishedgames 57 | - v3/social/friends 58 | - v3/social/friends/received 59 | - v3/social/maps/browse/featured 60 | - v3/social/maps/browse/popular/all 61 | - v3/social/maps/browse/popular/official 62 | - v3/subscriptions 63 | - v3/subscriptions/google 64 | - v3/subscriptions/plans 65 | - v3/version/update 66 | - v4/app/ads/reward 67 | - v4/app/features/android 68 | - v4/app/logs 69 | - v4/app/onboarding/completed 70 | - v4/app/state 71 | - v4/chat/emotes 72 | - v4/feed/friends 73 | - v4/feed/private 74 | - v4/games/infinity 75 | - v4/games/infinity/challenge/new 76 | - v4/games/infinity/challenge/random 77 | - v4/games/infinity/challenges 78 | - v4/games/infinity/guess 79 | - v4/games/infinity/history 80 | - v4/games/infinity/inbox 81 | - v4/games/infinity/location-overview 82 | - v4/games/infinity/next 83 | - v4/games/infinity/outbox 84 | - v4/games/infinity/share 85 | - v4/games/infinity/shared-location 86 | - v4/parties 87 | - v4/pushnotification/register 88 | - v4/search/map 89 | 90 | ## License 91 | 92 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 93 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | # GeoGuessr API 4 | # [!] All Endpoints extracted from Android app version 2.8.2 5 | # API Endpoints: 6 | # v3/accounts/delete 7 | # v3/accounts/signin 8 | # v3/apple/signin 9 | # v3/experiments 10 | # v3/facebook/signin 11 | # v3/games 12 | # v3/games/streak 13 | # v3/googleplus/signin 14 | # v3/likes 15 | # v3/profiles 16 | # v3/profiles/maps 17 | # v3/profiles/pin 18 | # v3/profiles/resetpassword 19 | # v3/profiles/setpassword 20 | # v3/scores/maps 21 | # v3/search/user 22 | # v3/social/badges/claim 23 | # v3/social/badges/unclaimed 24 | # v3/social/events/unfinishedgames 25 | # v3/social/friends 26 | # v3/social/friends/received 27 | # v3/social/maps/browse/featured 28 | # v3/social/maps/browse/popular/all 29 | # v3/social/maps/browse/popular/official 30 | # v3/subscriptions 31 | # v3/subscriptions/google 32 | # v3/subscriptions/plans 33 | # v3/version/update 34 | # v4/app/ads/reward 35 | # v4/app/features/android 36 | # v4/app/logs 37 | # v4/app/onboarding/completed 38 | # v4/app/state 39 | # v4/chat/emotes 40 | # v4/feed/friends 41 | # v4/feed/private 42 | # v4/games/infinity 43 | # v4/games/infinity/challenge/new 44 | # v4/games/infinity/challenge/random 45 | # v4/games/infinity/challenges 46 | # v4/games/infinity/guess 47 | # v4/games/infinity/history 48 | # v4/games/infinity/inbox 49 | # v4/games/infinity/location-overview 50 | # v4/games/infinity/next 51 | # v4/games/infinity/outbox 52 | # v4/games/infinity/share 53 | # v4/games/infinity/shared-location 54 | # v4/parties 55 | # v4/pushnotification/register 56 | # v4/search/map 57 | 58 | BASE_URL = "https://www.geoguessr.com/api/v3/" # Base URL for all endpoints 59 | _ncfa_TOKEN = "" # Insert your _ncfa token here 60 | 61 | # Create a session object and set the _ncfa cookie 62 | session = requests.Session() 63 | session.cookies.set("_ncfa", _ncfa_TOKEN, domain="www.geoguessr.com") 64 | 65 | # Send a GET request to the profiles endpoint 66 | profiles = session.get(f"{BASE_URL}profiles") 67 | 68 | # Check if the request was successful 69 | if profiles.status_code == 200: 70 | # Print the response as text 71 | print(profiles.text) 72 | else: 73 | # Print an error message 74 | print(f"Error: {profiles.status_code}") 75 | --------------------------------------------------------------------------------