{
  "openapi": "3.1.0",
  "info": {
    "title": "Chemical Elements API",
    "version": "1.0.0",
    "description": "All 118 chemical elements with NIST properties: mass, configuration, electronegativity, melting points and more.\n\nThe periodic table as an API, from NIST data via PubChem (public domain). All 118 elements with the properties that matter: atomic mass, electron configuration, electronegativity (Pauling), van der Waals radius, ionization energy, electron affinity, oxidation states, standard state, melting and boiling points (Kelvin), density, CPK display color, discovery year, group block (alkali metal, noble gas, lanthanide...) — plus the derived period (1-7) and IUPAC group number (1-18, correctly NULL for lanthanides and actinides). Look elements up by atomic number, symbol or name (Au, gold and 79 all resolve — 196.96657 u, melts at 1337.33 K, flanked by its neighbors platinum and mercury). Slice the table any way a chemistry app needs: group=18 returns exactly the seven noble gases, period=2 returns Li through Ne, state=Liquid returns exactly bromine and mercury, group_block=Alkali metal returns the six alkalis. Every response carries an explicit units object so nobody guesses Kelvin vs Celsius. Education platforms, chemistry homework tools, quiz games, lab software, science content — the reference dataset at one token per call.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/elements.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/elements"
  },
  "servers": [
    {
      "url": "https://api-elements.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Education",
      "description": "Chemical Elements API belongs to the Education category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/sources": {
      "get": {
        "operationId": "dataSources",
        "summary": "Data Sources",
        "description": "Data Sources endpoint of the Chemical Elements API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/elements/data-sources"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "sources": [
                    {
                      "slug": "pubchem",
                      "name": "PubChem periodic table",
                      "publisher": "NCBI/NIST",
                      "licence": "US government work (public domain)",
                      "source_url": "https://pubchem.ncbi.nlm.nih.gov/periodic-table/",
                      "file_url": "https://pubchem.ncbi.nlm.nih.gov/rest/pug/periodictable/JSON",
                      "cadence": "static (new elements are rare events)",
                      "record_count": 118,
                      "retrieved_at": "2026-09-06"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/elements/{key}": {
      "get": {
        "operationId": "elementLookup",
        "summary": "Element Lookup",
        "description": "Element Lookup endpoint of the Chemical Elements API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/elements/element-lookup"
        },
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Au"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "units": {
                    "atomic_mass": "u",
                    "atomic_radius": "pm (van der Waals)",
                    "ionization_energy": "eV",
                    "electron_affinity": "eV",
                    "melting_point": "K",
                    "boiling_point": "K",
                    "density": "g/cm3",
                    "electronegativity": "Pauling scale"
                  },
                  "element": {
                    "atomic_number": 79,
                    "symbol": "Au",
                    "name": "Gold",
                    "atomic_mass": 196.96657,
                    "cpk_color": "#FFD123",
                    "electron_configuration": "[Xe]6s1 4f14 5d10",
                    "electronegativity": 2.54,
                    "atomic_radius": 166,
                    "ionization_energy": 9.226,
                    "electron_affinity": 2.309,
                    "oxidation_states": "+3, +1",
                    "standard_state": "Solid",
                    "melting_point": 1337.33,
                    "boiling_point": 3129,
                    "density": 19.282,
                    "group_block": "Transition metal",
                    "year_discovered": "Ancient",
                    "period": 6,
                    "group_number": 11
                  },
                  "neighbors": [
                    {
                      "atomic_number": 78,
                      "symbol": "Pt",
                      "name": "Platinum"
                    },
                    {
                      "atomic_number": 80,
                      "symbol": "Hg",
                      "name": "Mercury"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/elements": {
      "get": {
        "operationId": "listElements",
        "summary": "List Elements",
        "description": "List Elements endpoint of the Chemical Elements API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/elements/list-elements"
        },
        "parameters": [
          {
            "name": "group",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group_block",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "gold"
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "total": 1,
                  "units": {
                    "atomic_mass": "u",
                    "atomic_radius": "pm (van der Waals)",
                    "ionization_energy": "eV",
                    "electron_affinity": "eV",
                    "melting_point": "K",
                    "boiling_point": "K",
                    "density": "g/cm3",
                    "electronegativity": "Pauling scale"
                  },
                  "elements": [
                    {
                      "atomic_number": 79,
                      "symbol": "Au",
                      "name": "Gold",
                      "atomic_mass": 196.96657,
                      "cpk_color": "#FFD123",
                      "electron_configuration": "[Xe]6s1 4f14 5d10",
                      "electronegativity": 2.54,
                      "atomic_radius": 166,
                      "ionization_energy": 9.226,
                      "electron_affinity": 2.309,
                      "oxidation_states": "+3, +1",
                      "standard_state": "Solid",
                      "melting_point": 1337.33,
                      "boiling_point": 3129,
                      "density": 19.282,
                      "group_block": "Transition metal",
                      "year_discovered": "Ancient",
                      "period": 6,
                      "group_number": 11
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/elements/random": {
      "get": {
        "operationId": "randomElement",
        "summary": "Random Element",
        "description": "Random Element endpoint of the Chemical Elements API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/elements/random-element"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "units": {
                    "atomic_mass": "u",
                    "atomic_radius": "pm (van der Waals)",
                    "ionization_energy": "eV",
                    "electron_affinity": "eV",
                    "melting_point": "K",
                    "boiling_point": "K",
                    "density": "g/cm3",
                    "electronegativity": "Pauling scale"
                  },
                  "element": {
                    "atomic_number": 61,
                    "symbol": "Pm",
                    "name": "Promethium",
                    "atomic_mass": 144.91276,
                    "cpk_color": "#A3FFC7",
                    "electron_configuration": "[Xe]6s2 4f5",
                    "electronegativity": null,
                    "atomic_radius": 236,
                    "ionization_energy": 5.55,
                    "electron_affinity": null,
                    "oxidation_states": "+3",
                    "standard_state": "Solid",
                    "melting_point": 1315,
                    "boiling_point": 3273,
                    "density": 7.26,
                    "group_block": "Lanthanide",
                    "year_discovered": "1945",
                    "period": 6,
                    "group_number": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}