Title: Removing Graph Schema data From API JSON output
Last modified: July 23, 2021

---

# Removing Graph Schema data From API JSON output

 *  Resolved [snicholson](https://wordpress.org/support/users/snicholson/)
 * (@snicholson)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/removing-graph-schema-data-from-api-json-output/)
 * We use the free version of the Yoast SEO plugin and we have run into an issue
   where we need to remove the graph schema data from the API. Per the API documentation,
   we added this exact code to our functions.php
 * //Removes the Yoast Graph Schema From The API
    add_filter( ‘wpseo_json_ld_output’,‘
   __return_false’ ); //End removal of graph schema from API
 * When we run a request through Postman of:
 * ourdomain.com/wp-json/wp/v2/posts/9580
 * We receive a succusful 200 response and we see the data, *including* the Yoast
   schema data. We have cleared the server cache, restarted Postman, etc..but it
   still shows, so I’m wondering if that directive still works. Is there a way to
   actually remove it?
 * Thanks for any help you can provide.
 * –Sean

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Suwash Kunwar](https://wordpress.org/support/users/suascat_wp/)
 * (@suascat_wp)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/removing-graph-schema-data-from-api-json-output/#post-14696737)
 * [@snicholson](https://wordpress.org/support/users/snicholson/)
 * I understand you’re trying to remove the Yoast Graph Schema From The API using
   the given filter but did not work in your case.
 * To confirm, we checked by adding the same filter on the default TwentyTwenty 
   theme, and with Yoast SEO v16.7 and WordPress v5.8, the filter work as expected.
 * Checking the page source of the website, we also did not find the schema information
   that outputs within script format `<script type="application/ld+json" class="
   yoast-schema-graph">`.
 * Can you please check your configuration and verify from the page source too?
 * You may need to clear the cache as well.
 * We look forward to hearing from you.
 *  Plugin Support [Michael Tiña](https://wordpress.org/support/users/mikes41720/)
 * (@mikes41720)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/removing-graph-schema-data-from-api-json-output/#post-14728562)
 * Hello,
 * This thread has been marked as resolved due to a lack of activity.
 * You’re always welcome to re-open this topic. Please read [this post](https://wordpress.org/support/topic/read-this-before-your-post/)
   before [opening a new request](https://wordpress.org/support/plugin/wordpress-seo#new-post).
 * Thanks for understanding!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Removing Graph Schema data From API JSON output’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [json](https://wordpress.org/support/topic-tag/json/)
 * [Yoast](https://wordpress.org/support/topic-tag/yoast/)

 * 2 replies
 * 3 participants
 * Last reply from: [Michael Tiña](https://wordpress.org/support/users/mikes41720/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/removing-graph-schema-data-from-api-json-output/#post-14728562)
 * Status: resolved