How to use external API content in place of WP posts using $wp_query?

How to use external API content in place of WP posts using $wp_query?