Title: oembed_result
Published: April 25, 2014
Last modified: May 20, 2026

---

# apply_filters( ‘oembed_result’, string|false $data, string $url, string|array $args )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/oembed_result/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/oembed_result/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/oembed_result/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/oembed_result/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/oembed_result/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/hooks/oembed_result/?output_format=md#wp--skip-link--target)

Filters the HTML returned by the oEmbed provider.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/oembed_result/?output_format=md#parameters)󠁿

 `$data`string|false

The returned oEmbed HTML (false if unsafe).

`$url`string

URL of the content to be embedded.

`$args`string|array

Additional arguments for retrieving embed HTML.
 See [wp_oembed_get()](https://developer.wordpress.org/reference/functions/wp_oembed_get/)
for accepted arguments. Default empty.

More Arguments from wp_oembed_get( … $args )

Additional arguments for retrieving embed HTML.

 * `width` int|string
 * Optional. The `maxwidth` value passed to the provider URL.
 * `height` int|string
 * Optional. The `maxheight` value passed to the provider URL.
 * `discover` bool
 * Optional. Determines whether to attempt to discover link tags at the given URL
   for an oEmbed provider when the provider URL is not found in the built-in providers
   list. Default true.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/oembed_result/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'oembed_result', $this->data2html( $data, $url ), $url, $args );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-oembed.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/class-wp-oembed.php#L424)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/class-wp-oembed.php#L424-L424)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/oembed_result/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_oEmbed_Controller::get_proxy_item()](https://developer.wordpress.org/reference/classes/wp_oembed_controller/get_proxy_item/)`wp-includes/class-wp-oembed-controller.php` |

Callback for the proxy API endpoint.

  | 
| [WP_oEmbed::get_html()](https://developer.wordpress.org/reference/classes/wp_oembed/get_html/)`wp-includes/class-wp-oembed.php` |

The do-it-all function that takes a URL and attempts to return the HTML.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/oembed_result/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.9.0](https://developer.wordpress.org/reference/since/2.9.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/oembed_result/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/hooks/oembed_result/?output_format=md#comment-content-2330)
 2.   [Andis](https://profiles.wordpress.org/andydegroo/)  [  9 years ago  ](https://developer.wordpress.org/reference/hooks/oembed_result/#comment-2330)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Foembed_result%2F%23comment-2330)
    Vote results for this note: 3[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Foembed_result%2F%23comment-2330)
 4. In case you are wondering why this filter does not work for you:
     The [oembed_result](https://developer.wordpress.org/reference/hooks/oembed_result/)
    filter is applied before the oEmbed response is cached as `_oembed_*` meta entry
    in the `postmeta` table. If you want to always modify the oembed HTML, you should
    look at [embed_oembed_html](https://developer.wordpress.org/reference/hooks/embed_oembed_html/)
    filter. However, using the `embed_oembed_html` filter may reduce site’s performance,
    because it is called on every page load for every embed URL.
 5.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Foembed_result%2F%3Freplytocom%3D2330%23feedback-editor-2330)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Foembed_result%2F)
before being able to contribute a note or feedback.