Got 5min?
Find

Bulk API

Making a VideoSeed/Bulk Request
Creating the XML for the Request
Name Required/Optional Type Comment
batch Required Root Element
syndicator_id Required Element Validate its existence in our system
callback_url Required Element Validate for URL format
urls Required (single) Element
url Required (1-1000) Element
addr Required Attribute Validate for URL format
categories_list Optional Attribute Can be name or id, separated by comma. Validate all categories exist in our system.
Example Request
To send for a batch of URLs for VideoSeed analysis , you would make this request:
http://api.5min.com/videoseed/bulk.xml
bulk_urls=XML post data
Example XML Request
Here's an example of the XML requested to post:
bulk_urls=<?xml version="1.0" encoding="UTF-8"?>
<batch>
<syndicator_id>syndicator_id(sid)</syndicator_id>
<callback_url>callback url</callback_url>
<urls>
<url addr="url 1 to analyze" />
<url addr="url 2 to analyze" categories_list="health,food"/>
<url addr="url 3 to analyze" categories_list="2"/>
</urls>
</batch>
Messages
When Error code Message Comment
No xml or empty xml sent 109 The XML you sent is missing or empty. Please send us a valid XML.
Any Error in XML scheme 106 The 'syndicator_id' start tag on line 3 does not match the end tag of 'syndicator_id'. Line 3, position 23. Please correct it and send again. All scheme errors will cause a similar error with specific scheme error message. Used for extra parameters. Not part of the scheme.
Syndicator_id does not exist in our system 105 The SID you sent is incorrect, please correct it and send again.
One or more categories not found 106 The Category name or number is not identified, please correct it and send again. Writes down the first invalid category name or id
Any other error 100 Oops, it seems like we had an error. Please try again. Internal Error
Success -Acknowledge xml return to user Your Bulk Syndication URLs are currently analyzed, we'll notify you once the process is completed.
Example error XML response
<response status="failed">
<error code="106" description="The 'urls' start tag on line 5 does not match the end tag of 'urls'. Line 12, position 4." />
</response>
Example success XML response
<response status="ok" syndicator_id="id" batch_id="500">
<message>
Your Bulk Syndication URLs are currently analyzed, we'll notify you once the process is completed
</message>
</response>
Making a VideoSeed/BulkStatus Request
Making the URL
http://api.5min.com/VideoSeed/BulkStatus.xml[?extra]
batch_id required - obtained by VideoSeed/Bulk response
return_videos optional - include video list per URL, default - false
Messages
When Error code Message Comments
No batch_id parameter or 0 sent 110 The batch_id is missing. Please send a valid batch_id.
batch_id not found 110 The batch_id you sent is incorrect. Please correct it and try again.
Any other xml scheme error 106 The 'syndicator_id' start tag on line 3 does not match the end tag of 'syndicator_id'. Line 3, position 23. Please correct it and send again. All scheme errors will cause a similar error.
Any other error 100 Oops, it seems like we had an error. Please try again.
Example error XML response
<response status="failed">
<error code="106" description="The 'urls' start tag on line 5 does not match the end tag of 'urls'. Line 12, position 4." />
</response>
Example XML response in process
<response status="ok" batch_id="100">
<batch_status>
<waiting>2</waiting>
<in_process>0</in_process>
<done>0</done>
<total>2</total>
<is_completed>false</is_completed>
</batch_status>
</response>
Example success XML response
<response status="ok" batch_id="100">
<url>
<addr>http://url1ToAnalyze/</addr>
</url>
<url>
<addr>http://url2ToAnalyze/<addr>
<videos>
<videos>videoid_1</videos>
<videos>videoid_2</videos>
<videos>videoid_3</videos>
<videos>videoid_4</videos>
<videos>videoid_5</videos>
<videos>videoid_6</videos>
<videos>videoid_7</videos>
<videos>videoid_8</videos>
<videos>videoid_9</videos>
<videos>videoid_10</videos>
<videos>videoid_11</videos>
</videos>
</url>
</response>