The Search Console API provides management and test features, and data download functionality for performance data and sitemaps data. Performance report data is limited to 50K rows of data per day per type (web, news, image, and so on) per property.
The API supports filtering, sorting, aggregation type, and all other features available in the reports, but not freeform SQL queries.
The API is free, though it does have a usage quota, and is ideal for implementing a custom interface using many programming languages (Java, .NET, Python, and more) for medium-sized sites that want more data than the report shows and managing your own SQL queries within your programming language against a smallish data set.