Documentation - Google Search API

Overview

The following is a list of the various parameters available in Codery's Google Search API.

name [type] (default) Description
api_key [string] required Your API key
search [string] required The text you'd type into Google's search box
add_html [boolean] (false) Including the page's full html in the results
country_code [string] ("us") The country code from which you want the request to originate
extra_params [string] ("") Extra Google URL parameters
language [string] ("en") Language the search results will be displayed in
nb_results [integer] (100) The amount of Google Search results you'd like to receive
page [integer] (1) The page number from which you want to get results

PHP CURL

$curl = curl_init();
                curl_setopt_array($curl, array(
                  CURLOPT_URL => "https://app.mycodery.com/api/google/?access_token=YOUR_APY_KEY&search=YOUR_GOOGLE_SEARCH",
                  CURLOPT_RETURNTRANSFER => true,
                  CURLOPT_ENCODING => "",
                  CURLOPT_MAXREDIRS => 10,
                  CURLOPT_TIMEOUT => 30,
                  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                  CURLOPT_HTTPHEADER => array(
                    "Accept: application/json",
                    "Authorization: Bearer YOUR_APY_KEY",
                    "Content-Type: application/json",
                    "cache-control: no-cache"
                  ),
                ));
                $response = curl_exec($curl);
                $err = curl_error($curl);
                curl_close($curl);
                if ($err) {
                  echo "cURL Error #:" . $err;
                } else {
                  echo $response;
                }

PYTHON

import requests
                url = "https://app.mycodery.com/api/google/?access_token=YOUR_APY_KEY&search=YOUR_GOOGLE_SEARCH"
                headers = {
                    'Accept': "application/json",
                    'Content-Type': "application/json",
                    'Authorization': "Bearer YOUR_APY_KEY",
                    'cache-control': "no-cache"
                    }
                response = requests.request("GET", url, headers=headers)
                print(response.text)

JAVASCRIPT Jquery AJAX

var settings = {
                "async": true,
                "crossDomain": true,
                "url": "https://app.mycodery.com/api/google/?access_token=YOUR_APY_KEY&search=YOUR_GOOGLE_SEARCH",
                "method": "GET",
                "headers": {
                  "Accept": "application/json",
                  "Content-Type": "application/json",
                  "Authorization": "Bearer YOUR_APY_KEY",
                  "cache-control": "no-cache"
                },
                "processData": false
              }
              $.ajax(settings).done(function (response) {
                console.log(response);
              });