Yoast Surfaces API
The Yoast Surfaces API provides a PHP interface for retrieving SEO metadata programmatically within WordPress. It exposes the YoastSEO() surface with methods to get metadata for the current page, a specific post by ID, or a given URL. Returns titles, descriptions, Schema arrays, canonical URLs, robots directives, OpenGraph, and Twitter card data.