{
  "openapi": "3.0.1",
  "info": {
    "title": "URL to Markdown API for LLMs: Web Page Reader and Web Search",
    "description": "Convert any URL or PDF to clean, LLM-ready markdown, text or HTML, and search the web with each top result already read into markdown. CSS selectors, link and image summaries, screenshots, country and language search, via the Jina Reader API. Bring your own key.",
    "version": "0.1",
    "x-build-id": "vtMbOodVR0txadHY1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~url-to-markdown-reader-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-url-to-markdown-reader-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~url-to-markdown-reader-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-url-to-markdown-reader-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~url-to-markdown-reader-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-url-to-markdown-reader-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": {
          "mode": {
            "title": "What to do",
            "enum": [
              "read",
              "search"
            ],
            "type": "string",
            "description": "Each mode calls one documented Jina Reader API route with your own API key: POST r.jina.ai/ to read URLs, POST s.jina.ai/search to search the web. Nothing is written to your Jina account.",
            "default": "read"
          },
          "apiKey": {
            "title": "Jina API key",
            "type": "string",
            "description": "Your own Jina AI API key (starts with jina_), from the API dashboard on jina.ai. Sent only as a Bearer token to r.jina.ai and s.jina.ai and removed from every log line. Jina bills its tokens to that account. Leave empty to use the DATA_API_KEY secret."
          },
          "urls": {
            "title": "Page URLs",
            "type": "array",
            "description": "Page read. One full URL per line (HTML pages, single page apps and PDF links). Each URL is one Jina read request and one row.",
            "items": {
              "type": "string"
            }
          },
          "targetSelector": {
            "title": "Keep only this CSS selector",
            "type": "string",
            "description": "Page read. Return only the content inside the elements matching this CSS selector, such as article or main .content. Reader also waits for it to appear."
          },
          "removeSelector": {
            "title": "Remove this CSS selector",
            "type": "string",
            "description": "Page read. Remove elements matching this CSS selector before conversion, such as nav, footer, .ads."
          },
          "waitForSelector": {
            "title": "Wait for this CSS selector",
            "type": "string",
            "description": "Page read. Wait until an element matching this CSS selector is rendered before returning. Useful for pages that load content late."
          },
          "engine": {
            "title": "Browser engine",
            "enum": [
              "auto",
              "browser",
              "curl",
              "cf-browser-rendering"
            ],
            "type": "string",
            "description": "Page read. auto lets Jina choose; browser renders JavaScript in headless Chrome; curl fetches raw HTML fast; cf-browser-rendering uses Cloudflare browser rendering.",
            "default": "auto"
          },
          "preset": {
            "title": "Preset",
            "enum": [
              "none",
              "reader",
              "index",
              "research",
              "agent",
              "spider"
            ],
            "type": "string",
            "description": "Page read. A Jina option bundle for common uses; options you set yourself still win.",
            "default": "none"
          },
          "proxyCountry": {
            "title": "Proxy country",
            "type": "string",
            "description": "Page read. Read through a Jina-provided proxy in this country, as a two-letter code such as us or de."
          },
          "locale": {
            "title": "Browser locale",
            "type": "string",
            "description": "Page read. Browser locale for the page, such as en-US or de-DE."
          },
          "tokenBudget": {
            "title": "Token budget per page",
            "minimum": 1,
            "type": "integer",
            "description": "Page read. Reject a page (free row, no charge) when its content would cost more than this many Jina tokens."
          },
          "removeOverlay": {
            "title": "Remove overlays",
            "type": "boolean",
            "description": "Page read. Remove overlay elements such as cookie banners and modals.",
            "default": false
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Web search. One query per line; each query is one Jina search request returning the top results with their pages read.",
            "items": {
              "type": "string"
            }
          },
          "resultsPerQuery": {
            "title": "Results per query",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Web search. How many results to return per query, 1 to 20 (the API maximum).",
            "default": 5
          },
          "resultsPage": {
            "title": "Results page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Web search. Page of results to return, for paging past the first results."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Web search. Two-letter country code for the search, such as us, gb or de."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Web search. Interface language code for the search, such as en, de or zh-cn."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Web search. Location the search should originate from, such as Berlin, Germany."
          },
          "sites": {
            "title": "Search only these sites",
            "type": "array",
            "description": "Web search. Restrict results to these domains, one per line, such as jina.ai or github.com.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "news"
            ],
            "type": "string",
            "description": "Web search. Web results or news results.",
            "default": "web"
          },
          "provider": {
            "title": "Search provider",
            "enum": [
              "any",
              "google",
              "bing"
            ],
            "type": "string",
            "description": "Web search. Which search backend Jina uses; any lets Jina choose.",
            "default": "any"
          },
          "respondWith": {
            "title": "Output format",
            "enum": [
              "content",
              "markdown",
              "text",
              "html",
              "screenshot",
              "pageshot"
            ],
            "type": "string",
            "description": "Both modes. content is the main content as clean markdown (the default); markdown converts the page to markdown; text and html return plain text or HTML; screenshot and pageshot return a link to a first-screen or full-page image.",
            "default": "content"
          },
          "retainImages": {
            "title": "Images in content",
            "enum": [
              "all",
              "none",
              "alt",
              "all_p",
              "alt_p"
            ],
            "type": "string",
            "description": "Both modes. Keep all images, drop them, keep only alt text, or add generated alt text (all_p, alt_p).",
            "default": "all"
          },
          "retainLinks": {
            "title": "Links in content",
            "enum": [
              "all",
              "none",
              "text",
              "gpt-oss"
            ],
            "type": "string",
            "description": "Both modes. Keep links, drop them, keep only anchor text, or use gpt-oss citation format.",
            "default": "all"
          },
          "withLinksSummary": {
            "title": "Links summary",
            "type": "boolean",
            "description": "Both modes. Add a deduplicated list of every link on the page as links (text and URL).",
            "default": false
          },
          "withImagesSummary": {
            "title": "Images summary",
            "type": "boolean",
            "description": "Both modes. Add a list of every image on the page as images (alt text and URL).",
            "default": false
          },
          "withGeneratedAlt": {
            "title": "Caption images",
            "type": "boolean",
            "description": "Both modes. Caption images that lack alt text with a vision model. Only with the default output format.",
            "default": false
          },
          "noCache": {
            "title": "Bypass cache",
            "type": "boolean",
            "description": "Both modes. Ignore Jina's cache and fetch each page fresh.",
            "default": false
          },
          "timeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 1,
            "maximum": 180,
            "type": "integer",
            "description": "Both modes. Wait up to this many seconds for a page to load, at most 180. When set, Reader waits for the page to settle instead of returning early."
          },
          "maxTokens": {
            "title": "Maximum tokens per page",
            "minimum": 500,
            "type": "integer",
            "description": "Both modes. Trim each page's content to at most this many tokens (at least 500)."
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows in total. Rows past the limit are never requested or charged.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}