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.2.0

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.2.0
File Size Uploaded Provenance Actions
geoguessr_async-2.2.0.tar.gz 33.8 kB Without provenance Details for geoguessr_async-2.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 51.9 kB

Release files / geoguessr_async-2.2.0.tar.gz

Download URL geoguessr_async-2.2.0.tar.gz
Size 33.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9b407d23163fb73bebe5f0870364725a50544a2bb29e09722544021b80fe079a
BLAKE2b-256 checksum
How to use checksums
9370d70987f4d030ad3251305a647c7d51e02a65dfe8017ee4c2af5a40a92e13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

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

Download URL geoguessr_async-2.2.0-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c7ac6cf6780621e0ad90ebfff0383e3246caef07ad15ff63498091a4535cf3e
BLAKE2b-256 checksum
How to use checksums
78ba61ad08a4ece93dc00b342ade24e4b826f2709c840d941a2455222ac60162
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for geoguessr-async 2.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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