{
  "openapi": "3.0.1",
  "info": {
    "title": "Craigslist Listings Scraper: Every Listing, Counted",
    "description": "Every listing a Craigslist search shows, up to 10,000, checked against Craigslist's own count. $1 per 1,000 listings. Any city, any category, optional descriptions.",
    "version": "0.1",
    "x-build-id": "xueHCcG6cFyJUpXvI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luzivanlt~craigslist-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luzivanlt-craigslist-listings-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/luzivanlt~craigslist-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-luzivanlt-craigslist-listings-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/luzivanlt~craigslist-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-luzivanlt-craigslist-listings-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": "Craigslist cities to search, by the name in their address: \"sfbay\" for sfbay.craigslist.org, \"newyork\", \"london\", \"toronto\". Every Craigslist city in every country works. Each city is searched with the Category, Search words and filters below. Example: sfbay and losangeles.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "enum": [
              "sss",
              "cta",
              "ele",
              "fua",
              "bia",
              "mca",
              "sya",
              "zip",
              "hhh",
              "apa",
              "roo",
              "sub",
              "rea",
              "jjj",
              "ggg",
              "bbb",
              "ccc",
              "eee"
            ],
            "type": "string",
            "description": "Which Craigslist section the cities are searched in. Default: all for sale. Paste a search link under Search links for any other category or a city's sub-area. Example: apa, for apartments for rent.",
            "default": "sss"
          },
          "searchQueries": {
            "title": "Search words",
            "type": "array",
            "description": "Words to search for, one search per word in every city above (e.g. \"road bike\"). Leave empty to get every listing in the category. The words are used with the Cities only; a search link keeps its own words. A listing two searches both find is saved and charged once.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Search links",
            "type": "array",
            "description": "Links to Craigslist searches, copied from your browser, e.g. https://sfbay.craigslist.org/search/sfc/apa?min_price=2000&max_bedrooms=2. Every filter in the link is kept: price, bedrooms, make and model, distance from a postcode, and the rest. A single listing's link is refused.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "minPrice": {
            "title": "Price from",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at least this, in each city's own currency (dollars, pounds, euros...), for the cities above. Leave empty for no lower limit. A search link keeps its own price range. Example: 100."
          },
          "maxPrice": {
            "title": "Price to",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at most this, in each city's own currency (dollars, pounds, euros...), for the cities above. Leave empty for no upper limit. A search link keeps its own price range. Example: 1500."
          },
          "postedToday": {
            "title": "Posted today",
            "type": "boolean",
            "description": "Only listings posted today, for the cities above. Turn it on with Sort by newest to collect each day's new listings in a daily run. A search link keeps its own setting. Default: off.",
            "default": false
          },
          "hasImages": {
            "title": "Has pictures",
            "type": "boolean",
            "description": "Only listings with at least one picture, for the cities above. Listings with no picture are left out of the search and are never charged. A search link keeps its own setting. Default: off.",
            "default": false
          },
          "searchTitlesOnly": {
            "title": "Search titles only",
            "type": "boolean",
            "description": "Match the search words in listing titles only, not in their descriptions, for fewer and closer matches. Used only with Search words; a search link keeps its own setting. Default: off.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "default",
              "newest",
              "oldest",
              "relevance",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "The order Craigslist lists the listings in. With a limit, it decides which listings you get. A search link keeps its own sort. Default: Craigslist's own order. Example: newest, to get the newest listings first.",
            "default": "default"
          },
          "maxListingsPerSearch": {
            "title": "Max listings per search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop each search after this many listings, from 1 to 10,000. Default 1,000. Craigslist lists at most 10,000 listings for one search. Each listing is charged once ($1 per 1,000 listings), so this caps what one search costs: 1,000 listings cost at most $1. Example: 5000.",
            "default": 1000
          },
          "includeDetails": {
            "title": "Include descriptions and attributes",
            "type": "boolean",
            "description": "Also read each listing's own page: the full description, its attributes (make, model, year, odometer, bedrooms, bathrooms, pay, condition and the rest), phone numbers and emails written in the description, its address when given, and when it was created and updated. Slower: one more request per listing. The price per listing stays the same. Default: off.",
            "default": false
          },
          "includeNearby": {
            "title": "Include nearby cities",
            "type": "boolean",
            "description": "Also save the listings Craigslist adds from nearby cities when a search has few of its own (shown on Craigslist under \"more from nearby areas\"). Each such row has is_nearby set to true and is charged like any listing. The count check covers the city's own listings only. Default: off.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}