Bing search API with DisableLocationDetection not working - bing

The Bing search API is using my (or my server's) location even when I set the appropriate option. I would like it to provide a location agnostic response.
Am I misunderstanding the documentation? Is this syntax right?
http://api.bing.net/json.aspx?Appid=<XXX>&query=microsoft&sources=news&options=DisableLocationDetection
Thanks in advance

The syntax is right. According to the doc, the DisableLocationDetection option prevents Bing from inferring location from the query itself ("microsoft" in your example), but not from the properties of the request, such as server's IP.
News requests can specify LocationOverride parameter to get news from a particular US state. Also, if you're having troubles with automatic market detection (if your server is in another country, for example), you can specify Market parameter to override the market detection.
If this still doesn't help you, can you update the question to provide an example of a query which gives you the bad result?

Related

Google Geocode/Places API: search zip code - get addresses connected to it, possible?

So, another Google API question but I didn't find any threads for my needs.
I'm trying to implement a basic zip code search with Google API in plain Javascript (tested both Geocode and Places with Autocomplete).
User should be able to search on a specific zip code and get street names returned which are connected to that zip code (and simply choose the correct address).
I have no problems getting results back using either one of the APIs but I can't wrap my head around Googles documentation for it since nothing tells you if this is possible or not.
I've tested a couple of different types to send in the options setting but none actually returns an array of addresses.
Been thinking if reverse geocoding would be a solution but seems a bit hacky and also would require multiple requests..
Simply out of ideas, any help appreciated.
types: ['geocode'],
componentRestrictions: { country: 'SE' }
}
let autocomplete;
function initialize() {
autocomplete = new google.maps.places.Autocomplete(
document.getElementById('postalCode'), options);
autocomplete.setComponentRestrictions({'country': ['SE']})
autocomplete.setFields(['address_component']);
autocomplete.addListener('place_changed', fillInAddress);
}
Please note that it is currently not supported for the Geocoding or Places API to show a list of addresses by zip code.
Places Autocomplete is designed to return place predictions based on the user input and perceived relevance. While the Geocoding API is designed to convert a single string address to coordinates and vice versa.
You can use this Geocoder tool to test this.
There is also a related feature request for this functionality, it's marked as Infeasible/Intended behavior but you can still star it to receive updates:
https://issuetracker.google.com/issues/64769088
Starring the issue also provides valuable feedback on the importance of the issue to customers, and increases the issue's priority with the product engineering team.

Availability of POIs in HERE WeGo app vs Here Entrypoint (Places Search API)

I'm looking for certain POIs using their confirmed coordinates but the Here entrypoint from Place Search API (/discover/here) doesn't provide all POIs which I could manually find in the HERE WeGo web-app.
At the beginning I thought maybe this is because the default categories are set to eat-drink, going-out and shopping? I have provided an additional parameter (cat) to my request with all the categories, but this gave me even more missing POIs.
Does anyone know why there is a such difference between the web-app and API service?
The here-wego app doesn't use the "discover/here" endpoint so this won't show you the same results. It uses "discover/search".
The discover/here entrypoint was designed for a different use case and its behavior is a bit odd. It was set up for "check-ins", so it isn't guaranteed to return everything in an area.
If you want to provide your users all of the POIs in an area, you should use the browse/ endpoint. I know that requires them to specify categories, but it's really the best choice.
Alternatively, depending on your use case, you can call discover/search the same way you called it by using the here-wego app (same query and search center).

Cakephp 3.1 REST - Filtering data

I have setup my application for REST access as per documentation. The default routes are working well. I am able to retrieve, update and delete records, however, I am not sure how I could filter data sending parameters to the controller. I wonder if I can do that using querystring or if there is a better way to accomplish that. Please can someone give me directions?
Reads about the Request object in the manual. And use the Search Plugin for filtering.
The search plugin comes with a lot of documentation that explains how to use it as well.
Your question is so generic that a proper answer would end up in a whole article - which I'm obviously not going to write, there is enough information available on HTTP requests and query params. Use Google or read these links:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages
https://www.w3.org/Protocols/HTTP/Request.html

how to specify URL in filters pagePath core reporting api V3

I am building a web app that pulls data through the Core Reporting Api v3 from Google. I am using the client PHP library offered by Google.
I am currently trying to specify a page and retrieve its pageviews for a time range. Every other seems to be working okay except for the fact that if a specfy a filter with ga:pagePath==http://link/uri then I get 0 all the time no matter the time range.
I think the problem is got to do with the setting of value for this pagePath. I want to have spearate data for the desktop version of the site and the smartphone version denoted by s. subdomain
Can anyone hint me on some tips and or tricks to use to get the required data?
Example URL:
http://domain.com/user/profile/id/1
http://s.domain.com/user/profile/id/1
Thanks in advance!
for the the default implementation of Google Analytics, ga:pagePath doesn't include the scheme or hostname so in your case you'd actually want to filter using ga:hostname and ga:pagePath together.
I suggest you use the Query Explorer to build your queries and get familiar with what will work. You can also use this tool to at least get a sense for what type of data the ga:pagePath and ga:hostname dimensions return before trying to filter on them. Finally, once you have the query you want, you can easily get the exact Core Reporting API query by clicking on the Query URI button.
Also check out the Combining Filters section of GA API docs.
So if you want filter on ga:pagepath for domain.com and s.domain.com separately you could do something like
filters=ga:pagePath==/user/profile/id/1;ga:hostname==domain.com
filters=ga:pagePath==/user/profile/id/1;ga:hostname==s.domain.com

Clarification on Bing Maps API locationCode field

I'm working on learning the Bing Maps API for my current project at work. In various locations in route and traffic data output, there is a field called locationCode (or locationCodes). The documentation provides no clarification on what this field is, except to state: "A subscription is typically required to be able to interpret these codes for a geographical area or country."
Nothing I've been able to find yet defines this further or clarifies what data that code can be translated into by these subscription services. So, what are some of the services available to translate this code and what data can be obtained via these services?
Those information are related to traffic for specific roads, see the details for the API:
http://msdn.microsoft.com/en-us/library/hh441726.aspx
Also the description of each field included in the result:
http://msdn.microsoft.com/en-us/library/hh441730.aspx
You are referring to the locationCode. Those are related to the Traffic Message Channel information where the included information are the event id, the location code, expected incident duration, affected extent and other details.
Those TMC are managed in different ways depending on the country you are interested in and specialised mapping data provider can give you access to those kind of information and that's what the subscription is about. It is also related to the way you can use the TMC depending on the concerned area to get or give information from there.
For more information about TMC:
http://en.wikipedia.org/wiki/Traffic_message_channel