Skip to main content

This is a Geoguessr API client written in Python. It allows you to interact with the Geoguessr API, such as getting information about users, challenges, maps, and scores.

To install the package, run the following command:

pip install geoguessr-async

Once the package is installed, you can create a client object by passing your NCFA cookie to the constructor:

import asyncio
from geoguessr_async import Geoguessr

async with Geoguessr("your_ncfa_cookie") as client:
    await client.do_stuff()

To get your NCFA cookie, login to geoguessr, open your dev tools (Ctrl+Shift+I), go to Application/Storage/Cookies and copy the value of _ncfa.

You can then use the client object to get information about users, challenges, maps, and scores. For example, to get information about an user with his ID, you can use the following code:

user = await client.get_user_infos(userId)

The Profile object will contain information such as your username, country, and number of games played.

To get information about a challenge, you can use the following code:

challenge = await client.get_challenge_infos("https://geoguessr.com/challenge/xxxx")

The Challenge object will contain information such as the challenge name, description, and time limit.

To get information about a map, you can use the following code:

map = await client.get_map_infos("https://geoguessr.com/maps/xxxx")

The Map object will contain information such as the map name, size, and location.

To get information about a score, you can use the following code:

score = await client.get_challenge_score("https://geoguessr.com/challenge/xxxx")

The Score object will contain information such as the players' name, score, and time. When getting the score of a challenge, it automatically plays it, pinging (0, 0) each round.

Example: Get results of a challenge as a list of dictionnaries

score = await client.get_challenge_score("https://geoguessr.com/challenge/xxxx")
scores = []
for s in score:
    d_player = {
        "userId": s.userId,
        "userName":s.playerName,
        "total": s.totalScore,
        "roundPoints": s.gamePlayerGuessesRoundScoreInPoints,
        "roundTimes": s.gamePlayerGuessesTime
    }
    scores.append(d_player)
print(scores)

I hope you find this package useful! Please let me know if you have any questions or feedback.

Metadata

Release files for geoguessr-async 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geoguessr-async 2.1.1
File Size Uploaded
geoguessr_async-2.1.1.tar.gz 33.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for geoguessr-async 2.1.1
File Interpreter ABI Platform
geoguessr_async-2.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 51.8 kB

Release files / geoguessr_async-2.1.1.tar.gz

Download URL geoguessr_async-2.1.1.tar.gz
Size 33.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ad8eba2d9298f03a2e0b75325335bbb14b02a83914b561b889451bcb6727e145
BLAKE2b-256 checksum
How to use checksums
305fe9b5b70b06dc5c10fe88372ba014337e8f3035acf7942cc57259cae87333
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / geoguessr_async-2.1.1-py3-none-any.whl

Download URL geoguessr_async-2.1.1-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a185fc91c975d12702f8f8f466b54e9007592ee8a0aed25b1416aba3cf18797d
BLAKE2b-256 checksum
How to use checksums
d79c89bc78a20793acf1bfe418c8e0d03bcd313fc23526832424d42431c2da03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

2.1.1 This release

2 release files

2.1.0

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page