Google search Ajax API more results - google-ajax-api

According to : http://code.google.com/apis/ajaxsearch/documentation/#fonje
i used this to search on google.
but it returns to me 4 results only.
i need more results , Any ideas ?
Thanks
Peter

you can add rsz=[1-8] to you query. For example: http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=gates&rsz=8

Related

How to exclude retweets and replies from Twitter API Full-archive search

I am trying to extract some historical tweets using twitter API. And I want to exclude retweets and replies. I tried other suggested answers here but nothing seem to work. Can someone please help me, I am struggling since a week to find the resources. Below is my endpoint for Full-archive search.
https://api.twitter.com/2/tweets/search/all?query=MMIW OR MMIP OR MMIWG&start_time=2015-01-01T00:00:01Z&end_time=2015-01-15T23:59:01Z&max_results=500&tweet.fields=created_at,entities,geo,id,referenced_tweets,in_reply_to_user_id,lang,possibly_sensitive,source,text,withheld&place.fields=country,full_name&user.fields=created_at,description,location,name,pinned_tweet_id,username,verified,withheld
Okay, so I figured out from twitter's rules and filtering operators from the link below:
https://developer.twitter.com/en/docs/twitter-api/enterprise/rules-and-filtering/operators-by-product
i just had to add and negate the is:retweet operaor in my query field.
Ex: query=(MMIW OR MMIP OR MMIWG) -is:retweet
So, my modified endpoint that worked:
https://api.twitter.com/2/tweets/search/all?start_time=2015-01-01T00:00:01Z&end_time=2015-01-15T23:59:59Z&max_results=500&tweet.fields=created_at,entities,geo,id,lang,possibly_sensitive,source,text,withheld,in_reply_to_user_id,referenced_tweets&place.fields=country,country_code,full_name,geo,id,name&query=(MMIW OR MMIP OR MMIWG) -is:retweet&user.fields=created_at,description,location,name,pinned_tweet_id,username,verified

How to get Facebook Page ID from Page URL

I need to get the Page ID from the Page URL. This is NOT from inside a page tab, that's easy. This is similar to what is being done here: http://findmyfbid.com
Any help would be appreciated as I have been searching for over an hour! Bonus points for showing how to do this in classic ASP. I have no issue getting signed requests & parsing them, the URL to ID portion is what is throwing me.
thanks :)
As noted above in 1st answer commments, that does work, but it's not the data that we want since it's an external url. THIS is the correct way to do it:
https://graph.facebook.com/v2.5/cocacola?access_token=[yourtoken]
OR
This works too:
https://graph.facebook.com/v2.5/https://www.facebook.com/cocacola?access_token=[yourtoken]
This is the way to do it: https://developers.facebook.com/docs/graph-api/reference/v2.0/url
if you are using a GET request, be sure to append access_token=appid|appsecret to the URL you are requesting and it will work.
Thanks for the tip to point me in the correct direction Alex!

Can I get the data of those whom I am not following on twitter?

I seem to be having problems with this in the twitter API.
I want the global data from the API which includes :
1. All those posts from the users I am following.
2. All those posts from the users I am not following.
Is this possible with the twitter API ? Has anyone tried it before ?
I'm using python, but any type of answer would be helpful.
Yes it is possible.
What you can do is say create a list of customers(those whom you follow) in a database...now check for each tweet if it from your customer then pass if not then do as desired.
if you can get data of those whom you are following then you can also get data of those whom you are not following

Amazon ItemSearch API reponse different from amazon.com search results

I am trying to figure out the right parameters for ItemSearch such that the API call will return the same result as on the website. Currently I am using these params it is not consistent with the website.
url_params = dict(
Service='AWSECommerceService',
Operation='ItemSearch',
AssociateTag=AMAZON_ASSOCIATETAG,
SearchIndex='All',
AWSAccessKeyId=AWS_ACCESS_KEY_ID,
Keywords=keywords,
ResponseGroup='Small,OfferSummary,Images'
)
For example if 'iphone%205s' is put in keywords, the API returns a list of iPhone protectors, while searching on the website gives iPhones as top results.
I am also trying to figure out why this is for book searches. One possible answer I found online was that the websites search feature might use more elaborate queries than just one simple API call. For example, it may take into account other factors into the search (not sure what that might be but it may).

Getting the facebook graph to only return results with a # symbol in it

Any one have any ideas on how to accomplish this?
I have tried
https://graph.facebook.com/search?q=%22%23apple%22
https://graph.facebook.com/search?q=%23apple
https://graph.facebook.com/search?q#apple
which does not work.
To be clear the results should only have posts that contain #apple not "apple".
Facebook says this is not supported at this time: https://developers.facebook.com/x/bugs/313941462054417/
if you're trying to get the #hashtags from Facebook, currently, there is no api for this. and even if there were- the posts are not intermediate, they are being cached. you won't see the most recent hashtag from a person who's not in your friendlist right away, this will take a long time to appear in the hashtag search
I've read too that it's not supported but,
trying the second line of jlarry
https://graph.facebook.com/search?q=%23apple
in Graph API Explorer, it works.
obviously the query is on the posts set as public.
so the query could be something like this
https://graph.facebook.com/search?q=%23joviberton‬&type=post
for further ops check https://developers.facebook.com/docs/graph-api/using-graph-api/