The Spark SQL API is a collection of functions and classes for querying structured data using Spark. The API supports SQL-like queries, as well as the use of Datasets and DataFrames in Spark, which provide a higher-level API for processing structured data.