How to get EXTRA (complimentary) results from bing-search API - bing

When we generally search for a term in www.bing.com (e.g. newyork), we get some extra information along with search results on the right most side of the page. Like for 'newyork' you would see some content from wikipedia, map location, it's twitter page etc.
Is there a way to get this information from current BING SEARCH API?

Some of this information is available in the Bing Entity Search API here: https://azure.microsoft.com/en-us/services/cognitive-services/bing-entity-search-api/.

Related

Single Line Address for MapQuest

I'm trying to provide other map options besides just Google. Unfortunately a single HTTP query (e.g. location=123+main+street) only seems to be readily supported by Google.
I had no luck trying to find anything about embedding in the documentation and decided to email them directly:
The MapQuest business products
(https://developer.mapquest.com/documentation/) support both single
line input "location=1555+Blake+St+Denver+CO+80202+US" and the
advanced, 5-box method
("street=1555+Blake+St&city=Denver&state=CO&postalCode=80202&country=US").
Our API and SDK also lets you add the mapping/geocoding/routing
functions to your site without embedding links to the consumer site at
www.MapQuest.com.
Okay, so location=123+main+street should be supported in theory. However no example was provided. So using the iframe URL from the more client-oriented approach I tried the following without luck:
https://www.mapquest.com/embed/?location=1555+Blake+St+Denver+CO+80202+US
That just shows the map of the US as a whole.
How do I get the single HTTP query location to work for MapQuest embedding?
Correct: location=1555+Blake+St+Denver+CO+80202+US (single HTTP query).
Incorrect: street=1555+Blake+St&city=Denver (multiple HTTP queries).
It looks like a mix of MapQuest APIs and MapQuest.com. Check out the Link to MapQuest documentation. I think the Map a Location > Fielded Location is what you're after.
On this page: https://developer.mapquest.com/documentation/tools/link-to-mapquest/
Scroll down to Link to MapQuest Wizard.
Click on Map a Location.
Click on Single Line Location.
Click on the Run Sample with Embed View Specifier button.
Copy the URL from the new tab.
An example of the working MapQuest single HTTP query embedded page:
https://www.mapquest.com/embed/search/results?query=1555%20Blake%20St%20Denver%20CO%2080202&centerOnResults=1

How to get lyrics from the Deezer API?

Is it possible to get lyric info for a track from the Deezer api?
I'm looking for time-tagged data for a karaoke app. The deezer site itself clearly has this available and makes use of it to show karaoke-style lyrics, so the data and access exist, but it's not described anywhere in the api documentation.
They actually do have an API, but it's hidden. You will need a basic understanding of searching Deezer first (which is easy as hell), once you can search for a song and get the ID from that search, use
https://www.deezer.com/ajax/gw-light.php?method=song.getLyrics&api_version=1.0&api_token=[api-token]&sng_id=[song-id]
To get your API key, you can use inspect element on deezer.com. Open Inspect > Network > reload the page > click on (most likely) the second entry > scroll down to "Query String Parameters" > copy api_token and use that in the link above.
The docs for the Deezer search API can also be found here.
Unfortunately, the lyrics are not available on our REST API.

Bing search api limit to certain sites

Can I define Bing search api only return result from subdomains from a site? For example, www.domain.com/dir/. This is something similar to what Google custom search does. But Google CSE has a hard limit on 10k/day. Is there an alternative search api available for this purpose?
You can simply put this into the query field, like this:
site:domain.com/dir/ whatIAmLookingFor
The query field can contain anything the Bing Engine supports, despite the keyword being site, it apparently supports also URLs
You can read the Bing Search API docs here.
madmuffin is correct, but I'm expanding on his answer to show how multiple sites can be searched. You can use the advanced search operator "site:" as part of your query "q" param.
Single Site Example
"heart disease" site:www.example.com
Multiple Site Example
"heart disease" (site:www.example1.com OR site:www.example2.com)

Facebook Graph API SEO Comments and Profanity Filter

I'm trying to integrate the Facebook comments left on our site in a way in which the content can be crawled by search engines and also for people (although I highly doubt there will be many) who don't have Javascript enabled on their browser.
Currently our Facebook comments are displayed via the use of the Facebook comment social plugin (using the <fb:comments href="MY_URL" num_posts="50" width="665"></fb:comments> tag). This ends up rendering an iFrame (which are mostly ignored by search engine crawlers) so the plan is to render this information and format it with basic HTML. To do this, the comments are pulled using the Graph API - this is then only be displayed to crawlers and people with Javascript disabled.
This all works nicely using the Graph API call (https://graph.facebook.com/comments/?ids=MY_URL), parsing the JSON result and displaying it on the page. The problem is that the <fb:comments> approach filters our results based on a blacklist we have set up on one of our Facebook Apps. The AppId with the relevant blacklist is stored on the page using metadata (<meta property="fb:app_id" content="APP_ID"/>) which the <fb:comments> control obviously must somehow use to filter the comments.
The problem is the Graph API method does not filter any results as I guess no blacklist (or App Id containing a blacklist) is specified. Does anyone know how to specify a Facebook App ID to the API call URL or of another way to not fetch commnents back that violate the terms of the blacklist?
On a side note, I know the debate about filtering content in comments rages on but it is a management decision to implement the blacklist, and one that I have no influence in changing - just incase anyone felt the need to explain the reasons why content filtering is or isn't a good idea!
Any thoughts on a solution?
Unfortunately there's no way to access a filtered list of comments using the API - it might be a reasonably request to have this in the API - you should file a wishlist item in Facebook's bug tracker
Otherwise, the only solution I can think of is to implement your own filter on your side when retrieving and displaying the comments from the API.
According to the Comments plugin documentation the filter on Facebook's side is implemented as a simple substring match, so it should be trivial to implement.
A fairly simple regular expression match should be able to check each comment against a relatively long list quickly.
(Unfortunately, the tradeoff here is that implementing a filter is easy, but you'd also need to write an interface so that whoever's updating the list of disallowed words can maintain the list for both the Facebook plugin, and your own filtering.)
Quote from docs:
The comment is checked via substring matching. This means if you blacklist the
word 'at', if the comment contains the sequence 'a' 't' anywhere it will be
marked with limited visibility; e.g. if the comment contained the words 'bat',
'hat', 'attend', etc it would be caught.
Pretty sure there is no current way of doing this from the graph API, the only thing I can suggest is taking the blacklist and build your own filter

Google feed api integration with iPhone/Objective C

I am building an RSS Reader. Some of the existing ones out there (for example, Pulse News for iPhone/iPad) have a search box where you can search for some term (example - "sports") and it will return a list of feeds that match your search criteria. So in this example, you type in "sports", and it searches and then comes back with ESPN.com's news feed, Yahoo! Sports' news feed, etc. etc.
After initial research, I found out that Google feed API does the same.
https://code.google.com/intl/fr/apis/ajaxfeeds/documentation/reference.html#findFeeds
However, I cant figure out how to use the google feed api. It returns the xml that i need to parse but the part I am confused is how to call the API and where to catch the xml response. Can some one post a tutorial or some help on how to integrate it.
Found a suitable solution with "Google Feed API" itself. They also have a JSON API(wow!!) which returns the JSON file for any query fired..
Here is the link:
https://ajax.googleapis.com/ajax/services/feed/find?v=1.0&q=
e.g:
https://ajax.googleapis.com/ajax/services/feed/find?v=1.0&q=News