{
  "openapi": "3.0.1",
  "info": {
    "title": "Craigslist Scraper - (Jobs & Listings etc.)",
    "description": "Scrape Craigslist classifieds across 700+ cities and all 8 categories (jobs, housing, for-sale, services, gigs, community, resumes, events). Typed outputs, multi-city fanout, repost dedup, optional contact extraction. MCP-ready. Pay-per-event.",
    "version": "0.3",
    "x-build-id": "aDpKH0Ex4XupkgE4h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~craigslist-all-in-one-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-craigslist-all-in-one-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/khadinakbar~craigslist-all-in-one-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-craigslist-all-in-one-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/khadinakbar~craigslist-all-in-one-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-craigslist-all-in-one-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": {
          "city": {
            "title": "City (subdomain)",
            "type": "string",
            "description": "Craigslist city subdomain to scrape (e.g. 'newyork', 'sfbay', 'losangeles', 'london'). Find the value in any Craigslist URL: the part before '.craigslist.org'. Use the preset 'topUSMetros' to fan out across the top 25 US metros, or 'topGlobalMetros' for the top 50 worldwide. Ignored when 'cities' or 'startUrls' is set."
          },
          "cities": {
            "title": "Cities (multiple)",
            "type": "array",
            "description": "List of Craigslist city subdomains to scrape in one run (e.g. ['newyork','sfbay','losangeles']). Each subdomain produces an independent search. Leave empty to use the single 'city' field. NOT free-text city names — use the subdomain values.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "enum": [
              "forsale",
              "jobs",
              "housing",
              "services",
              "gigs",
              "community",
              "resumes",
              "events",
              "all"
            ],
            "type": "string",
            "description": "Top-level Craigslist category. 'forsale' covers all goods (cars+trucks, electronics, furniture, etc.); pick a 'subcategory' below for narrower results. Defaults to 'forsale'. Use 'all' to scrape every category (expensive — leaves volume control to 'maxResults').",
            "default": "forsale"
          },
          "subcategory": {
            "title": "Subcategory",
            "type": "string",
            "description": "Craigslist subcategory code that narrows the category (e.g. 'cta' for cars+trucks-all, 'apa' for apartments/housing, 'sof' for software jobs, 'mis' for general for-sale). Leave blank to scrape the whole category. Full list of codes in the README.",
            "default": ""
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text search run inside the chosen category (e.g. 'macbook pro', 'studio apartment', 'remote python'). Leave empty to browse the latest postings in the category. Supports Craigslist's own search operators.",
            "default": ""
          },
          "startUrls": {
            "title": "Start URLs (advanced)",
            "type": "array",
            "description": "Direct Craigslist search-result or post URLs. Overrides 'city', 'category', 'searchQuery' when set. Useful for re-running an exact saved-search URL. Each URL must be a Craigslist URL (host ends in '.craigslist.org').",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max results per city",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Maximum number of listings to return per city. Craigslist paginates in 120-item pages; the actor pages until this limit or the search runs out. Hard ceiling 3000 per city (Craigslist's own browseable depth).",
            "default": 50
          },
          "includeDetails": {
            "title": "Fetch full post details",
            "type": "boolean",
            "description": "When true, opens each individual listing for full description, complete image gallery, post attributes, and reply URL — charged at the 'listing-detailed' rate ($0.008). When false, returns only the cheaper search-result card data (title, price, location, posted date, primary image, URL) charged at 'listing-scraped' ($0.005). Default false.",
            "default": false
          },
          "extractContacts": {
            "title": "Extract public contact info",
            "type": "boolean",
            "description": "When true, extracts emails and phone numbers that appear in the public post body or visible reply URL. Requires includeDetails=true. Does NOT bypass Craigslist's anonymized reply form or log in. Only public, in-body data. Default false.",
            "default": false
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum listing price filter, in the local currency of each city's marketplace (USD for US cities, GBP for London, etc.). Applies to categories that have a price column (for-sale, housing, services). Leave blank for no minimum.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum listing price filter. Same currency rule as minPrice. Default 0 means no maximum. Use to skip out-of-budget cars or rentals.",
            "default": 0
          },
          "hasPic": {
            "title": "Only listings with images",
            "type": "boolean",
            "description": "When true, only returns listings that include at least one image. Useful for resellers and real-estate filters. Default false.",
            "default": false
          },
          "ownerOnly": {
            "title": "Owner posts only (skip dealers)",
            "type": "boolean",
            "description": "When true, only returns listings posted by owners — excludes dealer/agency/recruiter posts. Applies to for-sale (cars+trucks especially), housing, and jobs categories. Default false.",
            "default": false
          },
          "maxAgeDays": {
            "title": "Max age (days)",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Skip listings older than this many days. Craigslist sorts newest-first so the crawler stops paginating once a page contains only older posts. Default 0 means no age filter.",
            "default": 0
          },
          "dedupAcrossCities": {
            "title": "Deduplicate reposts across cities",
            "type": "boolean",
            "description": "When true (default), keeps a per-run SHA-256 fingerprint of (normalised title + price + first image hostname) and drops any second occurrence — useful when scraping multiple metros where dealers post the same listing in several cities. Set false to keep every raw row.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy settings. Residential proxies are strongly recommended at any non-trivial scale because Craigslist rate-limits datacenter IPs aggressively. Leave default for residential + country-auto.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}