To access the flooding data you need to first sign a disclaimer, available here, from DCC.
Once DCC approve your request you will have access to all of the flooding datasets:
and the API, which will give you query access to:
for each of the flooding data sources. Here is the API specification.
The historical datasets comprise annual and monthly CSVs of flooding data.