{
  "openapi": "3.0.1",
  "info": {
    "title": "Expertise.com Scraper - Local Business & Professional Leads",
    "description": "Scrape Expertise.com 'best in city' lists: financial advisors, CPAs, lawyers, insurance agents, marketing/SEO/web agencies, contractors & more — with website, phone, address, rating, Google/Yelp/Facebook review profiles, license & a lead score. Monitoring mode. No login, no API key, no browser.",
    "version": "0.1",
    "x-build-id": "2NpAw6I6Amk8eZhPY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~expertise-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-expertise-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/scrapesage~expertise-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-expertise-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/scrapesage~expertise-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-expertise-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"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "search",
              "startUrls"
            ],
            "type": "string",
            "description": "Search builds 'best in city' lists from categories × locations. Start URLs scrapes specific Expertise.com listing or profile URLs you paste in.",
            "default": "search"
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Which provider type(s) to pull, one per row, as Expertise.com category slugs. Finance: financial-advisors, accountant-cpa, bookkeepers, tax-services-cpa, private-wealth-advisor, mortgage-refinance, credit-repair, collection-agency. Legal: personal-injury-lawyers, criminal-lawyers, divorce-lawyers, business-lawyers, estate-planning-lawyers, immigration-lawyers, bankruptcy-lawyers, dui-lawyers … (35 practice areas). Insurance: car-insurance, homeowners-insurance, life-insurance, health-insurance, pet-insurance, renters-insurance. Business: digital-marketing-agencies, seo-agencies, web-design, software-development, property-management, employment-staffing-agencies, business-consultants, advertising-agencies, public-relations-firms … (33 types). Home improvement: plumbing, electricians, roofing, hvac, remodeling, landscaping, real-estate-agents, solar-company … (59 trades). Friendly names like \"financial advisor\", \"SEO agency\" or \"plumber\" also work. (Search mode.)",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "US cities to search, as \"City, ST\" — e.g. \"Houston, TX\", \"Chicago, IL\", \"Los Angeles, California\". Expertise.com publishes one curated list per city, so a city is required. One per row. (Search mode.)",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (Expertise.com listing or profile URLs)",
            "type": "array",
            "description": "Expertise.com URLs to scrape directly: listing URLs (https://www.expertise.com/<group>/<category>/<state>/<city>, e.g. …/finance/financial-advisors/texas/houston) or profile URLs (…/profile/<slug>). Auto-detected and routed. One per row. (Start URLs mode.)",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results (providers)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Cap on provider records across the whole run. Each 'best in city' page lists ~10–30 curated providers, so breadth comes from adding more categories × cities.",
            "default": 100
          },
          "enrichContactEmails": {
            "title": "Enrich contacts from the business website",
            "type": "boolean",
            "description": "Opt-in lead enrichment: crawl each provider's own website (home + contact/about) for direct emails, phones and social links. Only runs for providers that list a website. Adds the contact email most Google-Maps lead tools miss.",
            "default": false
          },
          "excludeAds": {
            "title": "Exclude sponsored / affiliate rows",
            "type": "boolean",
            "description": "Skip the occasional lead-marketplace / affiliate row (no real address, hidden phone, tracking-tagged website) so you only get genuine local businesses.",
            "default": true
          },
          "enhancedListingsOnly": {
            "title": "Only enhanced (claimed) listings",
            "type": "boolean",
            "description": "Output only businesses on an enhanced (paying / claimed) listing — these are the most contact-ready, marketing-aware leads.",
            "default": false
          },
          "licensedOnly": {
            "title": "Only providers with a license number",
            "type": "boolean",
            "description": "Output only providers that publish a professional license number (useful for regulated trades and legal/financial categories).",
            "default": false
          },
          "withWebsiteOnly": {
            "title": "Only providers with a website",
            "type": "boolean",
            "description": "Output only providers that have a business website.",
            "default": false
          },
          "withPhoneOnly": {
            "title": "Only providers with a phone",
            "type": "boolean",
            "description": "Output only providers that have a phone number.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Only output providers with at least this aggregate star rating (0–5). 0 = no rating filter.",
            "default": 0
          },
          "deduplicateProviders": {
            "title": "Deduplicate providers",
            "type": "boolean",
            "description": "Skip a provider already emitted in this run (by Expertise.com id) — useful when several searches overlap.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode — only new providers",
            "type": "boolean",
            "description": "Remember which providers were already returned and emit ONLY businesses not seen in previous runs. Pairs with Apify Schedules to track new additions to a city's 'best of' list over time (it complements the scheduler, it does not replace it).",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store that holds the 'already seen' provider ids for monitoring mode. Use a different name per tracked search to keep their histories separate.",
            "default": "expertise-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Maximum parallel requests for website-enrichment fetches. Lower it for very large runs if you see transient blocks; raise it for speed.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Expertise.com works through the default Apify datacenter proxy (blocked requests retry automatically on a fresh IP). Switch to Residential for the most consistent results on very large runs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "urlsFromFile": {
            "title": "Import URLs from a file",
            "type": "string",
            "description": "Paste a list of URLs (one per line), OR one link to a .txt/.csv file, Google Sheet or Google Drive file containing them. Lets you import many Start URLs at once instead of typing each. Google Sheet/Drive share links are handled automatically."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}