Skip to main content

CompSniper for Python

Real eBay sold prices from Python: up to 240 completed eBay sales per request with a cleaned price summary, accepted Best Offer prices, and up to 3 years of eBay sold history. Plus PSA graded card prices and population, TCGplayer, Grailed, Depop, Poshmark and Mercari, all with one API key. No dependencies.

pip install compsniper
export COMPSNIPER_API_KEY=cs_live_...   # free key: https://compsniper.com/signup (100 requests a month)
from compsniper import CompSniper

client = CompSniper()

# Last ~90 days of eBay sold listings, with the real accepted price on Best Offer sales
sold = client.sold("charizard ex 199/165 psa 10", count=60, best_offer_price=True)
print(sold["summary"]["median"], len(sold["items"]))
for item in sold["items"][:5]:
    print(item["endedAt"], item["soldPrice"], item.get("acceptedOfferPrice"), item["title"])

# Up to 3 years of sold history
for row in client.history_pages("nintendo switch oled", start_date="2023-10-25", end_date="2026-10-25", max_pages=3):
    print(row["lastSoldDate"], row["averageSoldPrice"]["amount"], row["title"])

# Other eBay sites: ebay.co.uk, ebay.de, ebay.fr, ebay.it, ebay.es, ebay.ca, ebay.com.au
uk = client.sold("dyson v8", ebay_site="ebay.co.uk", itemCondition="used")

# PSA graded cards: prices by grade, sales with grader, grade and cert number, population report
card = client.psa_card("1999 pokemon base set charizard 4", grade="10")
print(card["priceByGrade"], card["population"]["gemRate"])
sets = client.psa_sets(game="pokemon", keyword="151")
population = client.psa_set(sets["items"][0]["headingId"])  # every card in the set, by grade

# Other marketplaces
tcg = client.tcgplayer_sold("charizard ex obsidian flames 223", count=100, history="annual")
grailed = client.grailed_sold("rick owens geobasket")   # price the buyer actually paid
depop = client.depop_listings("carhartt jacket", country="gb")

print(client.usage())
Method Endpoint
sold, active, summary eBay sold or current listings and price summary (8 eBay sites)
history, history_pages Up to 3 years of eBay sold history
best_offer_prices Saved accepted Best Offer prices by item ID (free)
psa_search, psa_card, psa_sets, psa_set PSA graded card prices by grade and population
tcgplayer_sold, tcgplayer_listings TCGplayer completed sales, price history and listings
grailed_sold, grailed_listings, depop_listings, poshmark_sold, mercari Other resale marketplaces
usage Plan, quota and remaining requests

Rate limits (HTTP 429) and temporary 502/503 errors are retried automatically, and failed requests are never charged. Errors raise CompSniperError with status, code and request_id; a used-up monthly quota (quota_exceeded) is never retried and carries reset_at and upgrade_url.

MIT licensed.

Metadata

Release files for compsniper 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 compsniper 0.2.0
File Size Uploaded Provenance Actions
compsniper-0.2.0.tar.gz 8.0 kB Without provenance Details for compsniper-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 15.4 kB

Release files / compsniper-0.2.0.tar.gz

Download URL compsniper-0.2.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b2c2216797145e51fadb8ebe1fec2ca5ca0f601bd38540e7604a1c337fe708cb
BLAKE2b-256 checksum
How to use checksums
d2a66ffb0a97e265baede045a5482d7036584d0c1537971dd08039269142e8c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

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

Download URL compsniper-0.2.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c52bb4c883782a37474e053b55d6ad4ed3c6d6ef5947d6bd5918bad780e388f
BLAKE2b-256 checksum
How to use checksums
e75ec5ac0dd0935c5a974eca1aa2b8b291cf46cd60a9a03a4a75bd14b3245fd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for compsniper 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.

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No 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