I know that Peninsula is much larger than a cape, but is there a definite way to differentiate them? I.e. by area- if the total area is larger than 30 sqkm, any headland is classified as peninsula..
First let's define the terms:
Peninsula: A headland or promontory surrounded by water but connected to the mainland by a neck or isthmus. Source.
This definition is similar to the aforementioned and provide a few examples, underlining that the size (scale) is not an important criteria characterizing peninsulas. For example Baja California (Mexico) is 143000 km^2 in surface. Gaspésie (Québec, Eastern Canada) is 30000+ km^2. The Korean peninsula is more than 200000 km^2. Peninsulas can be of any size in surface if it meet the above definition. Normal usage of this term target large headlands surrounded by water but does not disqualify similar but smaller landforms even if unusual.
Cape: A marked change or discontinuity in trend of the coastline. This change is often a high point of land extending in the water, possibly because the rock formation at the extrusion is harder or more resistant to erosion than the surrounding coastline system. A cape or many capes can be featured on a peninsula (but typically not the other way around). Normally, cape are smaller than peninsulas. Cape of Good Hope (South Africa) and the North Cape (Norway) are examples of capes.
The Cape need to be a feature of the coastline, such as a discontinuity, or a point of land extruding from the coastline toward the deep sea. The coastline can be an island or a big mass of land and the cape a single feature along the coastline. The scale to consider here is the coastline, and the cape being one out of the ordinary extruding component of the coastline.
The Peninsula definition is loose unlike the cape definition. By typical usage peninsulas are much wider and longer than any capes.
Like many of the concepts in geography, terms and definitions are open to debate or interchangeable, so I would not say there is a precise threshold separating capes from peninsulas. But I am pretty sure, using the existing definitions, that I can properly name those landforms most of the time when I see it.