Skip to main content

beli

CI PyPI Python License: MIT

Unofficial, read-only Python client and exporter for Beli, the restaurant ranking app.

Beli has no public API and no export button. This package reads your rankings, scores, notes, visit dates, photos, Want to Try list and guides through the private API the app uses, and writes them to JSON, CSV or SQLite.

Not affiliated with or endorsed by Beli. The API is reverse engineered and can change without notice. Use it on your own account.

Install

pip install beli-client

Requires Python 3.10 or newer. The package installs as beli-client and imports as beli.

Export your data

beli login                # asks for your email and password
beli export -f sqlite     # writes beli-export.db

The format flag -f can be set to json, csv or sqlite.

sqlite3 beli-export.db "SELECT rank, score, name, note FROM rated LIMIT 10"

Other commands:

beli whoami
beli rankings -c RES -n 20                # your top 20 restaurants
beli export -c RES,BAR -f csv -o ~/beli.csv
beli get /api/score-average/{me}/ALL/     # any GET endpoint; {me} is your user id
beli logout

Use it from Python

from beli import Beli

with Beli.from_session() as beli:  # the session saved by `beli login`
    for r in beli.rankings.list("RES", sort="score")[:10]:
        print(f"{r.score:.1f}  {r.business.name}")

    export = beli.export()
    export.write("beli.json")

Without a saved session, pass credentials, or set BELI_EMAIL and BELI_PASSWORD and call Beli():

beli = Beli(email="you@example.com", password="...")

AsyncBeli has the same methods for asyncio code:

from beli import AsyncBeli

async with AsyncBeli.from_session() as beli:
    rankings = await beli.rankings.list("RES")

API

Methods
beli me(), categories(), export(), get(path)
beli.rankings list(category, sort=None), all(), visit_dates(business_id), count(), count_this_year()
beli.notes list(), get(business_id)
beli.scores list(), averages()
beli.photos list()
beli.bookmarks list(category)
beli.guides list(), items(), get(guide_id)
beli.users get(user_id), followers(), following(), streak()
beli.places search(term, city=...), hours(business_id), trending(category)

Most methods take user= to read another user's data. beli.get(path) sends a GET to any other endpoint. The results are pydantic models from beli.models.

Every exception is a BeliError. If Beli changes its API, you may get an UnexpectedResponseError: upgrade, or open an issue.

Authentication

beli login saves a session token to ~/.config/beli/session.json. Your password is never stored. The session lasts about a week between uses.

If you sign in to Beli with Apple or Google, you will need to capture a refresh token from the app's traffic and run beli login --token <refresh token>.

Notes

For now, this implementation is read-only. Requests are also spaced one second apart and retried when Beli asks you to slow down. Future releases may include breaking changes, please check the changelog (CHANGELOG.md) before upgrading.

Development

See CONTRIBUTING.md and MAINTAINING.md.

Credits

The endpoints were documented by horse-3903/beli-api-spec and ProjectBarks/beli-api.

License

MIT

Metadata

Release files for beli-client 0.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 beli-client 0.2.0
File Size Uploaded Provenance Actions
beli_client-0.2.0.tar.gz 92.5 kB With provenance Details for beli_client-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for beli-client 0.2.0
File Interpreter ABI Platform Actions
beli_client-0.2.0-py3-none-any.whl Python 3 none any Details for beli_client-0.2.0-py3-none-any.whl

Total release size: 124.3 kB

Release files / beli_client-0.2.0.tar.gz

Download URL beli_client-0.2.0.tar.gz
Size 92.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fb9f6607c844c98ec55e63628e18e7b4d783fe29461c837f45eb33b46603cb78
BLAKE2b-256 checksum
How to use checksums
5603c3f1bb4c27b05ce7471b89063fe2573d254d4e2693013bd96f8da794d5dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / beli_client-0.2.0-py3-none-any.whl

Download URL beli_client-0.2.0-py3-none-any.whl
Size 31.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2138771a91bf781d6b8b253b5ff62bc633b5b1cde20bb218bf848e7cdf1f4ee0
BLAKE2b-256 checksum
How to use checksums
e67646e5014d1b292a3721193f6465fb50163885f735fc53fa46318f5c005b38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for beli-client 0.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for beli_client-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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