{
  "openapi": "3.0.1",
  "info": {
    "title": "Fyple Scraper - Local Business Directory",
    "description": "Scrape Fyple, a local business directory covering the US, UK, Canada, South Africa, New Zealand, Australia, and Ireland. Browse by category, region and city, run a keyword search, or fetch full business profiles by URL. Get names, addresses, phone numbers, emails, websites, ratings, and more.",
    "version": "1.0",
    "x-build-id": "s917oAVwPA1dHcG6L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~fyple-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-fyple-scraper",
        "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/crawlerbros~fyple-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-fyple-scraper",
        "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/crawlerbros~fyple-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-fyple-scraper",
        "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": [
          "mode",
          "country"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "keyword",
              "byUrl"
            ],
            "type": "string",
            "description": "What to fetch: browse a category (optionally narrowed to a region/city), run a free-text keyword search, or fetch business profiles from direct Fyple URLs.",
            "default": "search"
          },
          "country": {
            "title": "Country",
            "enum": [
              "us",
              "gb",
              "ca",
              "za",
              "nz",
              "au",
              "ie"
            ],
            "type": "string",
            "description": "Which Fyple country edition to scrape. Each country is a separate directory of local businesses (mode=search, mode=keyword).",
            "default": "us"
          },
          "category": {
            "title": "Category",
            "enum": [
              "custom",
              "food-drink/restaurant",
              "food-drink/cafe",
              "food-drink/bar-and-pub",
              "food-drink/catering",
              "food-drink/pizza-delivery",
              "automotive/auto-repair-service",
              "automotive/auto-dealer",
              "automotive/auto-rental",
              "automotive/auto-insurance",
              "automotive/tire",
              "health-beauty/dentist",
              "health-beauty/doctor-and-clinic",
              "health-beauty/beauty-salon",
              "health-beauty/alternative-medicine",
              "health-beauty/optician",
              "legal-financial/lawyer",
              "legal-financial/accounting",
              "legal-financial/banking",
              "legal-financial/financial-service",
              "legal-financial/legal-service",
              "home-garden/cleaning-service",
              "home-garden/appliance",
              "home-garden/carpet-store",
              "home-garden/fence-supply-store",
              "home-garden/home-remodeling-repair",
              "construction-contractor/builder",
              "construction-contractor/architectural-service",
              "construction-contractor/electrician",
              "construction-contractor/plumber",
              "computer-electronics/computer-repair-service",
              "computer-electronics/computer-store",
              "computer-electronics/cell-phone-store",
              "real-estate/estate-agent",
              "real-estate/property-management",
              "shopping-service/clothing-and-accessory",
              "shopping-service/book",
              "shopping-service/antique-collectible",
              "business-service/consultant",
              "business-service/courier-service",
              "education/school",
              "education/higher-education",
              "sport-recreation/fitness",
              "sport-recreation/massage",
              "travel-accommodation/accommodation",
              "travel-accommodation/resort",
              "travel-accommodation/tour-operator",
              "organisations-government/charity",
              "organisations-government/church-mosque-and-synagogue",
              "pet-animal/animal-shelter",
              "pet-animal/animal-healthcare",
              "arts-entertainment/entertainment",
              "arts-entertainment/event-planning",
              "industry-agriculture/farmer-market"
            ],
            "type": "string",
            "description": "Business category to browse. Pick a common category, or choose 'Custom category' and type your own path below (mode=search).",
            "default": "food-drink/restaurant"
          },
          "customCategory": {
            "title": "Custom category path (overrides selection above)",
            "type": "string",
            "description": "Free-text category path in the form 'parent-group/subcategory', e.g. 'legal-financial/notary' or 'shopping-service/jewelry-store' (mode=search). Takes priority over 'Category' when set. Fyple has 500+ subcategories; browse https://www.fyple.com/categories/ to find exact slugs."
          },
          "region": {
            "title": "Region / state / province",
            "type": "string",
            "description": "State, province, or region to narrow the category browse to, e.g. 'ca' for California or 'on' for Ontario. Optional -- omit to browse the category nationwide (mode=search)."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City to narrow the category browse to, e.g. 'Los Angeles'. Requires 'Region' to also be set (mode=search)."
          },
          "keyword": {
            "title": "Keyword (what)",
            "type": "string",
            "description": "Business name or type to search for, e.g. 'Pizza' or 'Plumber' (mode=keyword, required)."
          },
          "location": {
            "title": "Location (where)",
            "type": "string",
            "description": "City, state, or ZIP code to search near, e.g. 'New York' or 'Los Angeles, CA' (mode=keyword)."
          },
          "businessUrls": {
            "title": "Business profile URLs (mode=byUrl)",
            "type": "array",
            "description": "Direct Fyple business profile URLs to fetch, e.g. https://www.fyple.com/company/some-business-abc123/. Use the 'sourceUrl' field from search results.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "Fyple business profile URL."
                }
              }
            },
            "default": []
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Only return businesses rated at least this many stars, e.g. 4 for 4.0+. 0 means no minimum. Businesses with no rating are excluded once this is set above 0.",
            "default": 0
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on the number of business records to return.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}