Skip to content

Ask the data

Ask a question and an AI model will look for the tables that answer it among the more than 250 the site publishes, write the query and reply with the figures, a chart if it helps and the page where you can check it.

Everything happens in your browser: you bring the model and the queries run on your computer over the same files the pages use. SpainFacts does not receive your questions and pays nothing for them.

Chat options
Which model answers

The SpainFacts decider (a small model, Qwen3.5 0.8B, fine-tuned with questions about these data) is downloaded once (about 1 GB, from Hugging Face) and runs on your computer with WebGPU. It only chooses between options (table, figure, period, place) and the code writes the SQL and the answer, so it does not make up figures. Nobody sees your questions.

This browser has no WebGPU. Try a recent Chrome or Edge, or pick another option.

Try:

Answers are written by an AI model from the site’s data: check important figures on the pages it cites.

From Claude Code, Claude Desktop or another MCP client

The same data can be queried from your AI assistant with the SpainFacts MCP server. It runs on your computer, downloads only the tables it uses and needs no key:

git clone https://github.com/SpainFacts/spainfacts.github.io
cd spainfacts.github.io/tools/mcp
npm install
claude mcp add spainfacts -- node "$PWD/servidor.mjs"

In Claude Desktop, add the server to the configuration file (claude_desktop_config.json) with the full path to servidor.mjs:

{
  "mcpServers": {
    "spainfacts": { "command": "node", "args": ["/path/to/spainfacts.github.io/tools/mcp/servidor.mjs"] }
  }
}

It offers three tools: buscar_tablas (search tables), describir_tabla (describe a table) and consultar_sql (read-only DuckDB SQL queries). The table and column names are in Spanish.