Does VK API support a search by file type?

1.5k views Asked by At

Say I browse to a vk community and would like to be able to retrieve all of the gifs uploaded to that community, How would I go about this?

1

There are 1 answers

3
SwiftStudier On BEST ANSWER

You can use method docs.get

Access it by link

https://api.vk.com/method/docs.get.xml?owner_id=-GROUP_ID&access_token=YOUR_ACCESS_TOKEN

Read this my answer to know a bit more if you do not have an acess_token

In result you will see a document with xml-format. (if you want to use json-response-format just remove ".xml" from link you're accessing)

Document will contatin all doc-count and information about each of them like document_id, its title and size, extension and url.

Note that if you accessnig documents from community (not from user) your owner_id in the link must be negative, it must contain - before community_id

To know community id you can read another my post

Feel free to ask any questions if you didn't understand anything :)