{
  "openapi": "3.0.1",
  "info": {
    "title": "US Customs Broker & Freight Forwarder Leads Scraper (FMC + CBP)",
    "description": "Scrape every US customs broker (CBP) and FMC-licensed freight forwarder & NVOCC into one dataset: company, address, phone, email, named contacts, surety bond & amount, license number, renewal date + lead score. Filter by type, state & bond. International-trade B2B leads + monitoring.",
    "version": "0.1",
    "x-build-id": "aMMZlqW9Roy6zonkq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~customs-broker-forwarder-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-customs-broker-forwarder-leads",
        "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/scrapesage~customs-broker-forwarder-leads/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-customs-broker-forwarder-leads",
        "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/scrapesage~customs-broker-forwarder-leads/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-customs-broker-forwarder-leads",
        "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": {
          "entityTypes": {
            "title": "Entity types",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only these intermediary types. Allowed values: customsBroker (CBP permitted customs broker), nvocc (FMC Non-Vessel-Operating Common Carrier), freightForwarder (FMC ocean freight forwarder). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "customsBroker",
                "freightForwarder",
                "nvocc",
                "oti"
              ],
              "enumTitles": [
                "CBP-permitted customs broker (customsBroker)",
                "FMC ocean freight forwarder (freightForwarder)",
                "FMC NVOCC (nvocc)",
                "Any OTI (NVOCC or freight forwarder) (oti)"
              ]
            }
          },
          "includeCustomsBrokers": {
            "title": "Include CBP customs brokers",
            "type": "boolean",
            "description": "Include the CBP permitted customs broker list (filer code, phone, e-mail).",
            "default": true
          },
          "includeOTIs": {
            "title": "Include FMC OTIs (forwarders & NVOCCs)",
            "type": "boolean",
            "description": "Include the FMC Ocean Transportation Intermediary list (NVOCCs + ocean freight forwarders, with surety bond, license & named contacts).",
            "default": true
          },
          "states": {
            "title": "States",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only entities in these US states (2-letter codes, e.g. [\"CA\",\"NY\",\"FL\"]). Leave empty for all states (and, unless 'US-based only' is on, foreign-based OTIs too).",
            "items": {
              "type": "string"
            }
          },
          "usBasedOnly": {
            "title": "US-based only",
            "type": "boolean",
            "description": "Drop foreign-based OTIs (many FMC-licensed NVOCCs are based in China, India, Korea, etc.). Customs brokers are always US-based.",
            "default": false
          },
          "nations": {
            "title": "Nations",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only entities based in these countries (case-insensitive, e.g. [\"United States\",\"China\"]). Optional; leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only entities in these cities (case-insensitive exact match). Optional.",
            "items": {
              "type": "string"
            }
          },
          "nameQuery": {
            "title": "Company name contains",
            "type": "string",
            "description": "Keep only entities whose company or DBA name contains this text (case-insensitive). Optional."
          },
          "suretyContains": {
            "title": "Surety / bond company contains",
            "type": "string",
            "description": "Keep only OTIs whose surety (bond) company name contains this text — competitive intelligence for bond & insurance providers (e.g. \"Avalon\", \"Lexon\", \"Roanoke\"). Applies to FMC OTIs only."
          },
          "withPhoneOnly": {
            "title": "With phone only",
            "type": "boolean",
            "description": "Keep only entities that have a phone number.",
            "default": false
          },
          "withEmailOnly": {
            "title": "With e-mail only",
            "type": "boolean",
            "description": "Keep only entities that have an e-mail address (CBP customs brokers carry e-mail; FMC OTIs do not).",
            "default": false
          },
          "withContactNameOnly": {
            "title": "With named contact only",
            "type": "boolean",
            "description": "Keep only entities with a named qualifying-individual contact (FMC OTIs list owners/officers; CBP brokers do not).",
            "default": false
          },
          "bondedOnly": {
            "title": "Bonded only",
            "type": "boolean",
            "description": "Keep only OTIs with an active surety bond on file.",
            "default": false
          },
          "minBondAmount": {
            "title": "Minimum bond amount",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only OTIs whose total surety bond amount is at least this value (USD)."
          },
          "licenseRenewingWithinDays": {
            "title": "License renewing within N days",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only FMC OTIs whose license renews within the next N days — a re-licensing / bond-renewal timing signal. Leave empty to disable."
          },
          "minLeadScore": {
            "title": "Minimum lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only entities with a lead score at or above this value (0-100)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "leadScore",
              "bondAmountHigh",
              "renewalSoon",
              "name",
              "source"
            ],
            "type": "string",
            "description": "Order of the output.",
            "default": "leadScore"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of records to return.",
            "default": 1000
          },
          "deduplicateResults": {
            "title": "Deduplicate",
            "type": "boolean",
            "description": "Drop duplicate entities that share the same type, license/filer code, name and state.",
            "default": true
          },
          "includeRawFields": {
            "title": "Include raw source fields",
            "type": "boolean",
            "description": "Attach the raw source row (all original FMC / CBP columns) under sourceFields on each record.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode (only new / changed)",
            "type": "boolean",
            "description": "Only return entities that are new or whose bond, surety, renewal date or contact changed since the last run with the same monitor key. Ideal on a Schedule to catch newly-licensed forwarders & newly-permitted brokers as fresh leads.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Namespace for monitoring mode so independent monitors don't collide. Use a distinct key per saved configuration.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The FMC and CBP sources are public government data and usually need no proxy, so leave this off for the fastest queries. Enable it only if CBP rate-limits your runs.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}