You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

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

From Wikitech-static
Jump to navigation Jump to search
imported>Kotz
No edit summary
imported>Kaldari
(Google OCR)
Line 2: Line 2:


== Usage ==
== Usage ==
# Get the Wikimedia Google API key from {{User link|Kaldari|Kaldari|mw}}
# Get the Wikimedia Google API key from [[User:Kaldari|Kaldari]]
# 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].


Line 13: Line 13:
* [https://tools.wmflabs.org/copyvios/ Earwig's copyvio detector] (who's API is used by [https://tools.wmflabs.org/copypatrol/ CopyPatrol])
* [https://tools.wmflabs.org/copyvios/ Earwig's copyvio detector] (who's API is used by [https://tools.wmflabs.org/copypatrol/ CopyPatrol])
* [https://he.wikipedia.org/wiki/%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%91%D7%95%D7%98/%D7%91%D7%95%D7%98_%D7%94%D7%94%D7%A1%D7%91%D7%94 Kotz' bot "BotHasava"]
* [https://he.wikipedia.org/wiki/%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%91%D7%95%D7%98/%D7%91%D7%95%D7%98_%D7%94%D7%94%D7%A1%D7%91%D7%94 Kotz' bot "BotHasava"]
* [https://wikisource.org/wiki/Wikisource:Google_OCR Google OCR] for Wikisource

Revision as of 16:44, 4 October 2018

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 Kaldari
  2. 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.

Tools using the proxy