Nova Resource:Google-api-proxy/Documentation: Difference between revisions

From Wikitech
Content deleted Content added
No edit summary
Coren (talk | contribs)
Kadari -> Kaldari
Line 1: Line 1:
{{Nova Project Documentation}}
'''Google-api-proxy''' provides a static IP for communication with the [https://developers.google.com/custom-search/ Google Custom Search] search API.
'''Google-api-proxy''' provides a static IP for communication with the [https://developers.google.com/custom-search/ Google Custom Search] search API.


== Usage ==
== Usage ==
# Get the Wikimedia Google API key from {{User link|Kaldari|Kadari|mw}}
# Get the Wikimedia Google API key from {{User link|Kaldari|Kaldari|mw}}
# Use <code><nowiki>https://google-api-proxy.wmflabs.org/</nowiki></code> instead of <code><nowiki>https://www.googleapis.com/</nowiki></code> when interacting with [https://developers.google.com/custom-search/json-api/v1/overview Google's Custom Search JSON/Atom API].
# Use <code><nowiki>https://google-api-proxy.wmflabs.org/</nowiki></code> instead of <code><nowiki>https://www.googleapis.com/</nowiki></code> when interacting with [https://developers.google.com/custom-search/json-api/v1/overview Google's Custom Search JSON/Atom API].



Revision as of 14:08, 4 June 2016

Google-api-proxy/Documentation

Description

Google-api-proxy provides a static IP for communication with the Google Custom Search search API.

Usage

  1. Get the Wikimedia Google API key from [[
mw:User:Kaldari|Kaldari]]
  1. Use https://google-api-proxy.wmflabs.org/ instead of https://www.googleapis.com/ when interacting with Google's Custom Search JSON/Atom API.

How it works

https://google-api-proxy.wmflabs.org is a Labs web proxy pointing at an instance in the google-api-proxy project with a static IP address. The instance is running an Nginx web server configured as a reverse proxy. All HTTP requests sent to this proxy will be relayed to https://www.googleapis.com and the upstream response will be provided back to the requesting client. Details of the Nginx configuration are available on GitHub.

API keys using this proxy will need to whitelist the IP address 208.80.155.245 in the Google developer console.