Youtube API V3, search , publishedAfter, invalidSearchFilter

I'm just trying to make a search over youtube for my own videos that publisher after X date

However when i use publishAfter parameter, it's giving invalidSearchFilter error even of i set type parameter as video.

Error description is like this:

The request contains an invalid combination of search filters and/or restrictions. Note that you must set the type parameter to video if you set either the forContentOwner or forMine parameters to true. You must also set the type parameter to video if you set a value for the eventType, videoCaption, videoCategoryId, videoDefinition, videoDimension, videoDuration, videoEmbeddable, videoLicense, videoSyndicated, or videoType parameters.

You can reproduce this error from: https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.search.list?part=snippet&forMine=true&publishedAfter=1970-01-01T00%253A00%253A00Z&type=video&_h=11& (after login via oauth 2.0)

Any idea what can i do in this situation?


Solution 1:

I used the link that you provided. The problem is not the date. The problem is the conflicting search restrictions that you used. To make your search work, leave the "forMine" parameter empty so it doesn't conflict with your date filters and possibly the 'q' parameter as well. Do that and it will work.

Also, you have to specify the channelID to specify it's yours. Give it a try