{
  "openapi": "3.0.1",
  "info": {
    "title": "ImportYeti: Bills of Lading, Suppliers, HS Codes & Trade Lanes",
    "description": "Map any company's US import supply chain: 50 recent bills of lading per target plus supplier league tables, HS-code breakdowns and port-to-port trade lanes. Covers company, supplier, HS-code and country targets in one actor. Resumable runs — never pay twice for the same record.",
    "version": "0.0",
    "x-build-id": "bmQz61HWcVnra76Eh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~importyeti-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-importyeti-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/memo23~importyeti-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-importyeti-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/memo23~importyeti-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-importyeti-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": {
          "companies": {
            "title": "US Importers (consignees)",
            "type": "array",
            "description": "ImportYeti company slugs or URLs for US importers. Examples: `apple`, `walmart`, `/company/costco`, or `https://www.importyeti.com/company/apple`.",
            "items": {
              "type": "string"
            }
          },
          "suppliers": {
            "title": "Foreign Suppliers (shippers)",
            "type": "array",
            "description": "ImportYeti supplier slugs or URLs for foreign shippers. Examples: `foxconn-interconnect-technology` or `https://www.importyeti.com/supplier/foxconn-interconnect-technology`.",
            "items": {
              "type": "string"
            }
          },
          "hsCodes": {
            "title": "HS Codes",
            "type": "array",
            "description": "HS codes: 2-digit chapter (`84`), 4-digit heading (`8471`), or 6-digit subheading (`847130`). Full `/hs-codes/...` URLs also work. Each code yields the most recent shipments plus top importers and suppliers for that code.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Country / Location Directories",
            "type": "array",
            "description": "Country slugs (`china`, `vietnam`, `india`) or full ImportYeti location URLs (e.g. `https://www.importyeti.com/location/supplier/china/country`, state/county/city URLs work too). Bare slugs use the directory type selected below.",
            "items": {
              "type": "string"
            }
          },
          "locationType": {
            "title": "Directory type for bare country slugs",
            "enum": [
              "supplier",
              "company"
            ],
            "type": "string",
            "description": "Whether bare `locations` slugs point at the foreign-supplier directory or the US-importer directory. Ignored for full location URLs, which already contain the type.",
            "default": "supplier"
          },
          "startUrls": {
            "title": "Any ImportYeti URLs (auto-classified)",
            "type": "array",
            "description": "Catch-all list: any importyeti.com company, supplier, HS-code, location, or product-tag (`/tags/...`) URL. Mixed types are fine — each URL is classified automatically.",
            "items": {
              "type": "string"
            }
          },
          "includeBols": {
            "title": "Bill-of-lading rows (up to 50 per target)",
            "type": "boolean",
            "description": "Per-shipment rows: arrival date, house/master BOL numbers, carrier SCAC, counterparty name + full address, weight, quantity, containers, product description, shipping route, and estimated freight cost.",
            "default": true
          },
          "includeSummary": {
            "title": "Summary record (1 per target)",
            "type": "boolean",
            "description": "Target-level rollup: total shipments, first/most-recent shipment dates, HS-code breakdown, top carriers, website, aliases, bill-type split, and UFLPA flag.",
            "default": true
          },
          "includeTopPartners": {
            "title": "Top-partner records (up to 50 per target)",
            "type": "boolean",
            "description": "The Top Suppliers / Top Companies tables: partner name, full address, shipment volumes, YoY growth, HS codes, product descriptions, and their own top counterparties. Great for supplier discovery without fetching every profile.",
            "default": false
          },
          "includeTradeLanes": {
            "title": "Trade-lane records",
            "type": "boolean",
            "description": "Port-to-port lane rollups for the target: exit port, entry port + region, shipment count, weight, TEU, and estimated freight cost per lane.",
            "default": false
          },
          "resumeCursor": {
            "title": "Resume cursor (continue a previous run)",
            "type": "string",
            "description": "Leave empty for a fresh crawl. To continue a run that stopped at `maxItems` (or was aborted after truncation), paste the `resumeCursor` from that run's OUTPUT — the crawl picks up exactly where it stopped and you are not re-charged for records already delivered."
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on total records emitted across all targets and record types. When the cap truncates the run, a `resumeCursor` is written to the run OUTPUT so you can continue later.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of target pages fetched in parallel.",
            "default": 10
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "ImportYeti sits behind Cloudflare and blocks datacenter IPs — residential US proxies are required and enabled by default.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "maxUnblockerRequests": {
            "title": "Max paid-unblocker requests (paying users)",
            "minimum": 0,
            "type": "integer",
            "description": "Per-run cap on paid Cloudflare-bypass (scrape.do) calls used after the free proxy lanes fail. Applies to paying users only. 0 disables the paid fallback.",
            "default": 40
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}