{
  "openapi": "3.1.1",
  "info": {
    "title": "Interactive Periodic Table \u0026 Property Trends API",
    "version": "1.0.0",
    "summary": "Periodic table heatmaps of electronegativity, radius, ionisation energy and more, with trends.",
    "description": "Every endpoint performs the same calculation as the human page and returns inputs, result, units, assumptions, sources, warnings and computedAt. MCP endpoint: /mcp."
  },
  "servers": [
    {
      "url": "https://prooflineperiodictable.usefulweb.app"
    }
  ],
  "paths": {
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "Periodic table heatmaps of electronegativity, radius, ionisation energy and more, with trends.",
        "description": "Colour the periodic table by a property — electronegativity, atomic radius, first ionisation energy, electron affinity, melting and boiling point, density, atomic weight or year of discovery — or by category, block and state. See how the property changes across a period, down a group or along the atomic number, look up one element at a glance or compare up to twelve side by side. Values come from the PubChem periodic table (compiled from NIST, LANL and Jefferson Lab) and the IUPAC standard atomic weights. Part of the Proofline math notebook.\n\nMethodology:\n- Each element’s values come from the PubChem periodic table summary (Pauling electronegativity, van der Waals radius, first ionisation energy from NIST, electron affinity, melting and boiling point, density, standard state, group block, year of discovery) and the CIAAW abridged standard atomic weights. Elements never made in weighable amounts have empty values; nothing is estimated.\n- Heatmap colours use the colour-blind-safe viridis scale between the smallest and largest value (density on a log scale because it spans eight orders of magnitude); grey means no value. Positions follow the IUPAC 18-group layout with the lanthanides and actinides as two rows below.\n- Trend charts plot the property against the atomic number for all elements, one period (left to right) or one group (top to bottom); the element card lists every property and the electron configuration from Proofline’s configuration engine.\n\nProperty values vary between sources and definitions (radius in particular); these are reference values for learning, not measurements of your sample. Nothing here is advice on handling chemicals or radioactive material safely.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "proofline_periodic_table",
        "x-owner-app": "proofline",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProoflinePeriodicTableInput"
              },
              "examples": {
                "example1": {
                  "summary": "Electronegativity across period 2, with fluorine",
                  "value": {
                    "property": "electronegativity",
                    "elements": "F",
                    "trend": "period",
                    "index": 2
                  }
                },
                "example2": {
                  "summary": "First ionisation energy down group 1",
                  "value": {
                    "property": "ionization",
                    "trend": "group",
                    "index": 1
                  }
                },
                "example3": {
                  "summary": "Atomic radius along the atomic number",
                  "value": {
                    "property": "radius"
                  }
                },
                "example4": {
                  "summary": "Density of every element on a log scale, osmium highlighted",
                  "value": {
                    "property": "density",
                    "elements": "Os"
                  }
                },
                "example5": {
                  "summary": "Element categories, comparing iron, copper and gold",
                  "value": {
                    "property": "category",
                    "elements": "Fe, Cu, Au"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProoflinePeriodicTableResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tool": {
      "get": {
        "operationId": "getToolDefinition",
        "summary": "Inputs, output schema and examples for this tool",
        "responses": {
          "200": {
            "description": "Tool definition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. 422 responses include per-field `errors`.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ProoflinePeriodicTableInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "property": {
            "title": "Property",
            "type": "string",
            "enum": [
              "electronegativity",
              "radius",
              "ionization",
              "affinity",
              "melting",
              "boiling",
              "density",
              "mass",
              "year",
              "category",
              "block",
              "state"
            ],
            "default": "electronegativity"
          },
          "elements": {
            "title": "Elements to look up (optional)",
            "description": "Symbols, names or atomic numbers separated by commas; one element shows its card, several (at most 12) a comparison table.",
            "type": "string",
            "maxLength": 300,
            "default": ""
          },
          "trend": {
            "title": "Trend",
            "type": "string",
            "enum": [
              "atomic-number",
              "period",
              "group"
            ],
            "default": "atomic-number"
          },
          "index": {
            "title": "Period or group number",
            "description": "For a period trend 1–7, for a group trend 1–18. Empty: the period or group of the first element looked up.",
            "type": "integer",
            "minimum": 1,
            "maximum": 18
          },
          "scale": {
            "title": "Colour scale",
            "type": "string",
            "enum": [
              "auto",
              "linear",
              "log"
            ],
            "default": "auto"
          }
        },
        "required": []
      },
      "ProoflinePeriodicTableResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "property",
              "label",
              "unit",
              "scale",
              "stats",
              "trend",
              "index",
              "trendValues",
              "elements",
              "values"
            ],
            "properties": {
              "property": {
                "type": "string",
                "enum": [
                  "electronegativity",
                  "radius",
                  "ionization",
                  "affinity",
                  "melting",
                  "boiling",
                  "density",
                  "mass",
                  "year",
                  "category",
                  "block",
                  "state"
                ]
              },
              "label": {
                "type": "string"
              },
              "unit": {
                "type": "string"
              },
              "scale": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": false,
                "required": [
                  "min",
                  "max",
                  "log"
                ],
                "properties": {
                  "min": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  },
                  "log": {
                    "type": "boolean"
                  }
                }
              },
              "stats": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "trend": {
                "type": "string",
                "enum": [
                  "atomic-number",
                  "period",
                  "group"
                ]
              },
              "index": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "trendValues": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "z",
                    "symbol",
                    "name",
                    "value"
                  ],
                  "properties": {
                    "z": {
                      "type": "integer"
                    },
                    "symbol": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "value": {
                      "type": [
                        "number",
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "elements": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "values": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "z",
                    "symbol",
                    "name",
                    "value"
                  ],
                  "properties": {
                    "z": {
                      "type": "integer"
                    },
                    "symbol": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "value": {
                      "type": [
                        "number",
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}