{
  "openapi": "3.0.1",
  "info": {
    "title": "Import Export Data API - ImportGenius Bill of Lading Shipments",
    "description": "Search bill of lading and customs shipment records from the ImportGenius Trade Data API: importers, exporters, shippers, consignees, products, HS codes, ports and vessels across 25+ countries. Filter by field, modifier, US zip code and date range, or count matches. Bring your own key.",
    "version": "0.1",
    "x-build-id": "IvYDN9hqvikZGQQqV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~importgenius-bill-of-lading-shipments-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-importgenius-bill-of-lading-shipments-api",
        "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/nabeelbaghoor~importgenius-bill-of-lading-shipments-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-importgenius-bill-of-lading-shipments-api",
        "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/nabeelbaghoor~importgenius-bill-of-lading-shipments-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-importgenius-bill-of-lading-shipments-api",
        "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": {
          "queryType": {
            "title": "Search by",
            "enum": [
              "keyword",
              "zipCode",
              "zipRange"
            ],
            "type": "string",
            "description": "Field search matches a search field (product, importer, shipper, trademark and the other fields on your plan) with a modifier and a term. The two zip code searches find US shipments by the importer's zip code or a zip code range, and need the country set to us.",
            "default": "keyword"
          },
          "searchField": {
            "title": "Search field",
            "type": "string",
            "description": "Field search only. The category of the term, in lower case. Documented examples: product (product description), consname (US importer or consignee name), shipname (shipper name) and trademark. ImportGenius gives the complete field list for your plan during integration.",
            "default": "product"
          },
          "modifier": {
            "title": "Modifier",
            "enum": [
              "contains",
              "exactly",
              "any",
              "starts_with",
              "ends_with"
            ],
            "type": "string",
            "description": "Field search only. How the term is matched against the field.",
            "default": "contains"
          },
          "searchTerm": {
            "title": "Search term",
            "type": "string",
            "description": "Field search only. The keyword, company name or brand to search for, such as walnuts, a supplier name or a trademark. Several words are fine; a slash is not."
          },
          "zipCode": {
            "title": "US zip code",
            "type": "string",
            "description": "US zip code search only. A five digit zip code, such as 85258."
          },
          "zipCodeFrom": {
            "title": "Zip code range from",
            "type": "string",
            "description": "US zip code range search only. The lower five digit zip code of the range."
          },
          "zipCodeTo": {
            "title": "Zip code range to",
            "type": "string",
            "description": "US zip code range search only. The higher five digit zip code of the range."
          },
          "extraConditions": {
            "title": "Extra conditions",
            "type": "array",
            "description": "Optional advanced conditions, one per line, as additionType field modifier term. additionType is and, or or not; modifier is contains, exactly, any, starts_with or ends_with. Example: not product contains used. Up to 10.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two letter code of the customs dataset to search, such as us (United States), vn (Vietnam), in (India) or ru (Russia). Which countries you can query depends on your ImportGenius plan; ImportGenius lists your codes during integration.",
            "default": "us"
          },
          "tradeType": {
            "title": "Imports or exports",
            "enum": [
              "im",
              "ex"
            ],
            "type": "string",
            "description": "Search the country's import records or its export records.",
            "default": "im"
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Optional. First shipment date to include, as YYYY-MM-DD. Set together with the end date; leave both empty for your plan's default range."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Optional. Last shipment date to include, as YYYY-MM-DD."
          },
          "countOnly": {
            "title": "Count matches only",
            "type": "boolean",
            "description": "Return one row with the number of matching shipments instead of the shipment records. Useful for sizing a market or a supplier before pulling rows.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most shipment rows this run returns and charges for. ImportGenius returns at most 10 rows per request, and every request spends credits on your ImportGenius plan, so start small.",
            "default": 10
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Pacing. A rate limit answer is waited out and retried.",
            "default": 30
          },
          "apiKey": {
            "title": "Access token",
            "type": "string",
            "description": "Your own ImportGenius API access token. Stored as a secret and sent only to data.importgenius.com as the access_token parameter the API requires; it is never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}