{
  "openapi": "3.0.1",
  "info": {
    "title": "Craigslist Deal Scraper — Under-$X Multi-City",
    "description": "Craigslist under-$X multi-city deals: maxPrice/minPrice packs, dealScore, alerts. Pay per listing. Lawful use only.",
    "version": "1.0",
    "x-build-id": "jimF29Frl8x2ZiflU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/intelscrape~craigslist-deal-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-intelscrape-craigslist-deal-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/intelscrape~craigslist-deal-scraper/runs": {
      "post": {
        "operationId": "runs-sync-intelscrape-craigslist-deal-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/intelscrape~craigslist-deal-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-intelscrape-craigslist-deal-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",
        "properties": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Craigslist search keywords (e.g. iPhone, sofa, mountain bike). Optional when startUrls are provided."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste Craigslist search, category, or listing URLs. Search/category URLs are scraped as result pages (site parsed from hostname). Listing URLs (/d/ or …/NNNN.html) go straight to detail. When provided with empty cities[], skips cities fan-out.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities / site slugs",
            "type": "array",
            "description": "Craigslist site slugs to fan out across (e.g. austin, sfbay, chicago). Alias of sites[]. Merged with startUrls search pages when both set.",
            "items": {
              "type": "string"
            }
          },
          "sites": {
            "title": "Sites (alias of cities)",
            "type": "array",
            "description": "Optional alias for cities[]. Same Craigslist site slugs.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category path",
            "type": "string",
            "description": "Craigslist search path segment (sss = all for sale, aaa = all, cta = cars+trucks, etc.).",
            "default": "sss"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum listings to push across all cities.",
            "default": 50
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out listings cheaper than this (0 = no min). Ignored when freeOnly.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out listings more expensive than this (0 = no max). Ignored when freeOnly.",
            "default": 0
          },
          "freeOnly": {
            "title": "Free listings only",
            "type": "boolean",
            "description": "Only free Craigslist posts (max_price=0 on search + client filter price==0 / title contains free).",
            "default": false
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "any",
              "new",
              "like-new",
              "excellent",
              "good",
              "fair",
              "salvage"
            ],
            "type": "string",
            "description": "Craigslist condition filter (for-sale). Maps to CL condition=10..60. Skip when any/empty.",
            "default": "any"
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "date",
              "rel",
              "priceasc",
              "pricedsc"
            ],
            "type": "string",
            "description": "Craigslist sort: date (newest), rel (relevance), priceasc, pricedsc.",
            "default": "date"
          },
          "soldBy": {
            "title": "Sold by",
            "enum": [
              "",
              "owner",
              "dealer"
            ],
            "type": "string",
            "description": "Craigslist purveyor filter: owner or dealer. Empty = any.",
            "default": ""
          },
          "deliveryAvailable": {
            "title": "Delivery available",
            "type": "boolean",
            "description": "Craigslist delivery_available=1 — only posts that offer delivery.",
            "default": false
          },
          "minDealScore": {
            "title": "Minimum dealScore",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only push listings with dealScore >= this (0–100).",
            "default": 0
          },
          "postedTodayOnly": {
            "title": "Posted today only",
            "type": "boolean",
            "description": "Keep only listings marked as posted today (best-effort from CL date labels).",
            "default": false
          },
          "newOnly": {
            "title": "New listings only",
            "type": "boolean",
            "description": "Skip IDs already stored in KeyValueStore (craigslist-deal-seen-ids). Schedule-friendly.",
            "default": false
          },
          "onlyWithPhotos": {
            "title": "Only listings with photos",
            "type": "boolean",
            "description": "Craigslist hasPic=1 — skip text-only posts (memo23 onlyWithPhotos).",
            "default": false
          },
          "hideDuplicates": {
            "title": "Hide near-duplicates",
            "type": "boolean",
            "description": "Craigslist bundleDuplicates=1 — collapse reposts of the same item.",
            "default": false
          },
          "includeDetails": {
            "title": "Include listing details",
            "type": "boolean",
            "description": "Open each post for description, emails[], phoneNumbers[], imageUrls[], lat/lon. No captcha unlock. Slower; leave OFF for fast search-grid runs.",
            "default": false
          },
          "postalCode": {
            "title": "Postal / ZIP code",
            "type": "string",
            "description": "Search around this ZIP (pair with searchDistance miles)."
          },
          "searchDistance": {
            "title": "Search distance (miles)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Radius around postalCode. 0 = Craigslist default.",
            "default": 0
          },
          "maxAgeDays": {
            "title": "Max age (days)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Drop listings older than this many days when daysSinceListed is known (0 = no age cap).",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify proxy (useApifyProxy). Improves reliability; never a captcha bypass."
          },
          "maxNavigationRetries": {
            "title": "Navigation retries",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Bounded retries per page load (1–5).",
            "default": 3
          },
          "discordWebhook": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Optional Discord incoming webhook for new deal alerts."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional HTTP POST of each new listing JSON."
          },
          "demoMode": {
            "title": "Demo mode",
            "type": "boolean",
            "description": "Load bundled demo listings (no live scrape). Use when Craigslist blocks or for Store try-outs.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}