{
  "openapi": "3.0.1",
  "info": {
    "title": "Craigslist Scraper",
    "description": "Scrape Craigslist listings from many cities in one run: title, numeric price, place, coordinates, posted date, photos, attributes and full description. Housing, for sale, cars, jobs, gigs, services. Export JSON/CSV/Excel, use the API, schedule it or plug it into Make, n8n or Zapier.",
    "version": "0.1",
    "x-build-id": "DMPcppIMgp3cLFcuk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lergassy~craigslist-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lergassy-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/lergassy~craigslist-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lergassy-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/lergassy~craigslist-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lergassy-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": {
          "cities": {
            "title": "📍 Cities",
            "type": "array",
            "description": "Give this or <code>startUrls</code>. One Craigslist city per line — the subdomain from the address bar (<code>sfbay</code>, <code>newyork</code>, <code>london</code>) or its name (<code>los angeles</code>, <code>San Francisco</code>). Whole regions too: a US state or Canadian province (<code>California</code>, <code>state:TX</code>), a country (<code>United Kingdom</code>, <code>country:DE</code>) or <code>all</code>. Every city is searched in one run.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "🗂️ Category",
            "enum": [
              "apa",
              "hhh",
              "roo",
              "sub",
              "rea",
              "sss",
              "cta",
              "mca",
              "rva",
              "boo",
              "fua",
              "ela",
              "mob",
              "bia",
              "zip",
              "jjj",
              "ggg",
              "bbb",
              "ccc",
              "eee"
            ],
            "type": "string",
            "description": "Which Craigslist section to search in every city above (empty = all for sale). Housing, for sale, cars, jobs, gigs, services, community and events. For any other section type its code in <b>Other category code</b> below."
          },
          "searchQuery": {
            "title": "🔍 Search keywords",
            "type": "string",
            "description": "Optional. Words to look for, exactly as in Craigslist's search box (<code>toyota tacoma</code>, <code>\"walk-in closet\"</code>, <code>iphone -broken</code>). Leave empty to get everything in the category."
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only listings priced at least this much, in the city's own currency. Listings without a price are left out when a price limit is set."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only listings priced at most this much, in the city's own currency. Listings without a price are left out when a price limit is set."
          },
          "maxItems": {
            "title": "💯 Max listings in total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many listings across all cities. With several cities the limit is shared fairly: each city gets an equal part, and what a small city cannot fill goes to the others.",
            "default": 1000
          },
          "includeDetails": {
            "title": "Include full details (free)",
            "type": "boolean",
            "description": "Open every listing for its full description text, all photos, attributes (bedrooms, bathrooms, housing type, pets, parking, odometer, condition, pay…), street address and updated date. Included in the price. Switch off for the fastest list of titles, prices and places.",
            "default": true
          },
          "postedToday": {
            "title": "Posted today only",
            "type": "boolean",
            "description": "Only listings posted today (Craigslist's own \"posted today\" filter).",
            "default": false
          },
          "hasImages": {
            "title": "With photos only",
            "type": "boolean",
            "description": "Only listings that have at least one photo (Craigslist's \"has image\" filter).",
            "default": false
          },
          "searchTitlesOnly": {
            "title": "Search titles only",
            "type": "boolean",
            "description": "Match the keywords in listing titles only, not in the description. Ignored when there are no keywords.",
            "default": false
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "newest",
              "oldest",
              "priceasc",
              "pricedsc",
              "relevance"
            ],
            "type": "string",
            "description": "Order in which Craigslist returns listings — matters when you take fewer than all of them.",
            "default": "newest"
          },
          "startUrls": {
            "title": "🔗 Craigslist URLs",
            "type": "array",
            "description": "Give this or <code>cities</code>. Paste Craigslist search pages exactly as you filtered them in the browser — <code>https://sfbay.craigslist.org/search/apa?min_bedrooms=2&max_price=4000</code> — all filters in the address are kept. Single listing pages work too. Keywords and price fields above do not change these URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItemsPerCity": {
            "title": "Max listings per city",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap for each city / search. Leave empty to let every city use its fair share of the total. Craigslist shows at most 10,000 listings per search."
          },
          "categoryCode": {
            "title": "Other category code",
            "pattern": "^[A-Za-z0-9-]{0,40}$",
            "type": "string",
            "description": "Any other Craigslist section by its code — the letters after /search/ in the address: <code>sof</code> software jobs, <code>cto</code> cars by owner, <code>tia</code> tickets, <code>hsh</code> household items. Overrides <b>Category</b>."
          },
          "dedupeCrossPosts": {
            "title": "Remove duplicates and cross-posts",
            "type": "boolean",
            "description": "Skip the same ad posted again, or posted in several nearby cities (same title, price and photo). You are charged once per unique listing.",
            "default": true
          },
          "includeNearbyAreas": {
            "title": "Include results from nearby areas",
            "type": "boolean",
            "description": "When a city has few results, Craigslist adds listings from neighbouring areas. Off: you get only listings of the cities you asked for.",
            "default": false
          },
          "onlyNewRowsStore": {
            "title": "🔁 Only new listings — memory name",
            "pattern": "^[A-Za-z0-9-]{0,63}$",
            "type": "string",
            "description": "Give this run a name — <code>my-craigslist-watch</code> — and the Actor remembers every listing it delivered under that name. Every later run with the same name writes and charges <b>only listings you have not received before</b>. Schedule the Actor hourly or daily to get a feed of new posts. Leave empty to get everything found, every time."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed: the Actor reaches Craigslist directly and switches to a residential proxy by itself only for requests that get blocked. Set your own proxy only if you must, then it is used for every request."
          },
          "includeRunSummary": {
            "title": "🧾 Add a free summary row at the end of the run",
            "type": "boolean",
            "description": "One extra free row at the end with the run's totals: rows delivered, free rows, what was charged and how much in US dollars. It carries type \"notice\", so a filter on the data rows skips it. Switch off if your pipeline cannot tolerate an extra row.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}