> ## Content Index
> Fetch the complete content index at: https://www.autodidacts.io/llms.txt
> Use this file to discover other available public pages before exploring further.

# Link to segment of a YouTube video with a set stop time using "end" URL query parameter
- URL: https://www.autodidacts.io/link-to-segment-of-youtube-video-with-set-stop-time-using-end-url-query-parameter/
- Published: 2023-02-24T07:37:59.000Z
- Updated: 2024-09-11T23:04:42.000Z
- Author: Curiositry
- Tags: Tech, HowTo, YouTube, Internet

Sometimes, you just want to link to a specific *segment* of a YouTube video. Deep-linking to a specific start time in a YouTube video is fairly common — but sometimes specifying an end-time is as (or more!) important.

After much fruitless Googling, I’ve found a way to do this:

1. Use the embed URL ([https://youtube.com/embed/ID](https://youtube.com/embed/ID?ref=autodidacts.io)) rather than the watch URL ([https://youtube.com/watch?v=ID](https://youtube.com/watch?v=ID&ref=autodidacts.io) or [https://youtube.com/watch/ID](https://youtube.com/watch/ID?ref=autodidacts.io))
2. Specify the start time, end time, or both, using the URL parameters `start` and `end`. The units are seconds. I haven't figured out a way to use other units but it might be possible.

Here are seven seconds from the middle of a Joel Spolsky talk:

[https://www.youtube.com/watch?v=JxBg4sMusIg?start=41&end=48](https://www.youtube.com/watch?v=JxBg4sMusIg?start=41&end=48&ref=autodidacts.io)

(When you use embed URLs as links, it’s just the video — no sidebars or comments. In my view, that's a good thing.)

Here’s an actual embed of the above embed URL, so you can see the query parameters at work without leaving the page:

  
Here’s the same video, starting one minute in:

[https://www.youtube.com/watch?v=JxBg4sMusIg?start=60](https://www.youtube.com/watch?v=JxBg4sMusIg?start=60&ref=autodidacts.io)

Here’s just the first minute of the talk:

[https://www.youtube.com/watch?v=JxBg4sMusIg?end=60](https://www.youtube.com/watch?v=JxBg4sMusIg?end=60&ref=autodidacts.io)

\[For those who aren’t familiar with [URL query strings](https://en.wikipedia.org/wiki/Query%5Fstring?ref=autodidacts.io): a question mark goes after the URL and before the first query parameter, and additional key-value pairs are separated with an ampersand.\]

I’d run across mention of YouTube allowing one to link to a segment of a video using `?start=30&end=60` (or in some cases `stop` rather than `end`) in various articles, but **these parameters don’t work on the watch URL**. When sharing a regular YouTube link, `start=30` turns into `t=30s` and the `stop` or `end` parameter gets thrown out.

At first, I assumed YouTube had removed this useful functionality. But [the docs for the embedded player still mentioned the end parameter](https://developers.google.com/youtube/player%5Fparameters?csw=1&ref=autodidacts.io#end), so I tried using them on the embed URL when not embedded — and it worked!

I hope this helps anyone who has the same question I had.