Are there any methods in Spotify API that can auto-correct search keywords? - api

I am planning to use the Spotify API to fetch some data, feeding track name and artist as search keywords. However, the track name and artist data I have some parsing errors, and I was wondering if there are any methods in Spotify API that auto-corrects the keywords.
For example, Google will fetch me documents about Radiohead even if I search for 'Radiohea','Radihead', and so. Also, the Last.fm API provides a method named 'track.getCorrection', which does jobs similar to those I explained above.
Here is the explanation of the method from the official Last.fm API website:
'Use the last.fm corrections data to check whether the supplied track has a correction to a canonical track.'
Does anyone know if such method exists in Spotify API?

No, there's no auto-correction engine. The closest Spotify gets to having a search engine is the search endpoint:
You can search, for instance, like this:
query = 'radio head'
and then
query_results = sp.search(q=query, type='playlist')
would return
...u'playlist'...{u'name': u'Air/Zero 7/Thievery Corp/Radio Head/Massive Attack/Morcheeba',...
but that requires that the playlist user spelled it wrong too. That is as far as a typo can get you, I'm afraid.
A workaround is fetching the artist using the last.fm API, use its auto-correction tool and then feed this result into Spotify API, either using artist, track or search endpoints.
I highly recommend you using more than one API for your app, as each one has its own limitations.

Related

Custom Search API for deprecated Patent Search API

Google just announced the retirement of some deprecated but pretty useful search API's, like Google Patent Search API, Google News Search API, Google Blog Search API, Google Video Search API and Google Image Search API
and forwarded to the Custom Search API as the recommended alternative.
What would now be the syntax for a patent search with the custom search API?
e.g. for
https://developers.google.com/patent-search/?utm_campaign=chrome_deprication_api_011516&utm_source=gdev
the patent-search uri will be gone.
The javascript API is the google.search.PatentSearch class, which I assume will also be removed.
And I don't see anything like Patent, Video or Images in the https://developers.google.com/custom-search/docs/ref_prebuiltlabels
The answer at Python module for searching patent databases, ie USPTO or EPO looks like it would be helpful to you. It gives a Python example of doing a Google patent search using the custom search API.
You could also switch over to using IPStreet.com. The provide a RESTful API endpoint for basic keyword searching of patents as well as advanced semantic search algorithm (Latent Semantic Indexing). http://www.ipstreet.com/

photos of people you follow instagram api

How can I get a feed of photos/videos from people I follow from the Instagram API? This seems like a pretty basic API feed that it appears to be missing. I see where I can get a list of the people I am following, but them am I supposed to make separate API calls for each of those user feeds and aggregate all of those together?
http://instagram.com/developer/endpoints/relationships/#get_users_follows
I'm wondering how a service like http://web.stagram.com/ does something like this. I'm assuming aggregation, but perhaps I am missing something in the API.
The /user/self/feed endpoint returns all videos and photos of the user associated with the given access token. See here: http://instagram.com/developer/endpoints/users/#get_users_feed
This is an example of using this endpoint: https://api.instagram.com/v1/users/self/feed?access_token=969629.f59def8.24f8add8d4d7475397ab09b361299665
The Instagram API does not support what you are attempting. You would need aggregate these yourself. Not sure if webstagram has special access or has to work around this as well.

What is the best way to get an image URL from a certain query?

I have a book recommendation project for school, and I want to add a picture for each book. I was thinking I could use a search engine API to return the first result, but I'm having trouble with them:
The Google .NET Api seems to be unsupported
The Bing API
The Flickr Api is well documented and it actually works, but the images on there aren't what I'm looking for
Have you tried http://jpg.to ?
[searchterm].jpg.to
i.e.
http://programmingfordummies.jpg.to/
http://clockworkorange.jpg.to/
http://fantasticmrfox.jpg.to/

Google custom search engine for Google News

I'm trying to use the Google custom search engine API to query Google News. The API is working great otherwise - but I want to get News results instead of web results.
I can't find a way to either restrict the CSE to use Google News, or to ensure that my API query hits Google News rather than the web search. Does anyone know a way to achieve this?
You can use schemas from Schema.org to specify if you're only looking for articles/ blog posts.
To specify the Schema, go to Advanced settings on the Control Panel and select the required schema from here.
There was a News Search API but it's deprecated:
Important: The Google News Search API has been officially deprecated
as of May 26, 2011. It will continue to work as per our deprecation
policy, but the number of requests you may make per day may be
limited.
https://developers.google.com/news-search/
You can see some alternatives SO users recommended on this question.

Build a search-based-app using an API from a major search engine: google, bing, yahoo - who offers search API?

I need to provide search functionality as the cornerstone of my app (basically I think I can make a better interface than whats is offered by Google, bing, yahoo - bold claim I know). Therefore I will not build an entire search engine from scratch, I will rather use an API provider by a major search engine and simply modify the interface that present the results to my visitors. I am a Google fanboi and I initially tried to use Google Search AJAX API. However, I was very disappointed since I can barely change anything at all.
Specifically;
I need an API that will let me pull programmatically the results from a major search engine and let me output them with the style and goodies that I want.
I am not looking to alter the order in which the search results are presented to the user by inserting crap in between the good results (this is against my philosophy). But I would like to wrap massive php/javascript around each search results so that I can completely control how each result is graphically rendered.
I heard of the BING API 2.0, would that be more flexible than Google AJAX API? Could anyone provide output if any of the current search providers are offering API for this purpose right now?
After careful investigation it appears to me that the Bing 2.0 API is the most flexible and robust search API currently on the market.
The Bing API does require you to put their ads next to the results. You can place your own ads with the Yahoo API. The Yahoo API uses the same search technology (same results) and can be used starting from $0,40 per 1000 queries. The lowest, bulk price of the Google API is $4,00 per 1000 queries. Google's relevance is easily ten times higher for the somewhat more advanced queries.
And also Bing version 2 search API is free!
Whereas, Yahoo BOSS V2 has pricing and so Google does custom search API.