{
  "openapi": "3.0.1",
  "info": {
    "title": "Cal eProcure Scraper - California Bids, RFPs & Contracts",
    "description": "Scrape California state bid opportunities from Cal eProcure (caleprocure.ca.gov): event ID, department, deadline, contact name, email and phone, description, pre-bid conference, UNSPSC codes, counties, licences, documents - plus the historical archive and statewide LPA contracts. No login.",
    "version": "0.1",
    "x-build-id": "mX1y744kjN9LYEW1j"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~caleprocure-bids-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-caleprocure-bids-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/scrapersdelight~caleprocure-bids-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-caleprocure-bids-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/scrapersdelight~caleprocure-bids-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-caleprocure-bids-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": {
          "dataType": {
            "title": "Data to scrape",
            "enum": [
              "events",
              "contracts",
              "both"
            ],
            "type": "string",
            "description": "Events = bid opportunities / solicitations (IFB, RFP, RFQ, RFI...). Contracts = State Leveraged Procurement Agreements (CMAS, statewide contracts, master agreements...).",
            "default": "events"
          },
          "keywords": {
            "title": "Search terms",
            "type": "array",
            "description": "Words the portal looks for in the event name (and in the contract description for contracts), one search per term, e.g. \"janitorial\", \"software\", \"IFB\". Empty = no name filter.",
            "items": {
              "type": "string"
            }
          },
          "eventIds": {
            "title": "Event IDs or URLs",
            "type": "array",
            "description": "Look up specific events: an event URL, a \"department-eventID\" pair (2660-11A4457) or a bare event ID (0000040342). A URL or pair opens the event directly; a bare ID is found with the portal's ID search.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Event status",
            "enum": [
              "posted",
              "historical",
              "both"
            ],
            "type": "string",
            "description": "Posted = open opportunities on the portal now. Historical = the closed-event archive (back to 2012), read for the year below.",
            "default": "posted"
          },
          "historicalYear": {
            "title": "Historical year",
            "enum": [
              "current",
              "previous",
              "2026",
              "2025",
              "2024",
              "2023",
              "2022",
              "2021",
              "2020",
              "2019",
              "2018",
              "2017",
              "2016",
              "2015",
              "all"
            ],
            "type": "string",
            "description": "Which year of the archive to read (the year the event was published). \"All years\" is ~57,000 events and the portal needs ~90 s to answer it.",
            "default": "current"
          },
          "departments": {
            "title": "Departments",
            "type": "array",
            "description": "Department codes (2660 = Caltrans, 3540 = CAL FIRE, 7760 = General Services) or names (\"Department of Transportation\", \"Corrections\") - a name matches any department containing it.",
            "items": {
              "type": "string"
            }
          },
          "unspscCodes": {
            "title": "UNSPSC codes",
            "type": "array",
            "description": "8-digit UNSPSC commodity codes the event must carry, e.g. \"72102900\" (grounds maintenance). The portal matches exact codes, one search per code.",
            "items": {
              "type": "string"
            }
          },
          "serviceAreas": {
            "title": "Service area (county)",
            "type": "array",
            "description": "California counties where the work is performed (the portal's Service Area filter). One search per county.",
            "items": {
              "type": "string",
              "enum": [
                "Alameda",
                "Alpine",
                "Amador",
                "Butte",
                "Calaveras",
                "Colusa",
                "Contra Costa",
                "Del Norte",
                "El Dorado",
                "Fresno",
                "Glenn",
                "Humboldt",
                "Imperial",
                "Inyo",
                "Kern",
                "Kings",
                "Lake",
                "Lassen",
                "Los Angeles",
                "Madera",
                "Marin",
                "Mariposa",
                "Mendocino",
                "Merced",
                "Modoc",
                "Mono",
                "Monterey",
                "Napa",
                "Nevada",
                "Orange",
                "Placer",
                "Plumas",
                "Riverside",
                "Sacramento",
                "San Benito",
                "San Bernardino",
                "San Diego",
                "San Francisco",
                "San Joaquin",
                "San Luis Obispo",
                "San Mateo",
                "Santa Barbara",
                "Santa Clara",
                "Santa Cruz",
                "Shasta",
                "Sierra",
                "Siskiyou",
                "Solano",
                "Sonoma",
                "Stanislaus",
                "Sutter",
                "Tehama",
                "Trinity",
                "Tulare",
                "Tuolumne",
                "Ventura",
                "Yolo",
                "Yuba"
              ]
            }
          },
          "licenseClasses": {
            "title": "Contractor licence classes",
            "type": "array",
            "description": "CSLB licence classes the event requires, e.g. \"A\", \"B\", \"C-10\", \"C-36\", \"D-21\" (the portal's Contractor License filter). One search per class.",
            "items": {
              "type": "string"
            }
          },
          "itemDescription": {
            "title": "Item description",
            "type": "string",
            "description": "Words the portal looks for in the events' line-item descriptions, e.g. \"janitorial\". Empty = no item filter."
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Only events published on or after this date (YYYY-MM-DD)."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Only events published on or before this date (YYYY-MM-DD)."
          },
          "deadlineFrom": {
            "title": "Deadline from",
            "type": "string",
            "description": "Only events whose end date (bid deadline) is on or after this date (YYYY-MM-DD)."
          },
          "deadlineTo": {
            "title": "Deadline to",
            "type": "string",
            "description": "Only events whose end date (bid deadline) is on or before this date (YYYY-MM-DD)."
          },
          "solicitationTypes": {
            "title": "Solicitation types",
            "type": "array",
            "description": "Keep only events whose name names one of these types (IFB, RFP...). The portal has no type field - agencies write it in the event name; events that name none are dropped when this is set.",
            "items": {
              "type": "string",
              "enum": [
                "IFB",
                "IFPQ",
                "RFP",
                "RFQ",
                "RFI",
                "RFO",
                "RFA",
                "RFSQ",
                "SFB",
                "ITB",
                "NOIA"
              ],
              "enumTitles": [
                "IFB - Invitation for Bid",
                "IFPQ - Informal Price Quote",
                "RFP - Request for Proposal",
                "RFQ - Request for Quote/Qualifications",
                "RFI - Request for Information",
                "RFO - Request for Offer",
                "RFA - Request for Applications",
                "RFSQ - Request for Statement of Qualifications",
                "SFB - Secondary Formal Bid",
                "ITB - Invitation to Bid",
                "NOIA - Notice of Intent to Award"
              ]
            }
          },
          "excludeKeywords": {
            "title": "Exclude words",
            "type": "array",
            "description": "Drop events whose name (or contracts whose description or supplier) contains any of these words, e.g. \"cancelled\", \"RFI\".",
            "items": {
              "type": "string"
            }
          },
          "closingWithinDays": {
            "title": "Closing within (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep only events whose deadline is between now and this many days ahead, e.g. 14. Empty or 0 = any deadline."
          },
          "contractTypes": {
            "title": "Contract types",
            "type": "array",
            "description": "LPA contract types to read (the portal's Contract Type filter). Empty = every type.",
            "items": {
              "type": "string",
              "enum": [
                "CMAS",
                "Cooperative Agreement",
                "Leases",
                "Master Agreement",
                "Software License Program",
                "State Price Schedule",
                "Statewide Contract"
              ]
            }
          },
          "supplierName": {
            "title": "Supplier name",
            "type": "string",
            "description": "Only contracts whose supplier name contains this text (the portal's Supplier Name filter), e.g. \"DELL\"."
          },
          "acquisitionTypes": {
            "title": "Acquisition types",
            "type": "array",
            "description": "Keep only contracts of these acquisition types. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "IT Goods",
                "IT Services",
                "NON-IT Goods",
                "NON-IT Services"
              ]
            }
          },
          "certificationTypes": {
            "title": "Certification types",
            "type": "array",
            "description": "Keep only contracts whose supplier certification contains one of these, e.g. \"SB\", \"SB (MICRO)\", \"DVBE\", \"SB-PW\".",
            "items": {
              "type": "string"
            }
          },
          "contractStatus": {
            "title": "Contract status",
            "enum": [
              "active",
              "expired",
              "both"
            ],
            "type": "string",
            "description": "Active LPA contracts (5,700 on 2026-10-14), expired ones (the portal's Show Expired Contracts list) or both.",
            "default": "active"
          },
          "includeDetails": {
            "title": "Event details",
            "type": "boolean",
            "description": "Open each event: description, published date, contact phone, pre-bid conference (mandatory, date, time, location), UNSPSC codes, counties, contractor licences, line items, event version. One extra request per event.",
            "default": true
          },
          "includeDocuments": {
            "title": "Documents list",
            "type": "boolean",
            "description": "Also list each event's attachments (file name, description, version) from its event package. One more request per event.",
            "default": false
          },
          "monitorMode": {
            "title": "Only new (monitor mode)",
            "type": "boolean",
            "description": "Deliver only events and contracts not delivered by an earlier run with the same inputs. With Event details on, an event is delivered again when its version goes up (an addendum was posted).",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional name for the monitor memory, so differently-worded inputs can share one list. Empty = derived from your inputs."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows per data type (events, contracts). About 350 events are posted at any time; the archive holds ~57,000 and the LPA list ~5,700. 0 = no cap.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: the portal answers directly. If a route is refused the actor moves on to Apify's residential proxy by itself.",
            "default": {
              "useApifyProxy": false
            }
          },
          "maxConcurrency": {
            "title": "Parallel event pages",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many event pages are read at once when details are on.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}