Get Altavista number of hits - search

I need a program that -Given a search query- uses altavista and returns the number of hits for this search query. I prefer java but other languages are fine with me. Is there an API that can be used for this purpose?

This should be simple...
Make a web request to Altavista passing in your search query.
Get the resulting HTML back.
Then parse out the hit count from the html.

You could adapt the code here:
http://nadeausoftware.com/node/73
Which will allow you to specify a URL to search for, get the results and parse out the returned number of matches all in Java
Altavista does not have a search API and I could not locate an up-to-date third-party solution.

Related

Instagram - Obtaining data in realtime

I am trying to get the recent post from a particular location. using this url.
https://api.instagram.com/v1/media/search?lat=34.0500&lng=-118.2500&distance=50&MAX_ID=max_id&access_token=XXXX
So when I use this URL for the first time, I get 20 results. I obtain the max ID from the list of 20 results and modify my url .
But when I use the modified URL, I obtain the same result as the first one.
How do I go about solving this?
Contrary to what I thought, the media search endpoint doesn't return a pagination object. Sorry. It also doesn't support the min_id/max_id parameters, which is why you are having problems..
If you want to get different data you are going to have to use the time based request parameter MIN_TIMESTAMP. However it looks like that parameter doesn't work for that endpoint either (though the documentation says it is supported). Indeed, a quick search on the internet reveals it might be a long standing bug with the api.

Cloudant skip parameter not working

I'm trying to do paging of results from a Cloudant database.
I've tried using bookmark, but the fact that the final page of results still has a bookmark is a problem for me, since it means that apps using the database can't tell if there's a 'next page' or not without requesting it.
Instead, I've tried using skip with a URL like this:
https://samdutton.cloudant.com/mydb/_design/mydesigndoc/_search/mysearch?
q=foo:bar&skip=10
However, this isn't working: I always get the first page of results.
Am I doing something wrong, or should this work?
Skipping results isn't supported in search. See the search documentation for the full list of supported options.

Custom query string in domino URL

Need a way to pass a value between to pages using URL query strings if possible. However everytime I add "?customquery=customvalue" at the end it ends up to the 404 page of the website.
I want to basically make it look like this.
https://example.com/somedepartment/sample.nsf/page/hello+world?customquery=customvalue
hello+world is a document that is equivalent to a webpage.
I tried this plus a javascript that collects the strings after the number sign and it works.
https://example.com/somedepartment/sample.nsf/page/hello+world#customvalue
However, I couldn't use the hash sign because they told me not to use it and use another unique symbol instead. I am not aware of any symbols that could work the same with hash sign. If there is, please enlighten me.
Apparently, I was able to find an answer.
https://example.com/somedepartment/sample.nsf/page/hello+world?OpenDocument&RandomParam=sample
Now I could pass values by means of this format. Basically it has to be preceded by "OpenDocument" parameter before putting custom ones.
This documentation also helps: http://www.ibm.com/developerworks/lotus/library/ls-Domino_URL_cheat_sheet/

How to place search query in the URL?

With a lot of search engines, you can find the string you are searching in the URL.
However, http://drugcompare.destinationrx.com/Home.aspx does not let me do this. When I search something, the resulting URL is http://drugcompare.destinationrx.com/DrugCompare.aspx no matter what.
Is there any way I can find out whether I can search the website by adding something to the end of the URL, like "?query=searchstring" instead of using the form provided on the page? Basically I need a unique URL.
that website you pointed at uses POST to send data for its search query which means you wont be able to see or append it on the URL bar. The reason for that is either for security or the search query it generates is a complex object or too long and does not fit in a url. websites such as search engines uses GET, with that you can append your search query in the url by following the syntax it generates.

Bing: search - match only exact literal strings?

I'm using PHP and the Bing API to search for certain domainnames.
I want only the results that are an EXACT match.
Somehow Bing returns results that do not match exactly.
When I search for :
"www.gebouw.nl"
I sometimes also get results like "www.gprgebouw.nl"
Is there a way to tell Bing to search only for EXACT matches?
Try adding a plus sign to your query. e.g. +www.gebouw.nl which is %2Bwww.gebouw.nl when url encoded
http://www.google.com/support/websearch/bin/answer.py?answer=136861
http://onlinehelp.microsoft.com/en-us/bing/ff808438.aspx
Could WebSearchOptions='DisableQueryAlterations' be the key to this?
As per API documentation, "DisableQueryAlterations Prevents Bing from altering the query string. Such alteration may have been done to correct apparent spelling error in the original query string."

Resources