{
  "openapi": "3.0.1",
  "info": {
    "title": "Freight Surcharge Monitor - FreightSurcharge Watch",
    "description": "Freight surcharge monitor: records the EIA weekly U.S. diesel price (an index, not a carrier surcharge) and watches the fuel surcharge, GRI and tariff pages and PDFs you list. Effective-dated change ledger, PDF fingerprints, weekly digest. Plain HTTP, robots.txt respected.",
    "version": "1.0",
    "x-build-id": "uQZbpcI2mdaPhhtsS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leons0016~freight-surcharge-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leons0016-freight-surcharge-monitor",
        "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/leons0016~freight-surcharge-monitor/runs": {
      "post": {
        "operationId": "runs-sync-leons0016-freight-surcharge-monitor",
        "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/leons0016~freight-surcharge-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-leons0016-freight-surcharge-monitor",
        "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": {
          "includeEiaDiesel": {
            "title": "EIA weekly diesel price",
            "type": "boolean",
            "description": "The U.S. Energy Information Administration publishes the retail on-highway diesel price every week (public domain). Most parcel and truckload fuel surcharge tables are indexed to it, so a change here is the early signal. One source-checked event per run.",
            "default": true
          },
          "eiaAreas": {
            "title": "EIA areas",
            "type": "array",
            "description": "Which EIA areas to follow. Each area whose weekly price changed is one rate-change-detected event per week. Example: US",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "PADD1",
                "PADD1A",
                "PADD1B",
                "PADD1C",
                "PADD2",
                "PADD3",
                "PADD4",
                "PADD5",
                "WEST_COAST_LESS_CA",
                "CALIFORNIA"
              ],
              "enumTitles": [
                "U.S.",
                "East Coast (PADD 1)",
                "New England (PADD 1A)",
                "Central Atlantic (PADD 1B)",
                "Lower Atlantic (PADD 1C)",
                "Midwest (PADD 2)",
                "Gulf Coast (PADD 3)",
                "Rocky Mountain (PADD 4)",
                "West Coast (PADD 5)",
                "West Coast less California",
                "California"
              ]
            },
            "default": [
              "US"
            ]
          },
          "watchUrls": {
            "title": "Documents to watch (pages and PDFs)",
            "type": "array",
            "description": "One address per line, optionally with a label: My carrier fuel table | https://example.com/fuel.html. Pages and PDF tariffs are read with one plain request; the Actor respects robots.txt and does not try to get around a refusal (a refused address is reported as blocked). Only list documents you are entitled to monitor under the site terms. Up to 40 lines. Example: https://example.com/tariffs/fuel-surcharge.pdf",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "rateKeywords": {
            "title": "Freight keywords",
            "type": "array",
            "description": "A line with a percentage or an amount counts as a rate line when it, or one of the three lines above it for table rows, contains one of these words. Add the words your carriers use. Example: GRI",
            "default": [
              "surcharge",
              "fuel",
              "GRI",
              "rate increase",
              "peak season",
              "bunker",
              "BAF",
              "accessorial",
              "fee",
              "tariff",
              "congestion",
              "emergency",
              "detention",
              "demurrage",
              "per container",
              "per TEU",
              "per package",
              "per shipment",
              "per kg"
            ],
            "items": {
              "type": "string"
            }
          },
          "ignorePatterns": {
            "title": "Ignore patterns (regular expressions)",
            "type": "array",
            "description": "Text matching these regular expressions is removed before comparing, for parts of a page that change on every visit (a time stamp, a visitor counter). Example: Last updated:? [\\d/ .-]+",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxChangesPerDocument": {
            "title": "Changes per document and run",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "If more rate lines than this change in one document at once (a restructured tariff), the Actor records one rate-change-detected event for the whole document instead of one per line.",
            "default": 25
          },
          "maxChangesPerRun": {
            "title": "Changes per run",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "The most rate-change-detected events one run records. Changes beyond it are not lost: the next run finds them again.",
            "default": 30
          },
          "digest": {
            "title": "Weekly digest",
            "enum": [
              "off",
              "weekly",
              "every-run"
            ],
            "type": "string",
            "description": "A digest lists every change since the previous one and is billed as one weekly-digest event. An empty digest is never produced or charged.",
            "default": "weekly"
          },
          "ledgerName": {
            "title": "Ledger name",
            "maxLength": 32,
            "type": "string",
            "description": "Name of the ledger kept in your account. Use another name to keep a separate ledger, for example per region. Lower-case letters, digits and hyphens. Example: europe",
            "default": "default"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. The run output is posted here as JSON after each run. Must be https. Example: https://example.com/hooks/freight"
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Optional. A short message with the new changes is posted to this Slack incoming webhook. Example: https://hooks.slack.com/services/T000/B000/XXXX"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}