API Documentation

Access People Also Ask data programmatically with the JustPAA API.

Authentication

All API requests require an API key. You can find your API key in your account settings (Pro or Lifetime plan required).

Include your API key in the request header:

x-api-key: your_api_key_here

Base URL

https://www.justpaa.com/api

Endpoints

GET /alsoask

Retrieve People Also Ask questions for a search query.

Query Parameters

ParameterTypeRequiredDescription
qstringYesThe search query
hlstringYesLanguage code (e.g., "en", "es", "de", "fr")
glstringYesCountry code (e.g., "us", "uk", "de", "fr")
citystringNoCity name for localized results (e.g., "London", "New York")

Example Request

curl "https://www.justpaa.com/api/alsoask?q=what%20is%20seo&hl=en&gl=us" \
  -H "x-api-key: sk_your_api_key_here"

Example Response

{
  "cached": false,
  "searchesLeft": 149,
  "payAsYouGoCreditsLeft": 0,
  "renewalDate": "2026-01-15",
  "result": {
    "question": "what is seo",
    "related": [
      "What is seo and how does it work",
      "What is SEO in digital marketing",
      "Types of SEO"
    ],
    "children": [
      {
        "question": "What is SEO and how does it work?",
        "answer": "SEO stands for Search Engine Optimization...",
        "url": "https://example.com/seo-guide",
        "title": "Complete SEO Guide",
        "children": [
          {
            "question": "What are the 4 types of SEO?",
            "answer": "The four types of SEO are on-page, off-page, technical, and local SEO.",
            "url": "https://example.com/seo-types",
            "title": "Understanding SEO Types"
          }
        ]
      }
    ]
  }
}

Response Fields

FieldTypeDescription
cachedbooleanWhether the result was served from cache
searchesLeftnumberRemaining searches in your current billing period
renewalDatestringDate when your search quota resets
result.questionstringThe original search query
result.relatedarrayRelated search suggestions
result.childrenarrayArray of PAA questions with nested sub-questions

Question Object

FieldTypeDescription
questionstringThe PAA question
answerstringThe featured snippet answer (if available)
urlstringSource URL for the answer
titlestringTitle of the source page
childrenarrayNested sub-questions (recursive structure)

Code Examples

Python

import requests

API_KEY = "sk_your_api_key_here"
BASE_URL = "https://www.justpaa.com/api"

def get_paa_questions(query, language="en", country="us"):
    response = requests.get(
        f"{BASE_URL}/alsoask",
        headers={"x-api-key": API_KEY},
        params={"q": query, "hl": language, "gl": country}
    )
    return response.json()

# Example usage
result = get_paa_questions("what is seo")
for child in result["result"]["children"]:
    print(f"Q: {child['question']}")
    print(f"A: {child['answer'][:100]}...")
    print()

JavaScript (Node.js)

const API_KEY = "sk_your_api_key_here";
const BASE_URL = "https://www.justpaa.com/api";

async function getPAAQuestions(query, language = "en", country = "us") {
  const params = new URLSearchParams({ q: query, hl: language, gl: country });
  const response = await fetch(`${BASE_URL}/alsoask?${params}`, {
    headers: { "x-api-key": API_KEY }
  });
  return response.json();
}

// Example usage
getPAAQuestions("what is seo").then(result => {
  result.result.children.forEach(child => {
    console.log(`Q: ${child.question}`);
    console.log(`A: ${child.answer?.substring(0, 100)}...`);
    console.log();
  });
});

PHP

<?php
$apiKey = "sk_your_api_key_here";
$baseUrl = "https://www.justpaa.com/api";

function getPAAQuestions($query, $language = "en", $country = "us") {
    global $apiKey, $baseUrl;
    
    $params = http_build_query([
        "q" => $query,
        "hl" => $language,
        "gl" => $country
    ]);
    
    $ch = curl_init("$baseUrl/alsoask?$params");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-api-key: $apiKey"]);
    
    $response = curl_exec($ch);
    curl_close($ch);
    
    return json_decode($response, true);
}

// Example usage
$result = getPAAQuestions("what is seo");
foreach ($result["result"]["children"] as $child) {
    echo "Q: " . $child["question"] . "\n";
    echo "A: " . substr($child["answer"], 0, 100) . "...\n\n";
}
?>

Error Responses

Status CodeErrorDescription
401Invalid tokenThe API key is missing or invalid
403Invalid API KeyThe API key doesn't exist or is inactive
429Rate limit exceededYou've exceeded your monthly search quota
500Internal server errorSomething went wrong on our end

Need Help?

If you have questions about the API or need assistance, please contact us.