{
  "openapi": "3.0.1",
  "info": {
    "title": "URL Unshortener: Expand Short Links & Resolve Redirects",
    "description": "URL unshortener for bulk short links. Expand bit.ly, t.co, tinyurl, ow.ly, lnkd.in and amzn.to links, or resolve any redirect, to the final destination URL. Returns the full redirect chain, hop count, status code, final domain, page title and a clean URL without utm and fbclid. Pay per URL resolved.",
    "version": "0.1",
    "x-build-id": "VY2VNJea0B88dr0Ex"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~url-unshortener/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-url-unshortener",
        "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/data-done-right~url-unshortener/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-url-unshortener",
        "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/data-done-right~url-unshortener/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-url-unshortener",
        "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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Short or redirecting URLs",
            "type": "array",
            "description": "The links to expand, one per line (use Bulk edit to paste a long list). Works with bit.ly, t.co, tinyurl.com, ow.ly, lnkd.in, amzn.to, goo.gl-style links and any other URL that redirects. A missing https:// is added and duplicates are removed. Example: https://bit.ly/3abcDEF.",
            "items": {
              "type": "string"
            }
          },
          "urlsText": {
            "title": "Or paste URLs (one per line)",
            "type": "string",
            "description": "Alternative to the list above: paste a block of links, one per line. Added after the list; duplicates across both are removed. Example: a column copied from a spreadsheet."
          },
          "cleanTracking": {
            "title": "Remove tracking parameters",
            "type": "boolean",
            "description": "Fill the cleanUrl field with the final URL minus tracking parameters (utm_*, fbclid, gclid, msclkid, mc_cid, igshid, Amazon tag and similar) and without the #fragment. finalUrl always keeps the exact URL the redirects ended on.",
            "default": true
          },
          "extraTrackingParams": {
            "title": "Extra parameters to remove",
            "type": "array",
            "description": "Additional query parameter names to strip from cleanUrl, one per line, not case sensitive. Example: ref_campaign, affiliate_id.",
            "items": {
              "type": "string"
            }
          },
          "fetchTitle": {
            "title": "Fetch page title",
            "type": "boolean",
            "description": "Download the first 256 KB of the final page with one extra GET request and return its <title> in the title field. Slower, so it is off by default.",
            "default": false
          },
          "followHtmlRedirects": {
            "title": "Follow meta-refresh and JavaScript redirects",
            "type": "boolean",
            "description": "Also follow <meta http-equiv=\"refresh\"> redirects and very small pages that only set window.location (interstitials used by some shorteners). Real pages with scripts are never treated as redirects. Needs one extra GET per hop.",
            "default": false
          },
          "maxHops": {
            "title": "Max redirect hops",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Stop with the status too-many-redirects after this many hops for one URL (1 to 20). Redirect loops are detected earlier and reported as redirect-loop. Example: 10.",
            "default": 10
          },
          "timeoutSecs": {
            "title": "Timeout per URL (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Total time allowed for one URL, all hops included (1 to 120 seconds). A slow URL gets status timeout and still produces a row. Example: 20.",
            "default": 20
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "URLs resolved in parallel (1 to 50). At most 10 run in parallel against the same website, whatever this is set to. Example: 20.",
            "default": 20
          },
          "maxUrls": {
            "title": "Max URLs",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Upper limit of unique URLs resolved in this run (1 to 20,000); it also caps what you can be charged. Extra URLs are skipped and counted in SUMMARY. Example: 1000.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Off by default. Use an Apify proxy when a link only opens from a certain country or a site blocks datacenter IPs. Example: {\"useApifyProxy\": true}.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}