{
  "openapi": "3.0.1",
  "info": {
    "title": "Base64 Encoder & Decoder — Text, Files, Images to Data URI",
    "description": "Base64 encode and decode text, files, image links and key-value store records: Base64, base64url and data URIs with the MIME type found from the bytes, size and SHA-256. Decode Base64 or data URIs back to text or a file with a link. Export to JSON, CSV or Excel, or via API.",
    "version": "1.0",
    "x-build-id": "bkWyUBffECwFfULuk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyscrape~base64-encoder-decoder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyscrape-base64-encoder-decoder",
        "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/steadyscrape~base64-encoder-decoder/runs": {
      "post": {
        "operationId": "runs-sync-steadyscrape-base64-encoder-decoder",
        "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/steadyscrape~base64-encoder-decoder/run-sync": {
      "post": {
        "operationId": "run-sync-steadyscrape-base64-encoder-decoder",
        "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": {
          "text": {
            "title": "Text to encode",
            "type": "string",
            "description": "One text to encode to Base64 (as UTF-8). It may span several lines, and JSON, HTML or SVG get their own type in the data URI."
          },
          "texts": {
            "title": "More texts to encode",
            "type": "array",
            "description": "Many texts at once, one dataset row each. Through the API, any string works, line breaks included.",
            "items": {
              "type": "string"
            }
          },
          "fileUrls": {
            "title": "File or image links to encode",
            "type": "array",
            "description": "Links to any file: images, PDFs, documents, audio, fonts, archives. Google Drive, Dropbox and GitHub share links are read as the file they share. Each gives its Base64, a data URI with the MIME type found from the file's own bytes, its size and its SHA-256.",
            "items": {
              "type": "string"
            }
          },
          "uploadedFiles": {
            "title": "Or upload files to encode",
            "type": "array",
            "description": "Files from your computer, encoded the same way as the links above.",
            "items": {
              "type": "string"
            }
          },
          "keyValueStore": {
            "title": "Or encode the records of a key-value store",
            "type": "string",
            "description": "Pick a key-value store whose records are files (another Actor's screenshots, downloads or exports). Picking it here is what lets this run read it."
          },
          "recordKeys": {
            "title": "Records of that store",
            "type": "array",
            "description": "The keys of the records to encode. Leave empty to encode every record of the store (up to 1,000; its INPUT record is left out).",
            "items": {
              "type": "string"
            }
          },
          "base64": {
            "title": "Base64 or data URI to decode",
            "type": "string",
            "description": "One Base64 value (standard or URL-safe, padded or not, line breaks ignored), a data URI (data:image/png;base64,…) or a PEM block, decoded back to text or to a file."
          },
          "base64Inputs": {
            "title": "More Base64 values or data URIs to decode",
            "type": "array",
            "description": "Many values at once, one dataset row each. A value that is not valid Base64 is a free row saying which character is wrong and where.",
            "items": {
              "type": "string"
            }
          },
          "decodeTo": {
            "title": "Decode to",
            "enum": [
              "auto",
              "text",
              "file"
            ],
            "type": "string",
            "description": "Auto: text when the bytes are text (plain text, JSON, HTML, CSV…), a file otherwise (images, PDFs, archives…). A file is saved in the run's key-value store with a link that opens without a login.",
            "default": "auto"
          },
          "outputFormats": {
            "title": "Encoded output",
            "type": "array",
            "description": "Base64 (RFC 4648, padded), base64url (URL-safe, no padding: JWTs, URLs, file names) and data URI (data:<MIME type>;base64,…, ready for HTML, CSS, JSON, emails and LLM vision APIs). Choose one or more.",
            "items": {
              "type": "string",
              "enum": [
                "base64",
                "base64url",
                "dataUri"
              ],
              "enumTitles": [
                "Base64",
                "base64url (URL-safe)",
                "Data URI"
              ]
            },
            "default": [
              "base64",
              "dataUri"
            ]
          },
          "lineLength": {
            "title": "Base64 line length",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "0 keeps the Base64 on one line. 76 gives MIME lines for email (RFC 2045), 64 the lines of PEM. Lines end in CRLF. Only the Base64 output is wrapped; base64url and data URIs stay on one line.",
            "default": 0
          },
          "maxInlineMegabytes": {
            "title": "Most megabytes in a dataset row",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "A row whose outputs would pass this size gets them as links instead: each output is saved whole in the run's key-value store as a text record (outputLinks), and a decoded text as a file (fileUrl). Apify allows at most 9 MB per dataset row; 0 always gives links.",
            "default": 8
          },
          "maxFileMegabytes": {
            "title": "Most megabytes per file",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "A bigger file is a free too_large row and is not downloaded whole.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}