Translations API Usage by API Key - api

Here is what I have:
Project in Google API (Translate API)
Billing Enabled
Upgraded Quota limit up to 10 000 000 chars per day
One server key
Many sites, which use this key to translate text
And here is the problem: it seems our sites request more texts for translations than we expect and we can't find which of the sites sends so many texts. We have looked at our sites and found nothing. We want to determine translations requests volume by each site or module.
I can see overall usage and quota usage in API Manager. But there is no information about IP / domain name input to the overall usage. Is it possible to see translations usage by site / API usage / other parameter.
I have some ideas and questions. First, I can create a unique API key for each site/module so each site will use its own key. But it seems it is not possible to see translations usage by keys within one project.
The second idea was about adding parameter in URL like user_id. That method was mentioned in API docs but, again, I can't see how to generate translations usage by a certain parameter.
Could you please advise?

Related

Are Firebase dynamic links short url info exposable?

Can an attacker view the query parameters of a shortened firebase dynamic link?
If yes, is it secure enough to use let’s say invite links that contain a group ID to access that certain group.
In that case wouldn’t there technically be the security issue of someone having a program attempt all ids till they get a correct ID?
After some research, the url parameters are indeed exposed and viewable.
Secondly, firebase document ID's consist of 20 characters, each character could be 26 * 2 (Alphabet Capital and small) + 10 number possibilities. Meaning that an ID has 62^20 combinations, Good luck to anyone trying that amount out.
Thirdly, i believe App attest would block a user if he's abusing resources.

Google Custom Search Engine pricing

The pricing regarding CSE is a little bit vague:
For CSE users, the API provides 100 search queries per day for free. If you need more, you may sign up for billing in the API Console. Additional requests cost $5 per 1000 queries, up to 10k queries per day
Does one query equal one keyword regardless of pagination used, or one request? (in this sense XML is more efficient than JSON, as it allows 20 in num parameter, as opposed to JSONs 10)
Are the queries counted per API key, or per cx key?
It is vague and you are not the first to be puzzled. When I did my research I found this blog post helpful.
Assume you are talking about Custom Search Engine (terms you noted in your Q) and NOT Google Site Search (paid from the start). The reason I ask is that the XML function is only for Google Site Search customers. There is the JSON/Atom API and Custom Search API available for CSE.
For Q1, one Query = one request. You can use as many keywords or other parameters in your request (see comments in the blog post I referenced), but you will always be limited to 100 results.
For Q2, the billing is enabled through the API console. Once enabled (and in order to allow the 101st query) your code must include both your cx and API key. So in theory you could set up multiple search engines within your API and stay under the 100 request limit, but I have not seen a way to allow an API to support multiple cx keys.

Google maps geocoding returns empty string

Yesterday I created a new Google map geocoding API key on the developper console. I need to get gps coordinates from a server script. When I use the "which key do I need" in the console, it tells me I choosed the right key. I also allowed the fixed IP of my server in the key settings.
Now, when I use "https://maps.googleapis.com/maps/api/geocode/json?address=MY_ADDRESS&sensor=false&key=MY_KEY", it returns an empty string.
When I use "http//maps.googleapis.com/maps/api/geocode/json?address=MY_ADDRESS&sensor=false&key=MY_KEY" it returns a warning about this kind of queries must use https (which is consistent with the doc).
And finally, when I use "http//maps.googleapis.com/maps/api/geocode/json?address=MY_ADDRESS&sensor=false" (no https and no key) I get the relevant data, either in json or xml. As explained in the doc, this can be used with a limit of 2500 geocoding per day, but the problem is that I have different domains on the same server (with the same IP) that geocode, and since google tracks by IP to evaluate daily quotas...
So my question is : what am I missing when trying to geocode an address using https and the key ?
The only thing that crossed my mind is : do I need to activate billing in google maps, even though I know for sure that I will never exceed the free quota of 2500 queries per day, at least with the project to which the key is associated ?
Thanks in advance for any tip or advice.

API key for themoviedb.org

I need to use themoviedb.org for one of the apps I am working on. For using the API, I need an API key. How do I get an API key on themoviedb.org?
I found this in the forum:
You can request an API key by clicking on the "API" link from within your account page on the left hand sidebar. See here
In terms of making things faster for people, the URL for application is here these days (Under Account>Settings>API as previously mentioned): https://www.themoviedb.org/settings/api
You'll want to start with a Developer key as wait time for a Developer key is zero (immediate). A commercial key, as far as I understand it, is only appropriate once the app is developed and running. Turnaround for a commercial API key is about 3 days-ish though obviously could vary.
Once you have a key, inside the doco pages there's a "Try It Out" tab which lets you do calls. The normal code flow (for getting movie details) would be something like:
Get Configuration (needed for image paths, should be cached)
Search Movies (returns a list, find the numeric id for the one you want in the list returned). Be aware there might be duplicates returned - you can use the year of release, title and language to find the one you want.
Get Movie Details with the movie numeric ID, with "append_to_response" of "credits,images,trailers" so that actors, writers, directors, and trailers (aka videos) are returned.
Check doco for how to find the actual image paths, using configuration values fetched above. It's generally considered courteous to copy the images you want to use to your own server rather than serving them from TMDB's server.

Can google analytics gave me stats for different url's on same domain

Scenario
I am working on a web application assume it www.abc.com which having a profile for all users
www.abc.com/username
and all users have a dashboard for controlling their profiles
Requirement
i have one analytics profile for www.abc.com but my requirement is
a to show stats to all users on their dashboard
can i get this by google analytics API
Visits
demographics
all traffic source
and keywords
i have integrated reporting by API on one of my project but that is for the domain . i am not sure for my requirement.
Resource-guru.com, what you can do is to pull all the data with page path dimension included, and then simply filter the results if the username string is found in the page path.
As for the second part of your question - you can get:
visits (metric)
traffic sources as well as keywords (dimensions, but remember (not provided) might make this useless report)
you can NOT get demographics data via API.
Hope this helps.
You can use the API to do this but remember your going to have an issue with the fact that you can only make 10k requests per day per view (profile).
The Demographics report displays age and gender. Those dimensions can be found under the Audience - Dimensions & Metrics Reference
ga:visitorAgeBracket
ga:visitorGender
ga:interestOtherCategory
ga:interestAffinityCategory
Traffic Source is just really just a mix up of ga:sourceMedium , ga:campaign maybe a few others depending on what information you want to display.
You may have issues with Keywords because due to ssl and trying to keep user info private Google has stopped recording this sometimes you get (not provided). But you can get that information from webmaster tools. Its just hard to merge it with your GA data then.
Keyword: The keywords that visitors searched are usually captured in
the case of search engine referrals. This is true for both organic and
paid search. Note, however, that when SSL search is employed, Keyword
will have the value (not provided).