Expand description
§tcglookup
The official Rust SDK for the TCG Price Lookup API.
Live trading card prices across Pokemon, Magic: The Gathering, Yu-Gi-Oh!, Disney Lorcana, One Piece TCG, Star Wars: Unlimited, and Flesh and Blood.
Get a free API key at https://tcgpricelookup.com/tcg-api
§Quickstart
use tcglookup::{Client, CardSearchParams};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new("tlk_live_...");
let results = client
.cards()
.search(CardSearchParams {
q: Some("charizard".into()),
game: Some("pokemon".into()),
limit: Some(5),
..Default::default()
})
.await?;
for card in results.data {
println!("{} — {}", card.name, card.set.name);
}
Ok(())
}Structs§
- Card
- A single trading card with its current prices.
- Card
Game Ref - Embedded game reference on a card.
- Card
Prices - Raw and graded prices for a card.
- Card
Search Params - Parameters for
CardsResource::search. - Card
Search Response - Paginated card search response.
- Card
SetRef - Embedded set reference on a card.
- Cards
Resource - Cards endpoint group.
- Client
- Async client for the TCG Price Lookup REST API.
- Client
Builder - Builder for
Clientwith custom configuration. - Ebay
Averages - Rolling-window averages from eBay sold listings.
- Game
List Params - Parameters for
GamesResource::list. - Game
List Response - Paginated game list response.
- Game
Summary - One row in the games list.
- Games
Resource - Games endpoint group.
- Graded
Grade Prices - Per-source price block for a single grade.
- History
Day - One day of price observations.
- History
Params - Parameters for
CardsResource::history. - History
Price Row - One observation within a day.
- History
Response - Daily price history.
- Rate
Limit Info - Rate-limit window state captured from the most recent response.
- RawCondition
Prices - Source-keyed prices for one raw condition.
- SetList
Params - Parameters for
SetsResource::list. - SetList
Response - Paginated set list response.
- SetSummary
- One row in the sets list.
- Sets
Resource - Sets endpoint group.
- TcgPlayer
Prices - Standard TCGPlayer market / low / mid / high points.
Enums§
- Error
- All errors the SDK can return.
Type Aliases§
- Result
- SDK result alias.