API Dokumentation

Diese Seite beschreibt die öffentliche HTTP-API dieses Dienstes. Alle Endpunkte liefern JSON zurück und können mit jedem HTTP-Client (Browser, cURL, Programmiersprachen usw.) aufgerufen werden.

1. Basis-Informationen

Basis-URL

Alle Endpunkte hängen an der Basis-URL deines Deployments, z. B.:

https://priceapi.eve-tools.eu

Authentifizierung

Jeder API-Request muss mit einem gültigen Lizenz-Key erfolgen.

Demo-Key: 9V73M31ULF0JZG7C (Limit: 10 Requests/Minute, 300 Requests/Stunde; danach Rate-Limit/Block).

Antwortformat

Alle Antworten sind JSON-Objekte mit Datenfeldern oder einem Feld error bei Fehlern.

2. GET /api/item/<name> oder /api/item?name=

Bewertet ein Item inkl. Menge und liefert zusätzlich die Roh-/Komponentenpreise.

GET /api/item/Tritanium?quantity=100&source=auto&price_type=split&basis=raw&license=DEMO

Antwort enthält item, valuation (Rohdaten), components und pricing (kompaktes Payload).

{
  "item": {"name": "Tritanium", "type_id": 34, "volume": 0.01},
  "quantity": 100,
  "pricing": {
    "name": "Tritanium",
    "quantity": 100,
    "unit_price": 4.23,
    "total_price": 423.0,
    "raw_price": 4.23,
    "refined_price": 4.10,
    "price": 4.23,
    "price_type": "split",
    "source": "janice",
    "currency": "ISK",
    "components_total": 410.0
  }
}

3. GET /api/pricing

Gibt direkt das Pricing-Payload zurück (ohne item/valuation Wrapper) und akzeptiert name oder type_id.

GET /api/pricing?name=Tritanium&quantity=10&price_type=buy&basis=refined&license=DEMO

Antwort: Pricing-Payload mit zusätzlichen Feldern basis und price_type_requested.

{
  "name": "Tritanium",
  "quantity": 10,
  "price": 42.3,
  "basis": "refined",
  "price_type_requested": "buy",
  "price_type": "buy",
  "source": "janice",
  "components_total": 41.0
}

4. POST /api/pricing/bulk (Alias: /api/item/bulk)

Bulk-Pricing für viele Items; akzeptiert pro Eintrag name oder type_id. Antwort: Liste von Pricing-Payloads.

POST /api/pricing/bulk
{
  "license": "DEMO-KEY-123",
  "price_type": "split",
  "basis": "raw",
  "items": [
    {"name": "Tritanium", "quantity": 100},
    {"type_id": 34, "quantity": 5000}
  ]
}

5. GET /api/price

Liefert nur den Einzelpreis (ohne Bewertungsdetails).

GET /api/price?q=Tritanium&source=janice&price_type=split&basis=raw&license=DEMO

{
  "item_name": "Tritanium",
  "source": "janice",
  "price_type": "split",
  "price": 4.23,
  "last_updated": "2025-01-01T12:34:56"
}

6. POST /api/bulk

Bewertung mehrerer Items in einem Request. Liefert pro Item item, valuation und components (wie /api/item), aber ohne kompaktes Pricing-Payload.

POST /api/bulk
{
  "source": "auto",
  "price_type": "split",
  "items": [
    {"name": "Tritanium", "quantity": 100},
    {"name": "Pyerite",   "quantity": 50}
  ],
  "license": "DEMO-KEY-123"
}

7. GET /api/search

Einfaches Autocomplete für Items/Gruppen.

GET /api/search?q=trit{"items": [{"name": "Tritanium", ...}, ...]}

8. Fehlercodes

9. Beispiele

cURL

curl "https://priceapi.eve-tools.eu/api/item/Tritanium?quantity=100&license=DEMO-KEY-123"

Python (requests)

import requests

base_url = "https://priceapi.eve-tools.eu"
license_key = "DEMO-KEY-123"

resp = requests.get(
    f"{base_url}/api/item/Tritanium",
    params={"quantity": 100, "license": license_key},
    timeout=10,
)
resp.raise_for_status()
print(resp.json())

PowerShell

$baseUrl = "https://priceapi.eve-tools.eu"
$license = "DEMO-KEY-123"

Invoke-RestMethod -Uri "$baseUrl/api/item/Tritanium?quantity=100&license=$license" -Method GET