{
  "openapi": "3.0.1",
  "info": {
    "title": "BLS US Economic Data Search",
    "description": "BLS US Economic Data Search is an Apify actor that connects directly to the official Bureau of Labor Statistics (BLS) Public Data API v2 and retrieves time series data for US economic indicators.",
    "version": "2.0",
    "x-build-id": "XmAVnKQpl6kJm2BHp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~bls-economic-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-bls-economic-data",
        "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/ryanclinton~bls-economic-data/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-bls-economic-data",
        "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/ryanclinton~bls-economic-data/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-bls-economic-data",
        "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": {
          "search": {
            "title": "Search (plain language)",
            "type": "string",
            "description": "Type a concept instead of a series ID — e.g. 'inflation', 'core cpi', 'construction wages', 'food prices', 'unemployment', 'payrolls', 'hours'. Resolves to the matching BLS series. Takes precedence over Bundle / Preset / Custom Series IDs. Leave blank to use one of those instead."
          },
          "bundle": {
            "title": "Dashboard bundle",
            "enum": [
              "inflation-dashboard",
              "labor-dashboard",
              "recession-watch",
              "consumer-prices"
            ],
            "type": "string",
            "description": "One-click macro pack — pulls a curated set of indicators in a single run. Takes precedence over Preset / Custom Series IDs (but not Search)."
          },
          "sectorPack": {
            "title": "Sector pack",
            "enum": [
              "construction",
              "manufacturing",
              "retail",
              "transportation",
              "energy"
            ],
            "type": "string",
            "description": "Industry intelligence in one run — pulls a sector's employment + wages (+ relevant prices) and adds a sector health/risk/storyline block. Takes precedence over Bundle / Preset (but not Search)."
          },
          "preset": {
            "title": "Data Preset",
            "enum": [
              "cpi",
              "unemployment",
              "employment",
              "wages",
              "ppi",
              "custom"
            ],
            "type": "string",
            "description": "Quick preset for common economic indicators. Choose 'Custom' to enter your own series IDs.",
            "default": "cpi"
          },
          "customSeriesIds": {
            "title": "Custom Series IDs",
            "type": "string",
            "description": "Comma-separated BLS series IDs (e.g., 'CUUR0000SA0,LNS14000000'). Only used when preset is 'Custom'. Find series at data.bls.gov"
          },
          "startYear": {
            "title": "Start Year",
            "type": "integer",
            "description": "Start year for data range (v2 API allows max 20-year range without key, 10-year with key)",
            "default": 2020
          },
          "endYear": {
            "title": "End Year",
            "type": "integer",
            "description": "End year for data range",
            "default": 2025
          },
          "apiKey": {
            "title": "BLS API Key (Optional)",
            "type": "string",
            "description": "BLS registration key for higher limits (500 req/day vs 25). Get free at https://data.bls.gov/registrationEngine/"
          },
          "includeAnalysis": {
            "title": "Include analysis",
            "type": "boolean",
            "description": "Emit a per-series analysis record with year-over-year change, trend, and a plain-English interpretation (e.g. 'CPI is up 3.4% YoY — moderate vs the Fed's 2% target') plus a run-level economic summary. On by default.",
            "default": true
          },
          "includeDataPoints": {
            "title": "Include raw data points",
            "enum": [
              "auto",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Emit every raw BLS observation as its own row. 'Auto' = include unless Output profile is 'minimal'; 'Yes' = always include; 'No' = never include (analysis + summary only).",
            "default": "auto"
          },
          "includeCorrelations": {
            "title": "Include correlations (advanced)",
            "type": "boolean",
            "description": "Advanced/research option. When 2+ series are in the run, add a cross-series correlation matrix (Pearson over period-over-period changes) to the summary record — e.g. 'do wages and inflation co-move?'. Off by default.",
            "default": false
          },
          "includeReleaseCalendar": {
            "title": "Include release calendar",
            "type": "boolean",
            "description": "Add a releaseSchedule block per series: frequency, the next reference period that will be published, and the typical release cadence (with a link to the BLS schedule for exact dates). Useful for timing scheduled runs.",
            "default": false
          },
          "outputProfile": {
            "title": "Output profile",
            "enum": [
              "minimal",
              "standard",
              "full"
            ],
            "type": "string",
            "description": "Controls verbosity. 'minimal' = analysis + summary only (drops raw data points and the statistics/trend detail blocks). 'standard' = raw data points + full analysis + summary. 'full' = same as standard with all detail.",
            "default": "standard"
          },
          "watchlistName": {
            "title": "Watchlist name (optional)",
            "type": "string",
            "description": "Name a watchlist to enable cross-run change detection. Each series gets a changeFlag (NEW / RISING / FALLING / STABLE) diffed against the prior run on the same watchlist, with rate and value deltas. Ideal for scheduled monthly runs tracking how inflation, unemployment or wages move release-to-release. Leave blank for a stateless one-off run."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}