{
  "openapi": "3.0.1",
  "info": {
    "title": "Craigslist Scraper - Cars, Housing, Jobs & For Sale",
    "description": "Scrape Craigslist in any US city by keyword, category or pasted search URL: for sale, cars & trucks, apartments, jobs, gigs, services. Get price, location, coordinates, photos, posted date, full description and attributes like odometer, year or bedrooms.",
    "version": "0.1",
    "x-build-id": "eR4Zwu07t9SLtgkFU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation-lab~craigslist-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation-lab-craigslist-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/automation-lab~craigslist-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation-lab-craigslist-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/automation-lab~craigslist-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation-lab-craigslist-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": {
          "searchQueries": {
            "title": "Search keywords (optional)",
            "type": "array",
            "description": "Keywords to search on Craigslist. Each keyword runs a separate search. Leave empty to browse all listings in the selected category without keyword filtering.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Craigslist search URLs (optional)",
            "type": "array",
            "description": "Search pages copied from your browser, such as https://sfbay.craigslist.org/search/cta?auto_make_model=honda. Every filter in the URL is kept, so any Craigslist category or filter works. Each URL returns up to Max results.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "Craigslist listing URLs (optional)",
            "type": "array",
            "description": "Direct Craigslist listing URLs. Each returns the full posting (description, photos, attributes). Search page URLs pasted here are searched too. Invalid URLs are skipped; if none is valid the run fails without charge.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City / Region (single-city compatibility)",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9 ,'-]*$",
            "type": "string",
            "description": "Craigslist city used when Cities is empty: the subdomain (newyork, sfbay, losangeles, chicago) or a common name (New York, NYC, San Francisco, Los Angeles, Washington DC).",
            "default": "newyork"
          },
          "cities": {
            "title": "Cities / Regions (optional)",
            "uniqueItems": true,
            "type": "array",
            "description": "Search every keyword/category in each Craigslist city. Use subdomains (boston, sfbay) or common names (New York, Los Angeles). When provided, this overrides City. Duplicates are removed.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9 ,'-]*$"
            },
            "default": []
          },
          "category": {
            "title": "Category",
            "enum": [
              "for_sale",
              "housing",
              "jobs",
              "services",
              "gigs",
              "community",
              "cars_trucks",
              "motorcycles",
              "electronics",
              "computers",
              "cell_phones",
              "furniture",
              "free_stuff",
              "apartments",
              "rooms_shares",
              "sublets",
              "real_estate_for_sale"
            ],
            "type": "string",
            "description": "Craigslist section or popular subcategory to search. For any other subcategory or filter, paste a Craigslist search URL instead.",
            "default": "for_sale"
          },
          "maxResults": {
            "title": "Max results per query per city",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum listings for each keyword/city pair, each city when browsing, and each search URL. One Craigslist search page holds up to about 360 listings. Duplicates across the run are omitted.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include listing details",
            "type": "boolean",
            "description": "Follow each listing URL to get full description, images, posting date, and attributes. Slower but more data.",
            "default": false
          },
          "minPrice": {
            "title": "Minimum price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price filter. Leave empty for no minimum."
          },
          "maxPrice": {
            "title": "Maximum price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price filter. Leave empty for no maximum."
          },
          "postedToday": {
            "title": "Posted today only",
            "type": "boolean",
            "description": "Only listings posted in the last 24 hours. Useful for daily monitoring.",
            "default": false
          },
          "hasImage": {
            "title": "With photos only",
            "type": "boolean",
            "description": "Only listings that have at least one photo.",
            "default": false
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "date",
              "priceasc",
              "pricedsc",
              "rel"
            ],
            "type": "string",
            "description": "Order of search results.",
            "default": "date"
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of retry attempts for failed requests.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}