Title: oembed_fetch_url
Published: April 25, 2014
Last modified: April 28, 2025

---

# apply_filters( ‘oembed_fetch_url’, string $provider, string $url, array $args )

## In this article

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

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

Filters the oEmbed URL to be fetched.

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

 `$provider`string

URL of the oEmbed provider.

`$url`string

URL of the content to be embedded.

`$args`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. Default empty.

 * `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_fetch_url/?output_format=md#source)󠁿

    ```php
    $provider = apply_filters( 'oembed_fetch_url', $provider, $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/6.9.4/src/wp-includes/class-wp-oembed.php#L553)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-oembed.php#L553-L553)

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

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

Connects to an oEmbed provider and returns the result.

  |

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

| Version | Description | 
| [4.9.0](https://developer.wordpress.org/reference/since/4.9.0/) | The `dnt` (Do Not Track) query parameter was added to all oEmbed provider URLs. | 
| [2.9.0](https://developer.wordpress.org/reference/since/2.9.0/) | Introduced. |

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

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/hooks/oembed_fetch_url/?output_format=md#comment-content-1684)
 2.   [eclev91](https://profiles.wordpress.org/eclev91/)  [  10 years ago  ](https://developer.wordpress.org/reference/hooks/oembed_fetch_url/#comment-1684)
 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_fetch_url%2F%23comment-1684)
    Vote results for this note: 1[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_fetch_url%2F%23comment-1684)
 4. WordPress actually caches the oembed results, so if you’re using this but not seeing
    it take effect immediately, try clearing those out like this: [https://siteorigin.com/clearing-oembed-cache/](https://siteorigin.com/clearing-oembed-cache/)
 5.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Foembed_fetch_url%2F%3Freplytocom%3D1684%23feedback-editor-1684)

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