{
  "openapi": "3.0.1",
  "info": {
    "title": "Shipping Location Finder (USPS, UPS, FedEx)",
    "description": "Find Every Shipping Location Near You\nNeed to ship a package but don't know where to go? Post offices, UPS Stores, FedEx locations, drop boxes, access points — they're everywhere, but finding them all in one place is a hassle.\n\nThe Shipping Location Finder searches USPS, UPS, and FedEx locations",
    "version": "1.1",
    "x-build-id": "pFVnBsLXti6rs890H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alizarin_refrigerator-owner~shipping-location-finder-usps-ups-fedex/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alizarin_refrigerator-owner-shipping-location-finder-usps-ups-fedex",
        "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/alizarin_refrigerator-owner~shipping-location-finder-usps-ups-fedex/runs": {
      "post": {
        "operationId": "runs-sync-alizarin_refrigerator-owner-shipping-location-finder-usps-ups-fedex",
        "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/alizarin_refrigerator-owner~shipping-location-finder-usps-ups-fedex/run-sync": {
      "post": {
        "operationId": "run-sync-alizarin_refrigerator-owner-shipping-location-finder-usps-ups-fedex",
        "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": {
          "zipCode": {
            "title": "ZIP Code",
            "type": "string",
            "description": "5-digit US ZIP code to search around. Use this, or City and State."
          },
          "address": {
            "title": "Street Address",
            "type": "string",
            "description": "Optional street address for a more precise search. Use it together with a ZIP code, or with a city and state."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City name. Use it with State when you do not have a ZIP code."
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "2-letter state abbreviation, for example TX, CA or NY."
          },
          "radius": {
            "title": "Search Radius",
            "minimum": 1,
            "maximum": 50,
            "type": "number",
            "description": "How far to look from the search location, from 1 to 50. UPS always searches at least 5 miles, and every carrier's results are trimmed to this radius.",
            "default": 10
          },
          "radiusUnit": {
            "title": "Radius Unit",
            "enum": [
              "mi",
              "km"
            ],
            "type": "string",
            "description": "Miles or kilometers. Distances in the results use the same unit.",
            "default": "mi"
          },
          "carriers": {
            "title": "Carriers",
            "type": "array",
            "description": "Which carriers to search. A carrier is searched only when its API keys are filled in below.",
            "items": {
              "type": "string",
              "enum": [
                "USPS",
                "UPS",
                "FedEx"
              ]
            },
            "default": [
              "USPS",
              "UPS",
              "FedEx"
            ]
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of locations to return across all carriers, nearest first.",
            "default": 20
          },
          "demoMode": {
            "title": "Demo Mode",
            "type": "boolean",
            "description": "Return sample locations instead of calling the carriers, so you can see the output format. Demo runs are never charged a search fee.",
            "default": false
          },
          "uspsClientId": {
            "title": "USPS Consumer Key",
            "type": "string",
            "description": "From developers.usps.com: sign in, add an app, and copy its Consumer Key. The app needs access to the Locations API."
          },
          "uspsClientSecret": {
            "title": "USPS Consumer Secret",
            "type": "string",
            "description": "The Consumer Secret of the same USPS app."
          },
          "upsClientId": {
            "title": "UPS Client ID",
            "type": "string",
            "description": "From developer.ups.com: create an app, add the Locator API product to it, and copy its Client ID."
          },
          "upsClientSecret": {
            "title": "UPS Client Secret",
            "type": "string",
            "description": "The Client Secret of the same UPS app."
          },
          "fedexApiKey": {
            "title": "FedEx API Key",
            "type": "string",
            "description": "From developer.fedex.com: create a project that includes the Locations API and copy its API Key. Use production keys here, or test keys together with the test environment option below."
          },
          "fedexSecretKey": {
            "title": "FedEx Secret Key",
            "type": "string",
            "description": "The Secret Key of the same FedEx project."
          },
          "includeUpsAccessPoints": {
            "title": "Include UPS Access Points",
            "type": "boolean",
            "description": "Also search UPS Access Point locations, the partner stores that accept UPS drop-offs and hold packages for pickup. This adds one UPS API call per run.",
            "default": true
          },
          "useCarrierTestEnvironment": {
            "title": "Use carrier test environments",
            "type": "boolean",
            "description": "Send requests to the carrier test environments (USPS TEM, UPS CIE and the FedEx sandbox) instead of production. Use this with test keys to check your setup. Test environment results can be sample data, so they are flagged and no search fee is charged.",
            "default": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}