opened 10:22PM - 08 Jun 20 UTC
closed 02:08AM - 09 Sep 20 UTC
product: docs
product: api
done
**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**

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**