{
  "openapi": "3.0.1",
  "info": {
    "title": "Recursive Long-Tail Keyword Fanout Tool",
    "description": "Expand seed keywords through bounded recursive Google autocomplete. Return deduplicated long-tail suggestions, seed and parent discovery paths, depth, English intent labels, locale and timestamps for content research. Bills per saved keyword plus platform usage.",
    "version": "0.1",
    "x-build-id": "ihn8IEZGP9RfOgjoB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~keyword-fanout-longtail/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-keyword-fanout-longtail",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/khadinakbar~keyword-fanout-longtail/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-keyword-fanout-longtail",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/khadinakbar~keyword-fanout-longtail/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-keyword-fanout-longtail",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "seedKeywords"
        ],
        "properties": {
          "seedKeywords": {
            "title": "Seed keywords",
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "description": "Enter 1–20 seed phrases to research. For example, use standing desk or accounting software. Equivalent Unicode, case and whitespace variants are deduplicated. Suggestions remain predictions rather than measured demand.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "maxResults": {
            "title": "Maximum unique keywords",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Save at most this many unique keyword rows across all seeds. Defaults to 200. Each delivered row is one keyword-discovered event. Reaching this cap may leave graph branches unexplored.",
            "default": 200
          },
          "maxRequests": {
            "title": "Maximum source attempts",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Bound the total autocomplete attempts, including failures and interrupted attempts. Defaults to 50 with no automatic retries. Completed source queries are checkpointed. This limits source calls rather than promising an all-in platform cost.",
            "default": 50
          },
          "maxDepth": {
            "title": "Fanout depth",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Explore one to four discovery levels. Level 1 uses each seed and selected research modifiers; later levels query returned phrases. Defaults to 2. A configured depth is a research boundary rather than an exhaustive-topic guarantee.",
            "default": 2
          },
          "branchFactor": {
            "title": "Children per response",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Schedule at most this many unseen suggestions from each response for deeper exploration. Defaults to 3. Source order selects branches. Excluded suggestions never become recursive queries.",
            "default": 3
          },
          "expansions": {
            "title": "First-level expansions",
            "minItems": 1,
            "maxItems": 5,
            "type": "array",
            "description": "Select first-level query patterns: original seed, English question words, comparisons, prepositions or a–z suffixes. Later levels use discovered phrases directly. For other languages choose base and add your own modifiers. Modifier queries become output only when returned by the source.",
            "items": {
              "type": "string",
              "enum": [
                "base",
                "questions",
                "comparisons",
                "prepositions",
                "alphabet"
              ]
            },
            "default": [
              "base",
              "questions",
              "comparisons",
              "prepositions"
            ]
          },
          "language": {
            "title": "Language hint",
            "pattern": "^[a-z]{2,3}(-[a-zA-Z]{2,8})?$",
            "type": "string",
            "description": "Set the autocomplete language hint, such as en, ar or pt-BR. Defaults to en. This does not translate research modifiers. English intent rules return unknown for other languages.",
            "default": "en"
          },
          "country": {
            "title": "Country hint",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Set a two-letter market hint such as US, GB or PK. Defaults to US. Google may also use the request location and current context. A country hint does not guarantee local-origin suggestions.",
            "default": "US"
          },
          "minWords": {
            "title": "Minimum whitespace words",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Keep returned phrases with at least this many whitespace-separated words. Defaults to 3. Use 1 for languages that do not commonly separate words with spaces. isLongTail is a three-word heuristic and does not measure competition.",
            "default": 3
          },
          "customModifiers": {
            "title": "Custom suffix modifiers",
            "maxItems": 20,
            "type": "array",
            "description": "Append up to 20 literal suffixes to each seed at level 1. For example, add for small apartments. Use native-language suffixes for international research. These queries consume the same request cap.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            },
            "default": []
          },
          "excludeKeywords": {
            "title": "Excluded phrase fragments",
            "maxItems": 50,
            "type": "array",
            "description": "Exclude suggestions containing any of these literal case-insensitive fragments. Excluded phrases are neither returned nor recursively queried. Up to 50 fragments are accepted. This uses substring matching rather than regular expressions.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "default": []
          },
          "requestDelayMillis": {
            "title": "Delay between requests",
            "minimum": 100,
            "maximum": 5000,
            "type": "integer",
            "description": "Wait this many milliseconds before each sequential source call. Defaults to 300 and cannot be below 100. Higher delays can reduce source pressure. This does not bypass throttling or guarantee source availability.",
            "default": 300
          },
          "requestTimeoutSecs": {
            "title": "Source timeout",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Limit each source request, including its response body, to this many seconds. Defaults to 10. Failed attempts consume maxRequests. No paid provider fallback is invoked.",
            "default": 10
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}