# Google Patent Details API

Each successful request will cost you **`5`** API credits.

You have to send a GET request to **`http://api.scrapingdog.com/google_patents/details`** with the below-given parameters.

### Parameters

#### Scrapingdog Parameters

| Parameter                                                          | Description                                                                                                                                                                |
| ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>api\_key<br></p><p><mark style="color:red;">required</mark></p> | <p>Your personal API key. Available on your dashboard <br><br>Type: <em><strong>String</strong></em></p>                                                                   |
| html                                                               | <p>This will return the full HTML of the Google page. <br><br>Default Value - <strong><code>false</code></strong> <br><br>Type - <strong><code>Boolean</code></strong></p> |

#### Search Query

| Parameter                                                         | Description                                                                       |
| ----------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| <p>patent\_id<br><br><mark style="color:red;">required</mark></p> | <p>The patent ID of the patent.<br><br>Type: <em><strong>String</strong></em></p> |

**Localization**

|          |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| language | <p>Language of the results. Possible Values - <strong><code>en</code></strong>, <strong><code>es</code></strong>, <strong><code>fr</code></strong>, <strong><code>de</code></strong>, etc. Visit <a href="https://docs.scrapingdog.com/google-search-scraper-api/google-language-page">Google's languages page</a> for a complete list of supported countries. <br><br>Default Value - en<br><br>Type - <strong>String</strong></p> |

### API Example

{% tabs %}
{% tab title="cURL" %}

```json
curl "https://api.scrapingdog.com/google_patents/details/?api_key=5eaa61a6e562fc52fe763tr516e4653&patent_id=US11734097B1"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

api_key = "5eaa61a6e562fc52fe763tr516e4653"
url = "https://api.scrapingdog.com/google_patents/details"

params = {
    "api_key": api_key,
    "patent_id": "US11734097B1",
}

response = requests.get(url, params=params)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Request failed with status code: {response.status_code}")

```

{% endtab %}

{% tab title="Node JS" %}

```javascript
const axios = require('axios');

const api_key = '5eaa61a6e562fc52fe763tr516e4653';
const url = 'https://api.scrapingdog.com/google_patents/details/';

const params = {
  api_key: api_key,
  patent_id: 'US11734097B1'
};

axios
  .get(url, { params: params })
  .then(function (response) {
    if (response.status === 200) {
      const data = response.data;
      console.log(data)
    } else {
      console.log('Request failed with status code: ' + response.status);
    }
  })
  .catch(function (error) {
    console.error('Error making the request: ' + error.message);
  });

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

// Set the API key and request parameters
$api_key = '5eaa61a6e562fc52fe763tr516e4653';
$patent_id = 'US11734097B1';

// Set the API endpoint
$url = 'https://api.scrapingdog.com/google_patents/details/?api_key=' . $api_key . '&patent_id=' . $patent_id;

// Initialize cURL session
$ch = curl_init($url);

// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Execute the cURL request
$response = curl_exec($ch);

// Check if the request was successful
if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
} else {
    // Process the response data as needed
    echo $response;
}

// Close the cURL session
curl_close($ch);

```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
require 'uri'

# Set the API key and request parameters
api_key = '5eaa61a6e562fc52fe763tr516e4653'
patent_id = 'US11734097B1'

# Construct the API endpoint URL
url = URI.parse("https://api.scrapingdog.com/google_patents/details/?api_key=#{api_key}&patent_id=#{patent_id}")

# Create an HTTP GET request
request = Net::HTTP::Get.new(url)

# Create an HTTP client
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true # Enable SSL (https)

# Send the request and get the response
response = http.request(request)

# Check if the request was successful
if response.is_a?(Net::HTTPSuccess)
  puts response.body # Process the response data as needed
else
  puts "HTTP request failed with code: #{response.code}, message: #{response.message}"
end

```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.IOException;

public class Main {
    public static void main(String[] args) {
        try {
            // Set the API key and request parameters
            String apiKey = "5eaa61a6e562fc52fe763tr516e4653";
            String patent_id = "US11734097B1";

            // Construct the API endpoint URL
            String apiUrl = "https://api.scrapingdog.com/google_patents/details/?api_key=" + apiKey
                    + "&patent_id=" + patent_id

            // Create a URL object from the API URL string
            URL url = new URL(apiUrl);

            // Open a connection to the URL
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            // Set the request method to GET
            connection.setRequestMethod("GET");

            // Get the response code
            int responseCode = connection.getResponseCode();

            if (responseCode == 200) {
                // Read the response from the connection
                BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                String inputLine;
                StringBuilder response = new StringBuilder();

                while ((inputLine = reader.readLine()) != null) {
                    response.append(inputLine);
                }
                reader.close();

                // Process the response data as needed
                System.out.println(response.toString());
            } else {
                System.out.println("HTTP request failed with response code: " + responseCode);
            }

            // Close the connection
            connection.disconnect();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

```

{% endtab %}
{% endtabs %}

### Response

```json
{
    "title": "Machine learning-based hardware component monitoring \n       ",
    "type": "patent",
    "pdf": "https://patentimages.storage.googleapis.com/00/a7/59/6750cd74efdf32/US11734097.pdf",
    "publication_number": "US11734097B1",
    "country": "United States",
    "prior_art_keywords": [
        "storage",
        "data",
        "hardware component",
        "anomaly",
        "monitoring system"
    ],
    "prior_art_date": "2018-01-18",
    "application_number": "US17/160,053",
    "inventors": [
        {
            "name": "Christopher Golden",
            "link": "https://patents.google.com/?inventor=Christopher+Golden",
            "scrapingdog_link": "https://api.scrapingdog.com/google_patents?api_key=APIKEY&inventor=Christopher+Golden"
        },
        {
            "name": "Emily Watkins",
            "link": "https://patents.google.com/?inventor=Emily+Watkins",
            "scrapingdog_link": "https://api.scrapingdog.com/google_patents?api_key=APIKEY&inventor=Emily+Watkins"
        }
    ],
    "assignees": [
        "\n    Pure Storage Inc\n  "
    ],
    "priority_date": "2018-01-18",
    "filing_date": "2021-01-27",
    "publication_date": "2021-01-27",
    "worldwide_applications": {
    ...
    }
   ........... 
```
