API Reference

Welcome to the Murder Stone Archive API. This RESTful API allows you to programmatically access historical murder stone events, geographical data, and aggregated analysis.

Base URL: https://themurderstonearchive.com/api/v1

Authentication

Authenticate your API requests by including your API key in the request headers.

X-Api-Key Required Your secret API key. Do not share this in client-side code.

Endpoints

GET /events

List all murder stone events with pagination.

Query Parameters
ParameterTypeDescription
pageNumber int Optional. Page number (default: 1).
pageSize int Optional. Results per page, max 500 (default: 50).
curl -X GET "https://themurderstonearchive.com/api/v1/events?pageNumber=1&pageSize=20" \
  -H "X-Api-Key: YOUR_API_KEY"
fetch('https://themurderstonearchive.com/api/v1/events?pageNumber=1&pageSize=20', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY'
  }
})
.then(response => response.json())
.then(data => console.log(data));
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");

var response = await client.GetAsync("https://themurderstonearchive.com/api/v1/events?pageNumber=1&pageSize=20");
var content = await response.Content.ReadAsStringAsync();
import requests

url = "https://themurderstonearchive.com/api/v1/events?pageNumber=1&pageSize=20"
headers = {"X-Api-Key": "YOUR_API_KEY"}

response = requests.get(url, headers=headers)
print(response.json())

GET /events/search

Search for events by title, description, or location.

Query Parameters
ParameterTypeDescription
query string Required. Search term (min 2 characters).
pageNumber int Optional. Page number (default: 1).
pageSize int Optional. Results per page (default: 50).
curl -X GET "https://themurderstonearchive.com/api/v1/events/search?query=Scotland" \
  -H "X-Api-Key: YOUR_API_KEY"
fetch('https://themurderstonearchive.com/api/v1/events/search?query=Scotland', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' }
}).then(res => res.json());
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var response = await client.GetAsync("https://themurderstonearchive.com/api/v1/events/search?query=Scotland");
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
res = requests.get("https://themurderstonearchive.com/api/v1/events/search?query=Scotland", headers=headers)

GET /events/{id}

Get a single event by ID.

Path Parameters
ParameterTypeDescription
id int Required. The unique identifier of the event.
curl -X GET "https://themurderstonearchive.com/api/v1/events/42" \
  -H "X-Api-Key: YOUR_API_KEY"
fetch('https://themurderstonearchive.com/api/v1/events/42', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' }
}).then(res => res.json());

GET /events/analysis

★ Premium only. Get aggregated analysis (clusters, trends, region insights).

curl -X GET "https://themurderstonearchive.com/api/v1/events/analysis" \
  -H "X-Api-Key: YOUR_PREMIUM_KEY"
fetch('https://themurderstonearchive.com/api/v1/events/analysis', {
  headers: { 'X-Api-Key': 'YOUR_PREMIUM_KEY' }
}).then(res => res.json());

Response Format

All endpoints return data in JSON format. A standard success response looks like this:

{
  "success": true,
  "data": [
    {
      "id": 1,
      "title": "Stone of the Murdered Maiden",
      "year": 1650,
      "location": {
        "id": 1,
        "name": "Perthshire, Scotland",
        "latitude": 56.89,
        "longitude": -3.51
      },
      "victimCount": 1
    }
  ],
  "totalCount": 125,
  "pageNumber": 1,
  "pageSize": 50,
  "message": null
}

A standard error response (e.g., HTTP 401 Unauthorized or HTTP 429 Too Many Requests):

{
  "success": false,
  "message": "Invalid or revoked API key",
  "errorCode": "INVALID_API_KEY"
}