← Back to docs

IRC Memory Lane - API Guide (current)

Language: EN | EN | SV

IRC Memory Lane - API Guide (current)

This guide documents the current API surface used by the web client and ircwatch.

Base URL

https://tools.tornevall.net/irc/api

Standard flow

  1. Fetch networks:
    • GET /irc/api/networks?source=production
  2. Fetch channels for a network:
    • GET /irc/api/networks/{network_id}/channels?source=production
  3. Fetch log rows:
    • GET /irc/api/logs?network_id={id}&channel_id={id}&source=production&limit=100&offset=0

source (important)

  • source=production (default)
  • source=sandbox

Use the same source consistently in networks/channels/logs requests.

Log search (/irc/api/logs)

Common query parameters

  • network_id (int)
  • channel_id (int)
  • q (string, free text, also supports +include / -exclude, including quoted phrases)
  • include_terms (string, explicit include terms; space/comma separated)
  • exclude_terms (string, explicit exclude terms; space/comma separated)
  • nick (string, alias-aware)
  • recipient (string)
  • private_only (true|false)
  • date (YYYY-MM-DD)
  • date_from / date_to (YYYY-MM-DD)
  • datetime_from / datetime_to (YYYY-MM-DD HH:MM:SS)
  • limit (1-1000, default 100)
  • offset (>=0, default 0)
  • source (production|sandbox)

Date precedence

  1. If date is set, that day is used.
  2. Otherwise datetime_from / datetime_to are used when present.
  3. Otherwise date_from / date_to are used.

Examples

curl "https://tools.tornevall.net/irc/api/logs?network_id=1&channel_id=1&source=production&q=nu+d%C3%A5&limit=50&offset=0"
curl "https://tools.tornevall.net/irc/api/logs?network_id=1&channel_id=1&source=production&q=%2Bflood+-%22received+server%22&include_terms=1999&exclude_terms=bot"
curl "https://tools.tornevall.net/irc/api/logs?network_id=1&channel_id=1&source=production&datetime_from=1999-04-14+13:55:00&datetime_to=1999-04-14+16:08:00"

Authentication

  • The read endpoints above are public.
  • Authorization: Bearer <token> may still be sent when your client already uses token auth.

Logs response shape

{
  "success": true,
  "source": "production",
  "total": 1234,
  "limit": 100,
  "offset": 0,
  "results": [],
  "nick_profile": null
}

results contains log rows (e.*) plus channel_name.

ircwatch command mapping

  • !irclogs networks
  • !irclogs channels <network|id> [filter]
  • !memorylane [#channel] <query/date>

These commands use the same three endpoints above.

Legacy path note

Older /api/irclog/* examples should be treated as legacy. Use /irc/api/* for new integrations.


Version: 2.0
Updated: 2026-07-21