Table of Contents
Other APIs
Real-time Activity Stream API 1.1
Use this real time stream to get up to the second access to the videos that are being watched on VideoSurf right now! This API is not like the others. It is a real time stream that is meant to be accessed via "long-polling" and not via frequent traditional REST style requests.
Demo of the stream in use
URL
- The URL where you can access this API looks like:
http://stream.videosurf.com/view_stream/v1.1/?filter_level=strict_safe
Special Restrictions
- Unlike our other RESTful APIs, this one spits out a continuous stream of data. For this reason, it's best consumed by long running connections rather than short requests. So that we can best serve as many API consumers as possible, your use of this streaming API will be limited to one simultaneous connection per client_key.
You should utilize your one connection to create a local buffer that can then serve all of the users of the services you create with this API. We trust that you will not attempt to register multiple client_keys to circumvent this restriction.
Unlike our other APIs, this streaming API will only return output in JSON format.
Authentication
- Each use of any VideoSurf API is subject to the Terms Of Use and requires you to provide a valid client_id and client_key
- client_id - A human readable client identifier. Please pick something short and descriptive.
- Required
- Type: String
- Example: client_id=your_domain
- client_key - This is an authorization token issued to you by VideoSurf. Obtain one here.
- Required
- Type: String
- Example: client_key=900d77b8e40e60f0113dccc2973f2ed1
Inputs
- filter_level - You can filter the stream in various ways
- Optional
- Type: String
- Default: moderate_safe
- Example: filter_level=strict_safe
Output
- videos - An array of video information. Each video has the following information:
- video_id - A unique ID identifying this video in the VideoSurf index.
- title - Title of the video.
- url - URL of the VideoSurf video page.
- source - Display name of the provider's site. (e.g. Hulu, Youtube)
- thumbnail - URL of the default VideoSurf thumbnail for this video.
- length - Duration of the video in seconds.
- entity_ids - A comma separated list of entities related to this video, may be empty
Please Log In / Sign Up