I've been trying to search for location like this:
https://api.instagram.com/v1/locations/search?access_token=<valid access token>&lat=34.052235&lng=-118.24368&distance=5000
and mostly getting return code 500. Occasionally (1 out of 10 or so) it does work, so I'm pretty sure the request is correctly formed.
The lat/long in the example are for Los Angeles, CA, but I see similar results with other lat/long's as well
I have noticed getting 500 error in densely populated cities (such as NYC). To get around it, I had to shrink the search radius.
My guess is that there are simply too many locations in the region defined by the lat/lng and search radius.
Related
Please bear with me because I'm new to eBay APIs but basically I'm trying to:
Get a list of item IDs which are Active
Get a list of item IDs which are Unsold
So the problem is pretty straightforward and I'm currently using the GetMyeBaySelling API call with an XML input that looks like this:
<?xml version="1.0" encoding="utf-8"?>
<GetMyeBaySellingRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>{eBayAuthToken}</eBayAuthToken>
</RequesterCredentials>
<DetailLevel>ReturnAll</DetailLevel>
</GetMyeBaySellingRequest>
Again, very simple. I understand that I will get the list of all Active items, the list of all Unsold/Sold items, etc. because I've set the <DetailLevel> field to ReturnAll in the input XML above
The problem is that for some reason, for one account that I'm testing this call on, it doesn't return the list of unsold items, as in, it doesn't return the container in the XML response, I'm talking about this one:
<UnsoldList> .... </UnsoldList>
This is weird because that one particular eBay account has more than 20 unsold items in it
Now this is where things get really weird, if I tested the API call on other eBay accounts, it works just fine and returns the list of all Unsold items with no problem 😕
Did I do something wrong here or is there some kind of bug in this eBay API call?
SOLVED!
It turns out that we have to specify
<DurationInDays>{numberOfDays}</DurationInDays>
Where {numberOfDays} is an integer value which represents how far back in the past do the unsold listings we want to extract have to be?
In this case, we can specify 60, which is the maximum number of days accepted by the GetMyeBaySelling API to indicate that we want all unsold listings which ended within the past 60 days.
So what happened was that on this one particular account, all of the unsold listings ended on 5th of December 2020. Whatever the default {numberOfDays} for DurationInDays value set by eBay is, it's clearly not big enough to cover these listings which ended on 5th of December 2020. Hence, by specifying it to 60 days, I got all of the unsold listings just fine :)
So for whoever out there who's facing a similar problem, remember this field, it could very well fix the problem that you have (if it's anything similar to mine).
When using https://nominatim.openstreetmap.org/search?format=xml&q=bahamas%20ponte%20nova&addressdetails=1&limit=3
I have exactly the result that I want.
But if you delete the name of my city "Ponte Nova", in the result comes up to references from Spain, but no results come from my city.
How do I get the results to focus on a given radius?
Please see see Nominatim API documentation.
According to section Result Limitation you can use viewbox=<x1>,<y1>,<x2>,<y2> and bounded=1 to restrict the search results to a specific area.
Example: https://nominatim.openstreetmap.org/search?format=xml&q=bahamas&addressdetails=1&limit=3&viewbox=-43.00804%2C-20.36925%2C-42.73699%2C-20.44969&bounded=1
We have a website where users put up ads for stuff they want to sell, with parameters such as price, location, title and description. These can then be searched for using sphinx and allowing users to specify min- and maxprice, a location with a searchradius (using google maps) etc. Users can choose to save these searches and get emails when new ads appear that fit their search. Herein lies the problem: We want to perform a reverse search every time an ad is posted. With the price, location, title and description as parameters we want to search through all the saved "searches" and get the ones that would have found the ad. The min- and maxprice should just be performed in a query i suppose, and some Quorom syntax to get all ads with at least 2 or mby just 1 occurance in the title/description. Our problem lies mostly in the geo-search. How do we find all searches where the "search-circles" would include our newly posted location without performing a search for every saved search?
That is the main-question, any comment on our suggested solution to the other problems is also very welcome. Thank you in advance / Jenny
The standard 'geo-search' support on sphinx should work just as well on a Prospective Index, as a normal retrospective search.
Having built a sphinx 'index' of all the saved searches...
And you run a query using the 'ad' as the search query:- rather than the 'filter' using a fixed radius, you just use the radius from the attribute (ie the radius stored on the particular query) - if using the API cant use setFilterRange directly, need to use setSelect, to make a new virtual attribute.
$cl->setSelect("*,IF(#geodist<radius,1,0) as myfilter");
$cl->setFilter('myfilter',array(1));
(and yes, the min/maxprice can just be done with normal filters too - just inverting the logic to that you would use in a retrospective search)
... the complication is in the 'full-text' query, if the saved search is anything more than a single keyword, but you appear to have already figured out that part.
im making a app in using the Foursquare API, using their API i can get some places in a neighborhood.
I'm using one like that:
https://api.foursquare.com/v2/venues/explore
?ll=40.7,-74
&limit=50
&venuePhotos=1
Using that API i can take 50 venues around my point, but how can I take more others venues like a second page of that?
You can use the "offset" parameter to query for subsequent pages of results. For example, to get the second page, you would supply "offset=50" to indicate skipping the first 50 results.
After I create a new place on Facebook app, I use graph api to search the place with exact same location. However, I cannot get the place I just created even if I increase the distance to 1000 ft.
My search URL is as follow:
https://graph.facebook.com/search?type=place¢er=25.091075, 121.55983449999997&distance=100&limit=100&offset=0&access_token=XXXX
In addition, if I add q="My Place" parameter, I can get the place.
Is it possible to get the new place information without parameter 'q=My Place'?
Most likely, it takes a while for Facebook's search service to index the new place. I would be very surprised if you still having trouble with this after a day or so.