scraping results not limited according to the passed parameters - kimonolabs - kimono

i've tried to add the parameters "kimoffset" and "kimlimit" to the source url of my api, but this doesn't limit and/or shift the scraped results
my api's source url:
http://www.tripadvisor.com/Hotels-g187791-Rome_Lazio-Hotels.html?kimlimit=10&kimoffset=100
are these parameter used for this?
why doesn't work?
the results in data preview area are always the same

For some reason the server is ignoring your query string kimlimit=10&kimoffset=100.

Related

Vimeo API get multiple videos in one GET request

I'm in a situation where I need to make one GET request to Vimeo and get back info for multiple specific videos. Here is what I have for the query string currently:
https://api.vimeo.com/users/XXXXXXXX/videos?fields=uri,duration,pictures.sizes.link,download&containing_uri=/videos/ID1,/videos/ID2&per_page=2
Unfortunately, this only returns the information for ID2 and the video ID before it in its channel, instead of for both IDs specified. I've also tried appending multiple containing_url fields to no avail. Is there any way to make this happen? I'm using axios in react native if that helps.
Instead of "containing_uri", use "uris" as documented here:
https://developer.vimeo.com/api/common-formats#batch-requests
https://developer.vimeo.com/api/reference/videos#GET/videos
The "containing_uri" parameter will only return the page of the specified uri. The "uris" parameter will return the specified videos/objects. Your request should look like this:
https://api.vimeo.com/users/XXXXXXXX/videos?fields=uri,duration,pictures.sizes.link,download&uris=/videos/ID1,/videos/ID2&per_page=2
I hope this information helps!

Sensenet: Search by Content List fields on Query Builder

I'm trying to make an query on Query builder. This query should search by content using the Content List fields.
In the documentation is indicated that I can use CQL but it seems that in this case is not working.
The query that I'm trying to make is:
TypeIs:File AND #Location:Lisbon
The # char should be url encoded (because the query will be executed by an ajax request through OData). So use it this way:
TypeIs:File AND %23Location:Lisbon

batchGet endpoint behavior with multiple photos

I am testing the photos.batchGet endpoint.
Per the API docs, it takes two URL parameters "view" and "photoIds". When I try the photoIds parameter, the request only works with one photoId. Using multiple photoIds fails.
I tried using a delimeter between the photoIds in the string (by using a comma, pipe, and space). I also tried not using a delimeter at all. Not using a delimeter returns a response for the last photoId in the string, but not for any of the other photoIds. In short, none of my requests appear to be working. Am I doing something wrong?
Also, depending on server configuration, I think it's recommended for the URL length to be under 2,000 characters. Anything above 30 photoIds would create URLs longer than this.
That being said, maybe it would be better to make this a POST request that accepts a JSON request body? Just a thought, but think this would be better suited. A lot of our tours are above 30 scenes, and we even had a tour with 700 scenes!
The description of the batchGet function was updated. Per the documentation you should pass photoIds as a string and the URL query parameter should be photoIds=<id1>&photoIds=<id2>.

How do I use the query parameters in the Dark Sky Forecast API ?(forecast.io)

I'm using the Dark Sky Forecast API to retrieve some weather information.
When I read the official doc, I found that the "option" section describes the usage of query parameters.
For example,
The API request may optionally be modified through the use of query parameters. It will respond to the following:
callback=[callback]: Return the API response as JSONP. Please use
caution when using this, since exposing your API key to the public is
a security hazard and, if abused, will result in the revokation of
your API key. However, if developing a personal- or internal-use app,
this is a convenient method of doing so.
units=[setting]: Return the
API response in units other than the default Imperial units. In
particular, the following settings are possible:
us: The default, as outlined above.
si: Returns results in SI units. In particular, properties now have the following units:
...
I know how to get the weather information by take advantages of the call
https://api.forecast.io/forecast/APIKEY/LATITUDE,LONGITUDE
But I don't know how to combine the query parameters with it.
Any ideas?
2015/10/23 UPDATE
Thank to Logan Kearns, using ? parameter solved my question. Make sure the query parameters are in lowercase.
https://api.forecast.io/forecast/APIKEY/LATITUDE,LONGITUDE?lang=zh-tw&units=si
This is how you change the units. I assume that other query parameters would be set in a similar manner, using the '?' to separate them.
https://api.forecast.io/forecast/APIKEY/LATITUDE,LONGITUDE?UNITS=us
Just an update, since url changed and with few other parameters:
You can add units to mention the type of unit conversion required
You can add exclude for excluding certain data in the response like hourly updates.
https://api.darksky.net/forecast/APIKEY/LAT,LONG?units=si&exclude=minutely,hourly,daily,alerts

Date range search using Google Custom Search API

I am using the Google Custom Search API to search for images. My implementation is using Java, and this is how I build my search string:
URL url = new URL("https://ajax.googleapis.com/ajax/services/search/images?"
+ "v=1.0&q=barack%20obama&userip=INSERT-USER-IP");
How would I modify the URL to limit search results, for example, to: 2014-08-15 and 2014-09-31?
You can specify a date range using the sort parameter. For your example, you would add this to your query string: sort=date:r:20140815:20140931.
This is documented at https://developers.google.com/custom-search/docs/structured_data#page_dates
Also if you use Google's Java API you can use the Query class and its setSort() method rather than building the URL by hand.
I think the better way is to put this into query itself. Query parameter contains 'after' flag which can be used like:
https://customsearch.googleapis.com/customsearch/v1?
key=<api_key>&
cx=<search_engine_id>&
q="<your_search_word> after:<YYYY-MM-DD>"