1. Request a public fixture
This request works after the site is deployed at MinerAPI.com. For a local preview, replace the origin with the address of your static server, such as http://localhost:8000.
Fetch the ASIC sample
GETcurl --fail --silent --show-error \
https://minerapi.com/api/demo/asic.jsonThe response is the bundled file, not a live device observation.
2. Validate before using a value
Check the HTTP status, parse JSON, and confirm both the demo flag and schema version. This browser example uses the current website origin, so it also works when previewing the extracted site on a local server.
Browser JavaScript
JAVASCRIPTtry {
const response = await fetch("/api/demo/asic.json");
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const sample = await response.json();
if (sample.demo !== true || sample.schema_version !== "1.0") {
throw new Error("Unexpected sample contract");
}
console.log(sample.worker.hashrate_th_s); // 124.8
} catch (error) {
console.error("Sample unavailable:", error.message);
}Run from a page served by this website or its local preview.
3. Keep the meaning attached to the data
The field hashrate_th_s uses terahashes per second. The sample timestamp belongs to the fictional observation and does not change when you reload the page. Read the source and units before displaying a value. Missing data in a real collector should remain distinct from a measured zero.
4. Try another resource
Use the GPU sample to inspect a device-oriented record, or the prompt sample to inspect a versioned prompt and fictional evaluation counts. The reference documents the shared envelope and resource-specific fields.
5. Plan a real adapter separately
These public samples require no private credentials because they contain no private observations. A production collector needs its own authorized environment, device-specific validation, and access controls. Keep that boundary separate from your static presentation layer rather than inserting secrets into the page.