
<div style='background-color: #f0f4f8; border-left: 4px solid #007acc; padding: 15px 20px; font-family: Arial, sans-serif; font-size: 20px; color: #333;'>
  <strong>7th June 2025 - All API methods are now available for all subscription plans, including the Bronze.</strong>
</div>
<p>&nbsp;</p>

# Get "People Also Search For" Keywords


?> **POST** `{{{v1.server}}}/get_pasf_keywords`


Obtain a list of keywords that users frequently search for on Google based on your provided seed keyword.

**Note:** Each keyword result retrieved through this API endpoint consumes 2 credits.


### Authorization

You need an API key to access this API endpoint. Get your API key [here](https://keywordseverywhere.com/first-install-addon.html).


### Example API Calls

<!-- tabs:start -->

#### ** Bash **

- Urlencoded version

```shell script
params=()
params+=("keyword=$(echo -e 'climate change' | iconv -t utf-8)") # For shells not using UTF-8, ensure that your input data is encoded in UTF-8.
params+=('num=5')
data=$(IFS='&' ; echo "${params[*]}")
curl -H 'Authorization: Bearer {{{v1.apiKey}}}' -H 'Accept: application/json' --data "$data" '{{{v1.server}}}/get_pasf_keywords'
```

- JSON version

```shell script
curl -H 'Authorization: Bearer {{{v1.apiKey}}}' -H 'Accept: application/json' -H 'Content-type: application/json' --data '{
    "keyword": "climate change",
    "num": 5
}' '{{{v1.server}}}/get_pasf_keywords'
```


#### ** PHP **

```php
<?php

$parameters = [
  "keyword" => mb_convert_encoding("climate change", 'UTF-8'), # Please ensure that your input data is encoded in UTF-8.
  "num" => 5
];

$query = http_build_query($parameters);

$ch = curl_init('{{{v1.server}}}/get_pasf_keywords');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Accept: application/json',
  'Authorization: Bearer {{{v1.apiKey}}}'
));

curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);

$data = curl_exec($ch);
$err = curl_error($ch);
$info = curl_getinfo($ch);
curl_close($ch);

if($info['http_code'] == 200){
  echo "Success!\n\n" . $data;
} else {
  echo "An error occurred.\n\n" . $data;
}
```

#### ** Laravel **

```php
<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Http;

/*
 * Execute this command as follows:
 *
 * php artisan get-pasf-keywords
 */
class GetPasfKeywordsCommand extends Command
{

    protected $signature = 'get-pasf-keywords';

    public function handle()
    {
        $response = Http::withToken('{{{v1.apiKey}}}')
            ->acceptJson()
            ->asForm()
            ->post('{{{v1.server}}}/get_pasf_keywords', [
                "keyword" => mb_convert_encoding("climate change", 'UTF-8'), # Please ensure that your input data is encoded in UTF-8.
                "num" => 5
            ]);

        try {
            echo $response->throw()->body();
        } catch (\Exception $e) {
            echo "An error occurred.\n\n" . $e->getMessage();
        }

        return 0;
    }
}
```

#### ** Java **

```java
package org.example;

import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;

public class GetPasfKeywords {

    public static void main(String[] args) throws UnirestException {
        // Unirest automatically encodes data in the standard UTF-8 format during a request.
        // However, when using HttpURLConnection or similar libraries, ensure they are set to use UTF-8 encoding.
        HttpResponse<String> response = Unirest.post("{{{v1.server}}}/get_pasf_keywords")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer {{{v1.apiKey}}}")
                .field("keyword", "climate change")
                .field("num", 5)
                .asString();
        if (response.getStatus() == 200) {
            System.out.printf("Success.\n\n%s\n", response.getBody());
        } else {
            System.out.printf("An error occurred.\n\n%s\n", response.getBody());
        }
    }
}
```

#### ** Python **

```python
# pip install requests
import requests

my_headers = {
    'Accept': 'application/json',
    'Authorization': 'Bearer {{{v1.apiKey}}}'
}

# In Python 3, strings are inherently in UTF-8 encoding.
# Character set conversions are unnecessary unless directly dealing with byte arrays.
my_data = {
    "keyword": "climate change",
    "num": 5
}
response = requests.post('{{{v1.server}}}/get_pasf_keywords', data=my_data, headers=my_headers)
if response.status_code == 200:
    print('success\n\n' + response.content.decode('utf-8'))
else:
    print("An error occurred\n\n" + response.content.decode('utf-8'))
```

#### ** Ruby **

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

endpoint_url = URI("{{{v1.server}}}/get_pasf_keywords")

http = Net::HTTP.new(endpoint_url.host, endpoint_url.port)
{{^v1_ruby_disable_ssl}}
http.use_ssl = false
{{/v1_ruby_disable_ssl}}

request_params = []
request_params.append("keyword=climate change")
request_params.append("num=5")

request = Net::HTTP::Post.new(endpoint_url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {{{v1.apiKey}}}'
# Ensure that your data is encoded in UTF-8 format before sending it to the API
request.body = request_params.join("&").encode(Encoding::UTF_8)
response = http.request(request)

if response.code == "200"
    puts "Success\n\n%s" % response.read_body
else
    puts "An error occurred\n\n%s" % response.read_body
end
```

#### ** NodeJs **

```js
// The Fetch API inherently supports only UTF-8 encoding, eliminating the need for character set conversions.
fetch('{{{v1.server}}}/get_pasf_keywords', {
    method: 'POST',
    body: new URLSearchParams([
        ["keyword", "climate change"],
        ["num", 5]
    ]),
    headers: {
        'Accept': 'application/json',
        'Authorization': `Bearer {{{v1.apiKey}}}`
    },
})
    .then((response) => response.text())
    .then((text) => console.log(text))
    .catch(error => {
        console.log(error)
    })
```

#### ** R **

```R
#install.packages(c("httr", "jsonlite"))
library(httr)
library(jsonlite)

body <- list()

body["keyword"] <- "climate change"
body["num"] <- 5

# R strings and httr requests use UTF-8 by default, removing the need for post data character set conversions.
res = POST(
    "{{{v1.server}}}/get_pasf_keywords",
    body = body,
    add_headers('Accept' = 'application/json',
                'Authorization' = 'Bearer {{{v1.apiKey}}}')
)
prettify(content(res, as = "text", encoding = "UTF-8"))
```

#### ** n8n (Custom Node) **



#### Workflow Diagram
![](images/n8n/custom_node/get_pasf_keywords.png)

#### Steps to Import the Workflow
1. If you haven't done so already, install the **[Keywords Everywhere API](https://www.npmjs.com/package/n8n-nodes-keywords-everywhere-api)** community node in your n8n instance.
2. Copy the JSON below and save it in a file.

  ```json
{{=<% %>=}}
  {
      "name": "Get PASF Keywords with Keywords Everywhere API",
      "nodes": [
          {
              "parameters": [],
              "type": "n8n-nodes-base.manualTrigger",
              "typeVersion": 1,
              "position": [
                  60,
                  -240
              ],
              "id": "b0f36f54-74f7-4668-8f4f-58edab8d35f0",
              "name": "When clicking ‘Test workflow’"
          },
          {
              "parameters": {
                  "jsCode": "return [\n  {\n    \"keywords\": [\"climate change\", \"expired domains\"]\n  }\n];"
              },
              "type": "n8n-nodes-base.code",
              "typeVersion": 2,
              "position": [
                  280,
                  -240
              ],
              "id": "5db7b428-89b3-4d56-b1e0-1b2fe7716219",
              "name": "Generate keywords array"
          },
          {
              "parameters": {
                  "operation": "get_pasf_keywords",
                  "keyword": "={{ $json.keywords }}",
                  "num": 10
              },
              "type": "n8n-nodes-keywords-everywhere-api.keApi",
              "typeVersion": 1,
              "position": [
                  720,
                  -240
              ],
              "id": "90dabf61-20c5-472d-9759-727574b4a3e6",
              "name": "Get PASF Keywords",
              "credentials": {
                  "keApi": {
                      "id": "N2i3rMzytn7OfaN3",
                      "name": "Keywords Everywhere account"
                  }
              }
          },
          {
              "parameters": {
                  "fieldToSplitOut": "keywords",
                  "options": []
              },
              "type": "n8n-nodes-base.splitOut",
              "typeVersion": 1,
              "position": [
                  500,
                  -240
              ],
              "id": "5918f093-90bf-4b72-a942-5fbf2642757f",
              "name": "Split Out"
          }
      ],
      "pinData": [],
      "connections": {
          "When clicking ‘Test workflow’": {
              "main": [
                  [
                      {
                          "node": "Generate keywords array",
                          "type": "main",
                          "index": 0
                      }
                  ]
              ]
          },
          "Generate keywords array": {
              "main": [
                  [
                      {
                          "node": "Split Out",
                          "type": "main",
                          "index": 0
                      }
                  ]
              ]
          },
          "Split Out": {
              "main": [
                  [
                      {
                          "node": "Get PASF Keywords",
                          "type": "main",
                          "index": 0
                      }
                  ]
              ]
          }
      },
      "active": false,
      "settings": {
          "executionOrder": "v1"
      },
      "versionId": "9f1e6e29-936e-4c84-8ef4-dbc1e50c284a",
      "meta": {
          "templateCredsSetupCompleted": true,
          "instanceId": "05035923b4e6188dc7851e2829900eebe8ed69d4f94ad4bab03daf6d88491d90"
      },
      "id": "fb6mxQghbcHEbRgJ",
      "tags": []
  }
<%={{ }}=%>
  ```
3. In your n8n instance, click on the **&#x22EF;** menu at the top right and select the **Import from File** option.
4. Select the JSON file you saved above.
5. Adjust any necessary parameters (e.g., **Keywords Everywhere** credentials).

#### ** n8n (HTTP Request) **


#### Workflow Diagram
![](images/n8n/http_request/get_pasf_keywords.png)

#### Steps to Recreate the Workflow
1. Start with a **Trigger Node**: e.g., **"Trigger Manually"** to invoke the workflow.
2. Add a **"HTTP Request"** node.
   - Click **"Import cURL"** at the top right of the node editor.
   - Paste the command below and click **"Import"**.
     ```shell
     curl -H 'Authorization: Bearer {{{v1.apiKey}}}' -H 'Accept: application/json' -H 'Content-type: application/json' --data '{
         "keyword": "climate change",
         "num": 5
     }' '{{{v1.server}}}/get_pasf_keywords'
     ```
   - Adjust the authorization header with your **Keywords Everywhere** API key.

     ![](../_media/n8n/authorization_header.png)

3. Adjust any necessary parameters (e.g., you can rename the node to **"Get "People Also Search For" Keywords"**).

#### ** Make.com **

#### Scenario Diagram

![](images/make/get_pasf_keywords.png)

#### Steps to Recreate the Above Scenario

1. Copy the JSON blueprint below and save it as a file (for example, blueprint.json).
   ```json
   {
       "name": "Get PASF Keywords - Keywords Everywhere API",
       "flow": [
           {
               "id": 3,
               "module": "app#keywords-everywhere-api:getPasfKeywords",
               "version": 1,
               "parameters": {
                   "__IMTCONN__": 3266898
               },
               "mapper": {
                   "num": "5",
                   "keyword": "climate change"
               },
               "metadata": {
                   "designer": {
                       "x": 0,
                       "y": 0
                   },
                   "restore": {
                       "parameters": {
                           "__IMTCONN__": {
                               "data": {
                                   "scoped": "true",
                                   "connection": "app#keywords-everywhere-api-0p871s"
                               },
                               "label": "Keywords Everywhere Production"
                           }
                       }
                   },
                   "parameters": [
                       {
                           "name": "__IMTCONN__",
                           "type": "account:app#keywords-everywhere-api-0p871s",
                           "label": "Connection",
                           "required": true
                       }
                   ],
                   "expect": [
                       {
                           "name": "keyword",
                           "type": "text",
                           "label": "Keyword"
                       },
                       {
                           "name": "num",
                           "type": "number",
                           "label": "Num"
                       },
                       {
                           "name": "keyword",
                           "type": "text",
                           "label": "Keyword"
                       },
                       {
                           "name": "num",
                           "type": "number",
                           "label": "Num"
                       }
                   ]
               }
           }
       ],
       "metadata": {
           "instant": false,
           "version": 1,
           "scenario": {
               "roundtrips": 1,
               "maxErrors": 3,
               "autoCommit": true,
               "autoCommitTriggerLast": true,
               "sequential": false,
               "slots": null,
               "confidential": false,
               "dataloss": false,
               "dlq": false,
               "freshVariables": false
           },
           "designer": {
               "orphans": []
           },
           "zone": "us2.make.com",
           "notes": []
       }
   }
   ```

2. Sign in at make.com using your credentials.

3. From your dashboard, click **"Scenarios"** in the navigation menu.

4. Click the **"Create a new scenario"** button in the top right.

5. In the scenario editor, click the ellipsis (⋯) menu in the bottom left and select **"Import blueprint."**

   ![](../_media/make/import_blueprint.png)

6. When prompted, click "Browse" (or "Choose file"), then select your blueprint.json file.

7. Adjust any required parameters (such as **Keywords Everywhere** credentials) according to the blueprint.

#### Steps to Add the "Get "People Also Search For" Keywords" to a Pre-Existing Scenario

1. In the scenario editor, click the **"+"** or **"Add another module"** button.

2. In the search field that appears, type **"Keywords Everywhere API."**

3. Select the **"Get "People Also Search For" Keywords"** module from the search results.

4. Follow the on-screen prompts to configure the module with your desired parameters or credentials.

5. Confirm to add the module. It will append to your current scenario without overwriting existing modules.


<!-- tabs:end -->

### Request Body Parameters

<table>
    <thead>
    <tr>
        <th>Name</th>
        <th>Description</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>
            <strong>
                <code>keyword</code>
            </strong>
        </td>
        <td>
            <p>
              <strong>Type:</strong>
              <code>string</code>
            </p>
            <div><strong>Examples:</strong></div>
            <ul>
              <li><em>climate change</em></li>
              <li><em>best keyword tool</em></li>
            </ul>
            <p>A UTF-8 encoded keyword to get data for.</p>
        </td>
    </tr>
    <tr>
        <td>
            <strong>
                <code>num</code>
            </strong>
        </td>
        <td>
            <p>
              <strong>Type:</strong>
              <code>integer</code>
            </p>
            <p>
              <strong>Range:</strong>
              1 to 10,000
              <br>       
            </p>
            <div><strong>Examples:</strong></div>
            <ul>
              <li><em>5</em></li>
              <li><em>100</em></li>
              <li><em>10000</em></li>
            </ul>
            <p>Specifies the maximum number of results to return.</p>
        </td>
    </tr>
    </tbody>
</table>


### Response HTTP Status Codes

| Status Code | Description                                                 |
|-------------|-------------------------------------------------------------|
| `200`       | A successful request                                        |
| `400`       | Submitted request data is invalid                           |
| `401`       | API key is missing or is invalid                            |
| `402`       | Account has an invalid subscription or insufficient credits |


### Success Response Fields

<table>
    <thead>
    <tr>
        <th>Name</th>
        <th>Description</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>
            <code>data</code>
        </td>
        <td>
            <strong>Type:</strong> <code>array</code><br>
            The PASF keywords data
        </td>
    </tr>
    <tr>
        <td>
            <code>data.#</code>
        </td>
        <td>
            <strong>Type:</strong> <code>string</code><br>
            <strong>Example:</strong> <em>the guardian wildlife</em><br>
            A PASF keyword result.
        </td>
    </tr>
    <tr>
        <td>
            <code>credits_consumed</code>
        </td>
        <td>
            <strong>Type:</strong> <code>integer</code><br>
            <strong>Example:</strong> <em>10</em><br>
            Amount of credits consumed by the request.
        </td>
    </tr>
    <tr>
        <td>
            <code>time_taken</code>
        </td>
        <td>
            <strong>Type:</strong> <code>float</code><br>
            <strong>Example:</strong> <em>0.01</em><br>
            The time it took to execute the request in seconds.
        </td>
    </tr>
    </tbody>
</table>


### Sample Success Response

```json
{
    "data": [
        "the guardian wildlife",
        "climate change rapport",
        "protection of global climate",
        "climate change simple definition",
        "climate change consequences"
    ],
    "credits_consumed": 10,
    "time_taken": 0.01
}
```


### Sample Unauthorized Response

```json
{
    "message": "401 Missing Or Invalid API Key"
}
```

### Sample Subscription Required Response

```json
{
  "message": "402 Subscription Required",
  "description": "A valid subscription is required to access this resource."
}
```


### Sample Insufficient Credits Response

```json
{
  "message": "402 Insufficient Credits",
  "description": "You do not have sufficient credits to complete this request."
}
```


