> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://en.megaport.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://en.megaport.ferndocs.com/_mcp/server.

# Look Up Google Pairing Key

GET https://api.megaport.com/v2/secure/google/{pairing_key}

The first step when ordering Google Cloud service is to use the pairing key and ensure there is an available port for a connection.

In the lookup response, available ports are listed as "vxc":null and ports with an assigned value are not available.

In the example response, the first port is unavailable and the second port is available.

Google requires that the bandwidth on the VXC matches one of the predefined bandwidths in the list returned by the pairing key lookup.

Reference: https://en.megaport.ferndocs.com/api-reference/cloud-connectivity/look-up-google-pairing-key

## Servers

- `https://api.megaport.com` (Production environment, default)
- `https://api-staging.megaport.com` (Staging environment (test only, reset every 24 hours))

## Request

### Path parameters

- `pairing_key` (string, required)

## Response

### 200

Look Up Google Pairing Key / Look Up Google Pairing Key / Look Up Google Pairing Key / Look Up Google Pairing Key / Look Up Google Pairing Key / Look Up Google Pairing Key

- `data` (V2SecureGooglePairingKeyGetResponsesContentApplicationJsonSchemaData, optional)
- `message` (string, optional)
- `terms` (string, optional)

## Types

### V2SecureGooglePairingKeyGetResponsesContentApplicationJsonSchemaData

- `bandwidths` (list of double, optional)
- `megaports` (list of V2SecureGooglePairingKeyGetResponsesContentApplicationJsonSchemaDataMegaportsItems, optional)
- `ports` (list of V2SecureGooglePairingKeyGetResponsesContentApplicationJsonSchemaDataPortsItems, optional)
- `resource_type` (string, optional)

### V2SecureGooglePairingKeyGetResponsesContentApplicationJsonSchemaDataMegaportsItems

- `companyId` (double, optional)
- `companyName` (string, optional)
- `companyUid` (string, optional)
- `country` (string, optional)
- `description` (string, optional)
- `locationId` (double, optional)
- `nServiceId` (double, optional)
- `name` (string, optional)
- `port` (double, optional)
- `portSpeed` (double, optional)
- `productId` (double, optional)
- `productUid` (string, optional)
- `state` (string, optional)
- `vxc` (any, optional, nullable)

### V2SecureGooglePairingKeyGetResponsesContentApplicationJsonSchemaDataPortsItems

- `service_id` (double, optional)
- `vxc_service_ids` (list of any, optional)

## Examples

**Response**

```json
{
  "data": {
    "bandwidths": [
      50,
      100,
      200,
      300,
      400,
      500,
      1000,
      2000,
      5000,
      10000,
      20000
    ],
    "megaports": [
      {
        "companyId": 90,
        "companyName": "Google Inc",
        "companyUid": "29ba879b-45c8-48eb-bd97-618d0f20ea04",
        "country": "Australia",
        "description": "Google Inc at NextDC S1",
        "locationId": 10,
        "nServiceId": 181638,
        "name": "Sydney (syd-zone1-1660)",
        "port": 81456,
        "portSpeed": 100000,
        "productId": 81456,
        "productUid": "4aaf6946-6166-4f41-b726-b388aad98fcb",
        "state": "NSW",
        "vxc": null
      }
    ],
    "ports": [
      {
        "service_id": 28350,
        "vxc_service_ids": []
      },
      {
        "service_id": 90779,
        "vxc_service_ids": []
      },
      {
        "service_id": 181638,
        "vxc_service_ids": []
      }
    ],
    "resource_type": "csp_connection"
  },
  "message": "Successful lookup",
  "terms": "This data is subject to the Acceptable Use Policy https://www.megaport.com/legal/acceptable-use-policy"
}
```

**SDK Code**

```python
import requests

url = "https://api.megaport.com/v2/secure/google/pairing_key"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.megaport.com/v2/secure/google/pairing_key';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.megaport.com/v2/secure/google/pairing_key"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

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

url = URI("https://api.megaport.com/v2/secure/google/pairing_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.megaport.com/v2/secure/google/pairing_key")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.megaport.com/v2/secure/google/pairing_key');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.megaport.com/v2/secure/google/pairing_key");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.megaport.com/v2/secure/google/pairing_key")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```