ArtMarketAPI — Python SDK
Official Python SDK for the ArtMarketAPI. Access auction records, comparable sales, artist data, market trends, AI valuations, and more.
Installation
pip install artmarketapi
Quick Start
from artmarketapi import ArtMarketAPI
client = ArtMarketAPI("amapi_live_xxxxx_xxxxx")
# Search for an artist
results = client.search.artists("Picasso")
artist_id = results["data"][0]["id"]
# Get their auction records
records = client.auction_records.list(
artist=artist_id,
category="painting",
start_date="2024-01-01",
limit=25,
)
for record in records["data"]:
print(f"{record['title']} — ${record.get('usd_hammer_price', 'N/A'):,}")
Authentication
All requests require an API key. Get yours at artmarketapi.com:
- Sign up at artmarketapi.com
- Navigate to Settings > API Keys
- Click Generate New Key
- Copy and securely store your key (it won't be shown again)
import os
from artmarketapi import ArtMarketAPI
client = ArtMarketAPI(os.environ["ARTMARKET_API_KEY"])
Never hard-code API keys. Use environment variables or a secrets manager.
API Reference
Auction Records
# List with filters
records = client.auction_records.list(
artist="507f1f77bcf86cd799439011",
category="painting", # painting | print | sculpture | photography | drawing | other
start_date="2024-01-01", # ISO 8601
end_date="2025-01-01",
min_price=10000, # USD
max_price=500000,
lot_performance="above", # upcoming | above | within | below | not_sold | pulled
sort_by="usd_hammer_price", # sale_date | usd_hammer_price | created_at
sort_order="desc",
include_analytics=True, # requires artist filter
limit=25,
page=1,
)
# Get single record
record = client.auction_records.get("507f1f77bcf86cd799439012")
Comparable Sales
AI-optimized endpoint for finding similar artworks. Returns cleaner, more structured data ideal for AI integration.
# Find comparables
comps = client.comparable_sales.list(
category="painting",
medium="oil",
min_width=90,
max_width=110,
min_height=70,
max_height=90,
years_back=2,
)
# Get aggregate statistics only
summary = client.comparable_sales.summary(
artist="507f1f77bcf86cd799439011",
category="painting",
)
Artists
# Get artist details
artist = client.artists.get("507f1f77bcf86cd799439011")
# Past auction records
history = client.artists.past_auction_records(
"507f1f77bcf86cd799439011",
page=1,
sort_by="hammer_price",
)
# Sell-through rates
rates = client.artists.sell_through_rates("507f1f77bcf86cd799439011")
# SLPAE analytics
slpae = client.artists.slpae("507f1f77bcf86cd799439011")
Search
results = client.search.artists("Picasso", limit=10, page=0)
# results["data"] = [{"id": "...", "name": "Pablo Picasso"}, ...]
Market Trends
# Full market overview
overview = client.market_trends.overview(category="painting")
# Market heat index (0-100)
heat = client.market_trends.heat(category="painting", months=6)
# Emerging artists
emerging = client.market_trends.emerging()
# Category performance rankings
categories = client.market_trends.categories()
# Market regime for an artist (bull/bear/sideways)
regime = client.market_trends.regime("507f1f77bcf86cd799439011")
# Market sentiment
sentiment = client.market_trends.sentiment()
Price Database
Advanced search with AI-powered semantic search.
results = client.price_database.search(
artist="507f1f77bcf86cd799439011",
description="blue abstract oil painting", # semantic search
category="painting",
min_hammer_price=5000,
sort_option="hammer_price_desc",
)
Valuation
AI-powered artwork valuation.
# Basic valuation
valuation = client.valuation.estimate(
artist="Pablo Picasso",
width_cm=100,
height_cm=80,
category="painting",
medium="Oil on canvas",
)
# Advanced analysis with market context
analysis = client.valuation.analysis(
artist="Pablo Picasso",
width_cm=100,
height_cm=80,
category="painting",
)
# Find similar artworks by description
similar = client.valuation.describe(
artist="Pablo Picasso",
category="painting",
width=100,
height=80,
description="Blue period portrait",
)
Error Handling
The SDK raises typed exceptions you can catch and handle:
from artmarketapi import (
ArtMarketAPI,
ArtMarketAPIError,
AuthenticationError,
RateLimitError,
PlanUpgradeRequiredError,
NotFoundError,
)
try:
records = client.auction_records.list(artist="...")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after}s")
print(f"Remaining: {e.rate_limit.remaining}")
except AuthenticationError:
print("Invalid API key")
except PlanUpgradeRequiredError:
print("Upgrade your plan to access this endpoint")
except NotFoundError:
print("Resource not found")
except ArtMarketAPIError as e:
print(f"API error: {e.code} - {e}")
print(f"Request ID: {e.request_id}")
Rate Limits
Rate limit info is available after each request:
records = client.auction_records.list(artist="...")
print(client.rate_limit)
# RateLimitInfo(limit=60, remaining=59, reset=1679529600)
| Plan | Requests/Min | Requests/Day | Max Page Size |
|---|---|---|---|
| Free | 10 | 200 | 10 |
| Starter | 30 | 2,000 | 25 |
| Pro | 60 | 10,000 | 50 |
| Enterprise | 120 | 50,000 | 100 |
Context Manager
The client supports use as a context manager for automatic cleanup:
with ArtMarketAPI("amapi_live_xxxxx_xxxxx") as client:
records = client.auction_records.list(category="painting")
Configuration
client = ArtMarketAPI(
"amapi_live_xxxxx_xxxxx",
# Optional: override base URL (for testing or self-hosted)
base_url="https://api.artmarketapi.com/api/v1",
# Optional: request timeout in seconds (default: 30)
timeout=60.0,
# Optional: bring your own httpx.Client
http_client=my_httpx_client,
)
Type Hints
The SDK ships with a py.typed marker and full type annotations. All response types are available in artmarketapi.types:
from artmarketapi.types import (
AuctionRecord,
ComparableSale,
Artist,
MarketHeat,
ValuationResult,
)
Requirements
- Python >= 3.9
- httpx >= 0.25.0
- An ArtMarketAPI key from artmarketapi.com
License
MIT
Metadata
Release files for artmarketapi 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 | |
|---|---|---|---|---|
| artmarketapi-1.0.0.tar.gz | 10.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| artmarketapi-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.0 kB
Release files / artmarketapi-1.0.0.tar.gz
| Download URL | artmarketapi-1.0.0.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10e8d9de78680440e444bd46a3eec10e96b036e1f461f39484759636d1584fdb
|
|
BLAKE2b-256 checksum How to use checksums |
c96ffda3fc612709a7795efc4ddd3d94017ef101592a046f46e3702e0e069350
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / artmarketapi-1.0.0-py3-none-any.whl
| Download URL | artmarketapi-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1458082be02eefd3ad47bc96b1e8c68d837a5df701d9a53cd4f91a45daa08a2a
|
|
BLAKE2b-256 checksum How to use checksums |
75ee5eedf8154c95e60cb2054cf83f53e4d61c3ec8e9ec3841b6ac12efd9ca85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for artmarketapi 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.