PowerTrack API GNIP - Maxresults - gnip

Is there a way I can restrict max result per rule while streaming using GNIP PowerTrack API. Problem is while streaming if one company has thousands of tweets and another (second) company has only 10 tweets then first company is exhausting my contract limit of max tweets (that can be streamed). And not getting any tweet stream for second company.

If you look at the documentation, there's a rule called "sample" which allows you to specify a percent sample of the rule. From the documentation:
Gnip Rule: dog sample:50
Match: 50% of tweets that match the keyword dog

Related

How can I put limit and get only names of the games using RAWG api?

I am using RAWG api to get names of the Games based on genre currently I am just testing the url requests and I could come with this code
https://api.rawg.io/api/games?limit=1&genre%20=%20action
But the problem here is I am getting bunch of information as json file, I just want the name of 5 games.
Can anyone help me :)
The API is pretty clear on how to call it (see the docs) and what it does return:
As you can see here, the calls always returns a json with count and results, where result is an array of Game which consists of more fields than the name.
However, you can limit the amount of games returned by using the page_size parameter, leaving you with: https://api.rawg.io/api/games?page_size=5&genre%20=%20action

How to specify minimum checkins using Foursquare API?

I'm new to all this, but I was wanting to know how I can view popular Foursquare venues by using a longitude and latitude but also narrowing the search by specifying the exact amount of checkins at a place and also providing the radius.
I've figured out how to do some of the URL but don't know what to type exactly to specify the minimum amount of checkins.
"https://api.foursquare.com/v2/venues/search/?ll= 42.973423,-83.738894&radius=200"
That is what my URL is looking like, now I need help figuring out the last bit of information.
It's not possible to define a minimum number of checkins as a search parameter for the /v2/venues/search endpoint.
The response of /v2/venues/search request contains a stats field with a checkinsCount property. This would allow you to filter the results based on a checkinsCount threshold.

Sorting the response from the Foursquare Places API re:two word name?

We are trying to query the Foursquare api to query for a two word name:
Cava Grill in Gaithersburg, MD
We are trying this via:
https://api.foursquare.com/v2/venues/search?intent=checkin&query=cava%20grill&near=gaithersburg,%20md&limit=1&oauth_token=SEB14NBLGO4HMFTOXQX0JZTSVGM41ENNKE0X1RXHCI5XP3P5&v=20150420
(don't worry ... this is the public API key from the FS page)
Two odd behaviors:
Even though we are explicitly searching for the Cava Grill in Gaithersburg, MD ... the Bethesda, MD one comes up first in the results (odd, why??)
Chipotle Mexican Grill shows up in this result set ... we suppose because of the word "Grill"
So ...
a. anyone know why the Bethesda one would show up higher in the result set? (Should we just narrow the radius tighter?)
b. anyone know if we can look for the "entire query" vs. each word in the query?
Results are queried and sorted differently based on your intent. If you're looking for a specific venue, I suggest changing your intent from checkin to match. Browse may also be a good choice depending on future search params
Here's the nutshell on the intents:
intent=checkin returns a list of venues where the user is most likely is located
intent=browse returns a list of most relevant venues for a requested region, not biased by distance from a central point.
intent=match returns a single result that, with high confidence, is the corresponding foursquare venue for the query-based request
I hope this helps

Foursquare venues/search doesn't return full categories list

For example in this request I'm looking for venues with categoryId=4bf58dd8d48988d1e8941735 (Baseball Field): https://developer.foursquare.com/docs/explore#req=venues/search%3Fll%3D40.7,-74%26categoryId%3D4bf58dd8d48988d1e8941735
In the result each venue has only one (primary) category. Is it possible in venuess/search request to return full venue's categories list?
Unfortunately, no.
This is actually by design, for performance considerations. In contexts where we return many JSON items (e.g. venues/search), we only provide the "compact" JSON to keep overall response-size down, since it's a significant contributor to the cost of serving and handling the request. venues/search in particular is one of our most highly trafficked endpoints.
If you want more detail about a particular result in venues/search, you should query the venue-detail endpoint (/venues/[VENUE-ID]), which will return the full list of categories.

What's the limit of google transliteration?

I've used google transliteration API experimentally. It's working fine and I've noticed that it allows only five words at a time. Is there any method to send more words? and is there any daily limit? If I have 100 words, I will have to send a set of five and then join them?
100k characters per day for ver 2.
The developer console allows you to apply for higher limits (may cost money depending on your needs?) https://code.google.com/apis/console/
Looks like ther is a method for making more than jut individual words transliteratable: https://developers.google.com/transliterate/v1/getting_started#makeTransliteratable