Finding Similar Artists with the Amazon Product API - amazon-product-api

I'm relatively new to the Amazon Product API and I am attempting to pull back similar artists to the artist on an item I am providing for the Similarity Lookup.
For instance using the following parameters:
ItemId='B00136JMX6'
Operation='SimilarityLookup'
ResponseGroup='ItemAttributes,Images'
Availability='Available'
SearchIndex='MP3Downloads'
I receive only other songs by Johnny Cash.
Is there a way to find other artists similar to Mr. Cash?

I've spent a lot of time working with both APIs and yes it is easy to get five similar artists from Last.fm then you could search based on those artists. You could perhaps use MusicBrainz... They also make use of ASIN numbers in their database. I don't make use of MusicBrainz much but it is another option I looked at.
Good luck!
My code in PHP for working with these APIs

Related

Is it possible to return place reviews mentioning certain keywords in the text?

I know I can return a JSON array of up to 5 reviews. If I can return just 5 reviews that include only certain keywords that would be fine. Is it possible?
If not, perhaps I could generate a request that returns all the reviews for a place, then perform the keyword filter on the results.
I understand the business owner may return all reviews via My Business API, but I will not have My Business access for the places. I believe I can get more than 5 results with a premium plan, but assume that will get pretty expensive.
You are right the only way to get all reviews is via Google My Business API.The Places API at the moment provides only 5 reviews doesn't matter Premium or Standard plan.
There are a couple of feature requests in Google issue tracker you might be interested in:
https://issuetracker.google.com/issues/35825957
https://issuetracker.google.com/issues/35821903
Note these requests are pretty old, Google didn't set high priority on them. You can star them to express your interest and subscribe to further notifications.
Hope this answer clarifies your doubt.

Spotify API - receive specific data

i would like to know if it is possible to receive the specific data:
- the number of people who like a certain artist or album, in a certain place.
This way i will know that Metallica has 25,000 fans in Lisbon and/or Muse's album (The Resistance) has 2,000 fans in Barcelona.
Thank you.
This is not currently supported in the Spotify API. You can see all the features/endpoints here and submit or vote for feature requests here.
The closest existing functionality to what you're looking for is the popularity and followers on Get an Artist, but there is no location-based data.

Trying to search WikiNews

