tarkov-market
Official Python client for the Tarkov Market API — live flea market prices and item data for Escape from Tarkov, in PVP, PVE and season modes.
Standard library only, no dependencies. Python 3.9+.
pip install tarkov-market
Usage
import os
from tarkov_market import TarkovMarket
tm = TarkovMarket(api_key=os.environ["TARKOV_MARKET_KEY"])
# find an item by name — up to 5 matches, exact one first
ledx = tm.item(q="ledx")[0]
print(ledx.name, ledx.price, ledx.diff24h)
# or by id
by_uid = tm.item(uid="a7f7568c-61fb-437e-9f71-06e58aae26ba")[0]
by_bsg = tm.item(bsg_id="5c0530ee86f774697952d952")[0]
# the whole item list in one call
ammo = tm.all_items(tags=["Ammo"], sort="price", sort_direction="desc")
Get an API key at tarkov-market.com/dev/api. Keep it out of client-side code: it identifies you and the rate limit is per key.
Game modes
pve = TarkovMarket(api_key=key, mode="pve") # for every call
tm.item(q="ledx", mode="season") # just this one
Flea prices are never borrowed between modes. If the season has not seen an item yet you get
price == 0 and have_market_data is False — check that flag before trusting a price.
Item fields
Json is camelCase, the model is snake_case: avg24hPrice → avg24h_price,
traderPriceRub → trader_price_rub, bsgId → bsg_id. Anything the API adds later is still
reachable:
ledx.raw["someNewField"] # or ledx["someNewField"]
Full field list: root README.
Locales
tm = TarkovMarket(api_key=key, lang="ru")
tm.item(q="ледх")
Non-latin queries are sent as POST automatically, so you never have to url-encode them.
Supported: en ru ch cz de es fr hu it jp kr mx pl po ro sk tr. Tags and trader_name stay
English in every locale — they are keys, not display text.
Errors
from tarkov_market import AuthError, RateLimitError, TarkovMarketError
try:
tm.item(q="ledx")
except AuthError: # 401 — key missing, unknown or disabled
...
except RateLimitError: # 429 — 300/min, or 5/min for all_items
...
except TarkovMarketError as err:
print(err.status, err.body)
429 and 5xx are retried twice with exponential backoff before the error reaches you.
Tune with retries=, timeout=.
API
| Method | Does |
|---|---|
item(q=, uid=, bsg_id=, lang=, mode=) |
one item by name or id; returns list[Item] |
all_items(tags=, sort=, sort_direction=, lang=, mode=) |
every item; 5 calls/min |
download_url(lang=, mode=) |
url of the full list as a json file (contains your key) |
Examples
TARKOV_MARKET_KEY=your_key python examples/basic.py ledx
TARKOV_MARKET_KEY=your_key python examples/export_csv.py prices.csv pve
License
MIT
Metadata
Release files for tarkov-market 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tarkov_market-1.0.0.tar.gz | 7.8 kB | Without provenance | Details for tarkov_market-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tarkov_market-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for tarkov_market-1.0.0-py3-none-any.whl |
Total release size: 17.1 kB
Release files / tarkov_market-1.0.0.tar.gz
| Download URL | tarkov_market-1.0.0.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fe68a3e13973b67b168f469914e81253d7f36538ccb7af3aafb993d597d3be2
|
|
BLAKE2b-256 checksum How to use checksums |
b13586ea878ef92c778b5776c4062f9fc6e1083351c98bbc6c5a770dedcbb48b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Release files / tarkov_market-1.0.0-py3-none-any.whl
| Download URL | tarkov_market-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71cc1e86fbd056547da2f0f4882e0ff2a8c63ee29abb883ae28f68f960e2695e
|
|
BLAKE2b-256 checksum How to use checksums |
2b1b5c20924399b8345b1c7b8748adee300ae31ab3a7670ddfe5f65b25b5020e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Security for tarkov-market 1.0.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.