# Thalia Search ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/thalia/search` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 2 credits per call | | **Documentation** | https://www.piloterr.com/library/thalia-search | ## Description Search Thalia by keyword and page books, media, and gifts. Cards include title, price, and the product link. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/thalia/search' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### Harry Potter, first card ```json { "results": [ { "id": "A1074644377", "url": "https://www.thalia.de/shop/home/artikeldetails/A1074644377", "image": "https://images.thalia.media/03/-/3aeeae4a5ce44ac39ca88cc122da4164/harry-potter-und-die-kammer-des-schreckens-harry-potter-2-gebundene-ausgabe-j-k-rowling.jpeg", "price": 18, "title": "Harry Potter und die Kammer des Schreckens (Harry Potter 2)", "author": "J. K. Rowling", "format": "Buch (Gebundene Ausgabe)", "rating": 5, "currency": "EUR", "review_count": 97, "price_display": "18,00 €" } ], "pagination": { "next": "https://www.thalia.de/suche?sq=Harry%20potter&p=2", "page": 1, "per_page": 24, "total_pages": 258, "total_results": null } } ``` ## Documentation ## Overview Search the Thalia shop at thalia.de. A keyword or a search URL both work. The body is `{ results, pagination }`. `price` is a number. `price_display` is the same amount in euros, written with cents (`18,00 €`, `1.649,99 €`). A shop label such as `261,-` is returned as `261,00 €`. ## Quickstart ``` GET https://api.piloterr.com/v2/thalia/search?query=Harry%20Potter GET https://api.piloterr.com/v2/thalia/search?query=Harry%20Potter&page=2 GET https://api.piloterr.com/v2/thalia/search?query=https://www.thalia.de/suche?sq=Harry+Potter ``` Send header `x-api-key`. `page` starts at 1 and is sent to Thalia as `p`. ## Parameters | Parameter | Type | Required | Description | |---|---|---|---| | `query` | string | yes | Keyword, a `/suche` URL, or a `/kategorie/` URL on thalia.de. A product URL returns 400. | | `page` | integer | no | Page number from 1. Default 1. | | `return_page_source` | boolean | no | When true, returns `{"result": "..."}`. Default false. | ## Response fields | Field | Type | Description | |---|---|---| | `results[].id` | string | Thalia article id, for example `A1074644377`. | | `results[].url` | string | Product URL. | | `results[].title` | string | Product title. | | `results[].author` | string or null | Author when the card shows one. Toys often have null. | | `results[].format` | string or null | Format label, for example `Buch (Gebundene Ausgabe)`. | | `results[].image` | string or null | Cover image URL. | | `results[].price` | number or null | Current price. | | `results[].price_display` | string or null | Same amount as `price`, with cents and the euro sign. | | `results[].currency` | string or null | `EUR` when a price is present. | | `results[].rating` | number or null | Star rating shown on the card. | | `results[].review_count` | integer or null | Number of reviews shown on the card. | | `pagination.page` | integer | Page that was parsed. | | `pagination.per_page` | integer | Number of cards in `results`. | | `pagination.total_results` | integer or null | Exact hit count. Null when Thalia only shows an approximate count such as `mehr als 1.000 Treffer`. | | `pagination.total_pages` | integer or null | Page count from the pager, for example `Seite 1 von 258`. | | `pagination.next` | string or null | Next page URL, or null on the last page. | ## Main use cases - Monitor German book prices - Page an author or a title - Resolve a keyword to a product URL ## Error codes | Code | When | |---|---| | 400 | Empty query, another domain, a product URL, or a page below 1. | | 401 | Missing API key. | | 404 | The listing rendered, but no product card could be parsed. | | 500 | Unexpected failure while rendering or parsing. | ## Related endpoints `/v2/thalia/product` returns one product sheet.