# Get clips 'date filtering' not filtering out some dates

**URL:** <https://discuss.dev.twitch.com/t/get-clips-date-filtering-not-filtering-out-some-dates/26908>\
**Category:** API\
**Created:** [July 3, 2020, 2:23am UTC](https://discuss.dev.twitch.com/t/get-clips-date-filtering-not-filtering-out-some-dates/26908 "2020-07-03T02:23:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shiranv](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@shiranv](https://discuss.dev.twitch.com/u/shiranv)\
**Post date:** [July 3, 2020, 2:23am UTC](https://discuss.dev.twitch.com/t/get-clips-date-filtering-not-filtering-out-some-dates/26908/1 "2020-07-03T02:23:59Z")

</div>

When I want to get a list of clips published before a certain date, and I call ‘get clips’ with a certain ‘ended\_at’ date, I sometimes get clips that started after that date. I’m wondering, is this Is a known bug?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [July 3, 2020, 2:30am UTC](https://discuss.dev.twitch.com/t/get-clips-date-filtering-not-filtering-out-some-dates/26908/2 "2020-07-03T02:30:41Z")

</div>

> <https://github.com/twitchdev/issues/issues/80>
>
> \*\*Brief description\*\*
> 
> Larger date ranges omit clips from the response when us…ing Get Clips
> 
> https://dev.twitch.tv/docs/api/reference#get-clips
> 
> \*\*How to reproduce\*\*
> 
> https://dev.twitch.tv/docs/api/reference#get-clips
> 
> Calling 
> 
> \> https://api.twitch.tv/helix/clips?broadcaster\_id=66016174&started\_at=2020-03-01T12:00:00Z&ended\_at=2020-03-30T12:00:00Z&first=100
> 
> Fails to return the clip
> 
> \> https://api.twitch.tv/helix/clips?id=TrappedColdSashimiTBTacoLeft
> 
> But
> 
> \> https://api.twitch.tv/helix/clips?broadcaster\_id=66016174&started\_at=2020-03-04T00:00:00Z&ended\_at=2020-03-05T12:00:00Z&first=100
> 
> Returns it.
> 
> The second date range is inside the first so the clip in question should be returned in the first lookup. One assumes other clips maybe missing from "large" date range lookups.
> 
> \*\*Expected behavior\*\*
> 
> Return all clips created inside the date range
> 
> \*\*Additional context or questions\*\*
> 
> Report on discord starts here
> 
> https://discordapp.com/channels/504015559252377601/523675960797691915/689052568780931117

> <https://github.com/twitchdev/issues/issues/133>
>
> \*\*Brief description\*\*
> 
> Similar to #18 I get to page 11 and the code stops fetc…hing clips
> 
> \*\*How to reproduce\*\*
> 
> \`\`\`
> const fs = require('fs');
> const path = require('path');
> 
> const got = require('got');
> 
> var users = {};
> 
> let page = 0;
> fetchPage = function(c) {
> got({
> url: 'https://api.twitch.tv/helix/clips',
> searchParams: {
> broadcaster\_id: '23735582',
> after: c,
> first: 100
> },
> headers: {
> 'client-id': 'b2z6u6b4sg6p84d3pq1ykcehlk1vhh9',
> authorization: 'Bearer AVALIDTOKE'
> },
> responseType: 'json'
> })
> .then(resp =\> {
> page++;
> 
> for (var x=0;x\<resp.body.data.length;x++) {
> users\[resp.body.data\[x\].user\_id\] = 1;
> }
> 
> console.log('Page',page,'has',resp.body.data.length,'users',Object.keys(users).length);
> 
> fs.appendFileSync(path.join(
> \_\_dirname,
> 'pages',
> page + '.json'
> ), JSON.stringify(resp.body,null,4));
> if (resp.body.pagination && resp.body.pagination.cursor) {
> fetchPage(resp.body.pagination.cursor);
> }
> })
> .catch(err =\> {
> console.log(err);
> });
> }
> fetchPage('');
> \`\`\`
> 
> \*\*Expected behavior\*\*
> 
> Get all clips for that broadcaster.
> 
> \*\*Screenshots\*\*
> 
> !\[image\](https://user-images.githubusercontent.com/20999/84086088-f0711c80-a9de-11ea-9fce-a5cdcd6db8e1.png)
> 
> End of page 11:
> 
> \`\`\`
> {
> "id": "SpotlessZealousSangPupper",
> "url": "https://clips.twitch.tv/SpotlessZealousSangPupper",
> "embed\_url": "https://clips.twitch.tv/embed?clip=SpotlessZealousSangPupper",
> "broadcaster\_id": "23735582",
> "broadcaster\_name": "Sacriel",
> "creator\_id": "65127431",
> "creator\_name": "Jaheija",
> "video\_id": "176890327",
> "game\_id": "493057",
> "language": "en-gb",
> "title": "SacSingle & ShannonSingle PogChamp",
> "view\_count": 290,
> "created\_at": "2017-09-23T15:23:47Z",
> "thumbnail\_url": "https://clips-media-assets2.twitch.tv/26321450576-offset-7934-preview-480x272.jpg"
> }
> \],
> "pagination": {}
> }
> \`\`\`
> 
> \*\*Additional context or questions\*\*

A number of clips API issues are being tracked

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [August 2, 2020, 2:30am UTC](https://discuss.dev.twitch.com/t/get-clips-date-filtering-not-filtering-out-some-dates/26908/3 "2020-08-02T02:30:42Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
