API & Contact

Access market data programmatically

📡 Public API

Access DreadMarket data for your own projects. All endpoints return JSON with icon URLs.

Search/Filter Listings

GET https://dreadmarket.net/api/search.php

Search and filter listings with multiple parameters.

Parameters: q, min_level, max_level, min_price, max_price, stat, min_stat, stat2, min_stat2, stat3, min_stat3, seller, slot, tier (1-5), mat_quality (0-5), listing_type (wts/wtb), limit, page

Example
/api/search.php?q=sword&min_level=50&stat=Strength&min_stat=30&limit=20

🔴 Live Streaming (Real-Time Updates)

GET https://dreadmarket.net/api/search.php?since={timestamp}

Get only NEW listings since your last request. Bypasses cache for real-time data when result sets are small.

Parameters:

  • since - Unix timestamp (epoch seconds). Returns only listings with last_seen > since
  • limit - Max results per request (default: 20)
  • All other search filters work with since (q, tier, seller, etc.)

Response includes:

  • latest_timestamp - Max last_seen from results. Use this as your next 'since' value
  • server_time - Current server time (Unix epoch)
Example: Polling Loop
# Initial request - get current time
GET /api/search.php?since=0&limit=100
# Response: {"results": [...], "latest_timestamp": 1738553800, "server_time": 1738553805}

# Subsequent polls - only get NEW listings
GET /api/search.php?since=1738553800&limit=100
# Response: {"results": [2 new items], "latest_timestamp": 1738553900, ...}

# Poll every 2-5 seconds for near real-time updates
JavaScript Example
let lastTimestamp = 0;

async function pollListings() {
    const res = await fetch(`/api/search.php?since=${lastTimestamp}&limit=100`);
    const data = await res.json();
    
    if (data.results.length > 0) {
        console.log(`${data.results.length} new listings!`);
        // Process new listings...
    }
    
    // Update timestamp for next poll
    lastTimestamp = data.latest_timestamp || data.server_time;
}

// Poll every 3 seconds
setInterval(pollListings, 3000);

💰 Price Lookup (Item Valuation)

GET https://dreadmarket.net/api/price.php?name={item_name}

Get min, avg, max, and median prices for an item. Perfect for automated item valuation.

Parameters:

  • name (required) - Item name to search
  • fuzzy=1 (optional) - Enable partial/fuzzy matching
  • limit=N (optional) - Max results, 1-50 (default: 10)
Example URLs
# Exact match
/api/price.php?name=Godly+Sash+of+the+Sadistic+Lion

# Fuzzy match (partial name)
/api/price.php?name=lion&fuzzy=1&limit=5
Example Response
{
  "query": "lion",
  "match_type": "fuzzy",
  "results_count": 5,
  "items": [
    {
      "item_name": "Godly Sash of the Sadistic Lion",
      "listings_count": 12,
      "price_min": 150000,
      "price_max": 2300000,
      "price_avg": 825000,
      "price_median": 500000,
      "price_count": 10,
      "sellers": ["Player1", "Player2"],
      "last_seen": 1706400000
    }
  ]
}

Get Item by ID

GET https://dreadmarket.net/api/item.php?id={id}

Get a single item with full details and icon URL.

Market Statistics

GET https://dreadmarket.net/api/stats.php

Get aggregated market stats: total listings, average price, top sellers, quality distribution.

Item Icon

GET https://dreadmarket.net/api/icon.php?id={id}

Redirects to the item's icon image. Also accepts icon_id parameter.

All Listings

GET https://dreadmarket.net/api/listings.php

Full listings JSON (~30MB). Use search API for filtered results. Usage is tracked.

Price History

GET https://dreadmarket.net/api/history.php

Historical price data for items over time. Usage is tracked.

API Usage Stats

GET https://dreadmarket.net/api/usage.php

View API usage statistics: total requests, bandwidth, response times.

💻 Usage Examples

JavaScript / Fetch

const response = await fetch('https://dreadmarket.net/api/listings.php');
const listings = await response.json();
console.log(`Found ${listings.length} items`);

Python

import requests
response = requests.get('https://dreadmarket.net/api/listings.php')
listings = response.json()
print(f"Found {len(listings)} items")

cURL

curl -s https://dreadmarket.net/api/listings.php | jq '.[0]'

⚠️ Rate Limits

Please be respectful with API usage:

  • Data updates every 30 seconds
  • Cache responses locally when possible
  • No authentication required
  • CORS enabled for browser requests

📬 Contact

Questions, feature requests, or bug reports?

💬
Discord

Join Discord

🐛
Report Issues

Message on Discord for bug reports