0

I'm trying to get my head around Vimeo API with Python. I'm successful in the sense that I can use basic API requests e.g. to list all my videos or similar.

Mostly, I use the /me/videos/ API endpoint. The API reference states, that there can be two options 'query_fields' and 'query'. If I just use 'query', I can filter the results e.g. by a string in the title. I'm assuming this works, because the default value for 'query_fields' is title,description,chapters,tags' according to the API reference.

But what i'd like to do is to use the 'query_fields' for something like: 'query_fields': 'privacy.view' 'query': 'unlisted'

But if I try that, a generic error message is returned

{
    "error": "Searching for a page that does not exist or is too far back in our catalog to present.",
    "link": null,
    "developer_message": "The user's from + size exceeded 10,000, they requested a page of results that does not exist, or they issued an invalid query as defined in the QueryPreprocessorPlugin.",
    "error_code": 2969
}

Has anyone been able to use the 'query_fields' option on any way other than the defautl fields?

Svenito
  • 188
  • 10

1 Answers1

1

You can't query any fields with query_fields, the only valid fields are the ones listed in the docs ('title', 'description', 'chapters', 'tags').

You'd need to manually filter on privacy.view, so i.e.

GET /me/videos?fields=uri,privacy.view

And loop through this filtering for the values you want.

aaronm67
  • 279
  • 1
  • 5
  • Thanks for this confirmation. However, the docs clearly state that 'query_fields' as an argument for a GET to /me/videos. And the 4 fields you mentioned are clearly described as "default values". Therefore it implies the possibility of a "non-default value". Do you agree? I think the documentation is very misleading in that part. Why would this even be an argument if you can not change it? – Svenito Dec 13 '22 at 09:04
  • We can look and see if the documentation can be clarified to be an enum. You can pass any or all of the 4 fields available - so if you want to search title and description, you can use "title,description", for example. – aaronm67 Dec 13 '22 at 13:39
  • 1
    Ah, I see. So there is the possibility to pass values but just a subset of those 4 provided. Thank you very much! – Svenito Dec 14 '22 at 17:14
  • Documentation has been updated to make it more clear this is a comma separated list of enums https://developer.vimeo.com/api/reference/videos#get_videos – aaronm67 Dec 16 '22 at 18:10