SoundCloud mp3 link and file length for custom podcast feed - api

I have some podcast feeds already up and running in iTunes for my client, but we're thinking of switching their audio from self-hosted to SoundCloud.
Is it possible to use the SoundCloud API to get an mp3 download link and the file length for uploaded tracks?
As an example, here's the enclosure tag from the existing feed for a recent podcast episode:
<enclosure url="http://marfapublicradio.org/wp-content/uploads/2013/08/TLK-130813-Steve-Murdoch-WEB.mp3" length="28077244" type="audio/mpeg" />
If I could just insert SoundCloud track data for the url and length attributes I'd be good to go, but after a brief look through at the API documentation I'm not sure whether it can be done.
Any input would be greatly appreciated.

Seeing this in the related questions list:
SoundCloud, download or stream file via api
led me to further examination of the API docs ( http://developers.soundcloud.com/docs/api/reference#tracks ), where I found that the track properties do include download_url and duration.
So the answer to my question is "yes, it is possible".
Edit as of September 2, 2013:
I was able to make a download link, but only one that initiated a download dialog, and not a URL for an mp3 file that would be appropriate for me feed's enclosure tag.
I tried e-mailing the SoundCloud api support e-mail address, but got no response. I then tried their general support e-mail, and did receive a reply telling me that the answer to my question is NO.
SoundCloud's api does NOT support .mp3 URLs to drop into the enclosure tags in my pre-existing feeds. It was instead suggested that I apply for their podcasting beta, which I will now investigate.

Dealing with this myself at the moment. While I am not immediately seeing a direct link to an mp3, I have noticed that the value for the waveform (a random BBC stream used here) can be used to form a working mp3 url:
First get the track info:
https://api.soundcloud.com/resolve.json?url=https://soundcloud.com/bbc-media-show/nikkei-buys-financial-times&client_id=[yourClientIdHere]
Notice the waveform url:
7Yp3d9EHloKg_m.png
Use that identifier (remove the _m) to form the working stream URL.
http://media.soundcloud.com/stream/7Yp3d9EHloKg.mp3
Forgive my poor text formatting here... I have never used stackoverflow before.

Related

Vimeo Upload API

I'm trying to upload videos to my Vimeo account via their API using the TUS approach.
I've managed to get the first step working fine, using POST https://api.vimeo.com/me/videos to create the video placeholder in Vimeo, and getting a response which includes the video upload.upload_link
The second step requires the binary data of the video to be patched to the upload link returned in step one using PATCH{upload.upload_link} along with some specific headers, which is fine, but what I'm struggling to work out is where and how exactly to include the binary data, as it doesn't really say in the Vimeo API documentation.
Do I just put the binary data in the Body, on it's own? Or do I need to insert it between some code in the body? Or do I set a parameter and add it as a key value, and if so what is the key?
Also, I'm assuming it should be a binary string and not base64, is that correct?
Any help or guidance on this would be much appreciated.
You put the binary data directly in the request body. Vimeo API uploading uses the tus upload protocol. There is more information about the PATCH request at https://tus.io/protocols/resumable-upload.html#patch

Searching on geolocation in the SoundCloud API?

The SoundCloud API allows you to search. Coordinates (lat/lng) seem to be stored as tags in the tag_list property for tracks. It seems I can filter on matching tags.
Can I use the SoundCloud API to find matching tracks with a geospatial bounding box or a centre with a radius?
Or can I only match coordinates exactly?
If the former, how?
The SoundCloud blog posts talking about mapping audio links to maps that don't open. For example:
http://maps.soundcloudlabs.com/?lat=32.47269502206151&lon=13.359375&maxOffset=50&zoom=3
Furthermore, I'm unable to add geotags to my files on SoundCloud. Adding them as tags and saving the file fails silently: Upon reopening the file for editing, the geotags do not show up.
Third, SoundCloud API calls for tracks do not seem to include geotags.
Fourth, searching for a geotag using the SoundCloud API consistently returns no results.
Therefore, it is safe to assume that SoundCloud no longer supports geocoding on their audio files.

How to search for videos using GettyImages Connect API

I'm trying to use this API to search for videos. I have a client key, secret, and everything I need.
I have scoured the API doc page up and down several times, and can't find any reference to video search.
The on-site search allows video search, and the API works fine when I search videos.
I use:
'https://connect.gettyimages.com/v3/search/images/editorial?phrase=' + query + '&fields=id%2Ctitle%2Ccaption%2Cpreview to search for images, and I've tried every combination of the word 'video' in that to search for videos, to no avail.
The images search works great, by the way.
The "swagger" interactive page (most annoying way to display an API doc, by the way) has a section for images, search/images, etc, but no video search or video (using video id).
the v3 API release notes states that they now have support for video search and download. Where?
Thanks to anyone that can lend a hand here, this is probably the most confusing API I've ever encountered.
Thank you!
sorry it's taken so long answer your question! At the time you posted, I don't think we had our video-specific search and download endpoints up. They are there now, though they're still in beta. Should be that way for a couple more weeks.
https://connect.gettyimages.com/swagger/ui/index.html#!/Search
Searching for "video" via the image search endpoints will not give you video files.
Thanks,
Matt
Getty Images API operations

How to get youtube video title - vb

I am currently creating a youtube downloader and I have the code to retrieve video thumbnails, however I want to find out a way to retrieve the video title and possibly the video size etc. If anyone can help please answer :D
I would concider you use version 3 of the Youtube API. I don't suggest parsing the html of a youtube page, you never know when they will change the format and you'll be downloading too much information. The API is much more stable.
If you look at the video section .
https://www.googleapis.com/youtube/v3/videos?id=BaW_jenozKc&part=snippet
(I can't test it on this computer)
By changing the part (or adding multiple part) you can get all the information you need about a video. Since the result is returned in json, you can use it with pretty much any programming language.
Also, read the Gettting Started. Youtube limits the number of query unless you register your application and get a developper key.
You need to read the .NET YouTube API documentation, specifically the YouTube API v2.0 – Retrieving Data for a Single Video section.
You will need to query for a single video by the video's ID and then the pieces of data in the ATOM feed that comes back to you are:
feed/entry/Title for the title of the video
feed/entry/media:group/yt:duration for the length of the video
There does not appear to be a value returned for the size of the video, however.
Try the youtube API:-
https://www.youtube.com/get_video_info?video_id=BaW_jenozKc
It should return something along the lines of:-
"&title=youtube-dl+test+video+%22%27%2F%5C%C3%A4%E2%86%AD%F0%9D%95%90".
Credits to youtube-dl:-
https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py

Retrieve Steam activity feed?

Has anyone found a way to retrieve the activity feed on Steam for a specific user to post on a website similar to tweets? I'm adding an activity feed to my website, but really the only thing I'm most active in is Steam, so it will get stale pretty quickly without Steam in there. I've looked at the web API, but it doesn't specify if I can grab my full feed and post it or if I can just grab certain stats for specific games or not. I've tried to find an RSS feed for my activity but had no luck so far, that would definitely be the preferable format.
I've just looked at this and you can't grab the web feed directly from the site on RSS or JSON. The Web API is meant for developers of Steam applications so that they can get at the player information. For that, you need an API Key, which is provided by Steam. It is not a casual web interface like you might find on Google.
The nasty solution is to HTML scrape the page. I used Yahoo! Pipes to scrape the page (and automatically update) but ultimately decided that was entirely too dirty as it assumes that the Steam pages won't change.
A bit too late, but I'm also searching for this kind of RSS feed. I think I will end up creating a RSS bot to parse the AJAX response used to fetch the activity feed:
http://steamcommunity.com/id/[your username]/ajaxgetusernews
This URL doesn't work out of the box, I think we have to pass some cookies to get access to this page to make Steam think the bot is logged in as a normal user. It returns the HTML markup used to render the activity feed, and a URL to fetch the next batch of activities.
Be advised that this HTML markup is hard to parse because it is inconsistent.