I'm trying to search WikiNews, both for specific news stories and for the latest headlines. I've been reading about the MediaWiki API (https://www.mediawiki.org/wiki/API:Main_page), but it doesn't seem to map to what I'm trying to do.
Taking two examples, I need to be able to get the latest headlines (ideally for a specific region (United States, France, Great Britain etc) and for a specific topic (Finance, Sport, Media etc), but right now I'd settle for just getting the latest stories regardless. I've tried a couple of things:
https://en.wikinews.org/w/api.php?action=query&prop=categories&clprop=timestamp&format=json
just returns batchcomplete
http://en.wikinews.org/w/api.php?action=query&list=recentchanges&rnnamespace=0 looks like it might be more promising, but only if I could filter only to show news stories - and show a good deal more than it currently does. Clearly it would also be desirable to add parameters for location / story type in the query rather than filtering them after the list is received.
With regard to searching, I've had even less luck. I've tried searching on a topic that I know is ~~causing trouble~~ making the news:
https://en.wikinews.org/w/api.php?action=query&titles=Donald_Trump&prop=revisions&rvprop=content&format=json&redirects&continue the return is not a list of stories!
Has anyone searched WikiNews? Does anyone have any suggestions to achieve what I need to do?
action=query&format=json&list=search&redirects=1&srsearch="Donald Trump" -incategory:disputed incategory:"August_25, _2016|August_24,_2016|August_23,_2016|August_22,_2016|August_21,_2016|August_20,_2016|August_19,_2016|August_18,_2016"&srnamespace=0&srenablerewrites=1 will search for articles from the last few days mentioning Trump. (See full docs on what keywords can be used in a search query.)
Most of your examples do not actually generate a list (you can see from the lack of a list parameter); they expect one or more article name via the titles parameter and return information about those. Your second example is valid (except the correct parameter name is rcnamespace) but that returns recently edited articles, which is a very random way of trying to find news on a topic.
In general it seems like you are trying to randomly guess what the API modules do. Did you miss the docs and sandbox?

How to use Wikipedia API to get page statistics for all pages in a Category?

I am looking to identify the most popular pages in a Wikipedia Category (for example, which graph algorithms had the highest page views in the last year?). However, there seems to be little up-to-date information of Wikipedia APIs, especially for obtaining statistics.
For example, the StackOverflow post on How to use Wikipedia API to get the page view statistics of a particular page in Wikipedia? contains answers that no longer seem to work.
I have dug around a bit, but I am unable to find any usable APIs, other than a really nice website, where I could potentially do this manually, by typing page titles one by one (max. up to ten pages only): https://tools.wmflabs.org/pageviews/. Would appreciate any help. Thanks!
You can use a MediaWiki API call like this to get the titles in the category: https://en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Physics
Then you can use this to get page view statistics for each page: https://wikimedia.org/api/rest_v1/#!/Pageviews_data/get_metrics_pageviews_per_article_project_access_agent_article_granularity_start_end
(careful of the rate limit)
E.g. for the last year, article "Physics" (part of the Physics category): https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia.org/all-access/all-agents/Physics/daily/20151104/20161104
If you're dealing with large categories, it may be best to start downloading statistics from https://dumps.wikimedia.org/other/pageviews/2016/2016-11/ to avoid making so many REST API calls.
TreeViews is a tool designed to do exactly this. Getting good data is going to be hard if your category contains thousands of pages, in which case you'd better do the calculations yourself as Krenair suggests.

Alternatives to Deprecated Google News API

What are some alternatives to the comprehensive and now deprecated Google News API?
I'm trying to load some JSON data from two government webservices to be parsed into a query for a news API which will send me back hefty relevant news.
It will be over economic and regional data. So it could be lowest paying job in dallas county.
Are there any news api with as much functionality?
This is a relatively old question, but there have been lots of recent developments in the News API space and I thought I could shed some light.
I’m going to immediately disregard the more expensive choices like Bing ($7/1,000 requests), since most people won’t find it easy to afford them, and the results are actually often inferior to more specialized solutions.
That means you’re basically left with two options: News API and newsapi.org. I really do enjoy newsapi.org, they do a fantastic job and provide high quality search results. They also provide developers with 500 free requests per day, which is pretty great.
ContextualWeb News API does have a couple of advantages: they offer 10,000 requests per month free, and after that our API is significantly cheaper and more flexible (the baseline is $0.5/1000 requests, compared with a slightly higher $1.8/1000 requests with newsapi.org’s basic plan). ContextualWeb also offers result keywords, allowing you to do all kinds of nifty machine learning stuff with the search results.
Having said that, newsapi.org’s documentation is currently more straightforward, and their results are mostly always spot on.
Check out the Social Animal NEWS API.
The news database has 450 million-plus articles and 1 million articles are added on a daily basis.
Notable features:
It is fast and provides breaking news across the web in 39 languages.
Social engagement data is available for all news URLs which enables surfacing top quality articles
Offers Sentiment Analysis to filter articles based on their sentiments.
For more details, please visit the documentation page.
Disclaimer: I work for Social Animal.
There's a free alternative that provides good data but the quantity of query is limited.
If you want to get a higher number of query per day you must pay a subscription.
The site is called gnews.io, it's really simple to authenticate and to get a key.
You could use a general news api site like newsapi.org or if you want more specific niche news (e.g. stocks) you can search for niche api's like iex, alphavantage or stocknewsapi.com
Aylien provides a News API that gives you access to NLP-enriched news articles from 80,000+ news sources: https://aylien.com/product/news-api/demo
The Newsdata.io API is a simple news API with this you can search over 50,000 news data sources worldwide. You can use this API to get live-breaking news from any country in the world in your preferred language as they provide news data in 22 languages in 7 categories from 88 countries.
Newsdata.io allows you to search for published articles using keywords or phrases, languages, publications, time. You can sort the results by time, the popularity of the publication source, or location.
Newsdata.io also provides news data analysis and it includes data analysis like topic labeling, intent detection, sentiment analysis, emotion analysis, entity extraction, semantic similarities.
The Newsdata.io API is free to use for non-commercial purposes with 500 API requests per day with 10 articles per request, 99.99% SLA uptime.
Data format: The API sends quick GET HTTP requests and returns JSON results.
Ease of use: The API is simple to use. Furthermore, you can use its documentation to get started implementing the API in a matter of minutes.
Maybe you could try Google BigQuery