PreteWorks API

com.preteworks由 preteworks.com 发布官方发布者v1.0.2更新于 Oct 24, 2026

One key for the document-to-web pipeline: scrape, AI-extract, build & edit PDFs, fill forms.

已验证Streamable HTTP可网页运行网页搜索与抓取文件与存储AI 与机器学习

概览

AI 生成的概览

一个托管的文档与网页处理 API,让助手抓取网页、用 AI 提取或总结内容,并生成、编辑和填写 PDF。

可以做什么
将 HTML、Markdown、结构化文档和图片渲染为 PDF,把 DOCX 转为 PDF 或文本,把 Office 文件转为 Markdown 或表格,并把数据生成 XLSX 或 CSV 文件。编辑 PDF:合并、拆分、选取或旋转页面,添加页码、水印和元数据,读取并填写表单字段。读取 PDF 元数据并提取 PDF 文本,用于搜索或摘要。抓取公开网址,返回 Markdown、HTML、链接、元数据、截图或 PDF,并可批量抓取或爬取站内链接页面。用 AI 从网页、PDF、Office 文件或纯文本中提取指定字段、生成摘要,或仅依据该来源回答问题。
适用场景
适合需要把网页或文档转成可读文本或 PDF、拼接与整理 PDF、填写 PDF 表单,或对给定来源做 AI 字段提取与问答的场景。适用于资料研究、RAG 准备和文档生成,无需在本地运行转换库。
运行要求
远程 streamable HTTP 端点 api.preteworks.com。需要在 Authorization 请求头中提供 bearer API 密钥,密钥来自注册页面;免费额度标注为每月 500 单位且无需信用卡。需要网络访问;生成的文件以文件 ID 加约一小时有效的下载链接返回。
安装前请注意
API 密钥是敏感凭据,通过 Authorization 请求头发送;用量按单位计费,使用较多时可能需要付费方案。提交的文档、网址和文本会由第三方服务处理,AI 工具会把内容发送到该服务进行提取、摘要和问答。生成的下载链接约一小时后失效。抓取仅限公开主机,私有和内部地址会被阻止。

安装

在 SourceWeft 中

  1. 打开 控制台中的 PreteWorks API,将其添加到工作区。
  2. 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/com.preteworks%2Fpreteworks-api/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "preteworks-api": {
      "type": "http",
      "url": "https://api.preteworks.com/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

工具

29

render_html_to_pdf

Render HTML to PDF

Render a full HTML document to a PDF. External subresources are blocked for safety — inline images/fonts as data: URIs. Returns a file_id (for chaining) and a ~1h download URL.

输入参数html必填

number_pdf

Number PDF pages

Stamp a page number on every page. position: bottom-center (default) | bottom-left | bottom-right | top-center | top-left | top-right. format supports {n} and {total}. Returns a file_id + ~1h URL.

输入参数pdf必填startformatposition

pdf_info

Read PDF info

Read a PDF's metadata (title, author, subject, keywords, creator, producer, dates) plus page count and page size, as JSON.

输入参数pdf必填

set_pdf_metadata

Set PDF metadata

Set a PDF's title, author, subject, keywords (array or comma string) and/or creator. Only the fields you provide change. Returns a file_id + ~1h URL.

输入参数pdf必填titleauthorcreatorsubjectkeywords

render_document

Generate a document

Render a structured document to a PDF from a named template (invoice, receipt, report). Money/totals are computed for you. Returns a file_id (for chaining) and a ~1h download URL.

输入参数data必填template必填

merge_pdfs

Merge PDFs

Combine 2+ PDFs into a single PDF, in the order given. Inputs are file_ids (from prior tools) or base64 PDFs. Returns a file_id (for chaining) and a ~1h download URL.

输入参数pdfs必填

select_pages

Select PDF pages

Keep only the specified pages of a PDF (e.g. [1,3,5]) and drop the rest, preserving order. Returns a file_id (for chaining) and a ~1h download URL.

输入参数pdf必填pages必填

rotate_pdf

Rotate PDF

Rotate every page of a PDF by 90, 180, or 270 degrees (clockwise). Returns a file_id (for chaining) and a ~1h download URL.

输入参数pdf必填degrees必填

watermark_pdf

Watermark PDF

Stamp a diagonal grey text watermark (e.g. "DRAFT", "CONFIDENTIAL") across every page of a PDF. Returns a file_id (for chaining) and a ~1h download URL.

输入参数pdf必填text必填

extract_pdf_text

Extract text from a PDF

Extract the text content of a PDF — for RAG, summarization, or search. Accepts a file_id (from a prior tool) or a base64-encoded PDF, and returns the text inline. Not OCR: a scanned/image-only PDF returns little or no text.

输入参数pdf必填

images_to_pdf

Images to PDF

Combine PNG/JPEG images (base64) into a PDF, one image per page. Returns a file_id and a ~1h URL.

输入参数images必填

markdown_to_pdf

Render Markdown to PDF

Render Markdown to a clean, print-styled PDF. Returns a file_id and a ~1h URL.

输入参数titlemarkdown必填

split_pdf

Split a PDF

Split a PDF into multiple PDFs — one per page by default, or by page ranges like '1-3;4-6'. Returns a file_id + URL per part.

输入参数pdf必填ranges

read_pdf_form

Read a PDF form

List a PDF's form fields (name, type, value, options) as JSON.

输入参数pdf必填

fill_pdf_form

Fill a PDF form

Fill a PDF's form fields from a map of field -> value; optionally flatten. Returns a file_id and a ~1h URL.

输入参数pdf必填fields必填flatten

file_to_markdown

File to Markdown

Convert a Word (.docx), Excel (.xlsx) or CSV file (base64) into clean Markdown — for RAG, agents and pipelines. DOCX keeps headings/lists/tables; spreadsheets become Markdown tables (one per sheet). Returns Markdown inline. Optional 'format' (docx|xlsx|csv) overrides auto-detection.

输入参数file必填format

data_to_spreadsheet

Create a spreadsheet from rows

Turn rows of data into a downloadable XLSX (default) or CSV. 'rows' is an array of objects (keys → header row) or an array of arrays (first row is the header). Returns a file_id (for chaining) and a ~1h download URL.

输入参数rows必填formatsheet_name

batch_scrape

Batch: URLs to Markdown

Fetch up to 10 public URLs and return each as clean Markdown, in one call — for research/RAG over several pages at once. Private/internal hosts are blocked.

输入参数urls必填

crawl_site

Crawl a site to Markdown

Fetch a URL plus up to 7 more same-origin pages it links to (≤8 total), each as clean Markdown. Bounded and synchronous. Private/internal hosts are blocked.

输入参数url必填limit

map_site

Map a site's URLs

Discover the same-origin URLs linked from a page — the site map, with no page content fetched. Private/internal hosts are blocked.

输入参数url必填

extract_data

Extract structured data (AI)

Extract specified fields from a web page, PDF, or Office file as JSON, using AI. Provide 'fields' plus ONE source: a 'url', a 'pdf' (file_id or base64), or a 'file' (base64 .docx/.xlsx/.csv). Returns a JSON object mapping each field to its value, or null when absent.

输入参数pdfurlfilefields必填

summarize_document

Summarize a document (AI)

Summarize a web page, PDF, Office file (.docx/.xlsx/.csv), or raw text using AI. Provide ONE source: 'url', 'pdf' (file_id or base64), 'file' (base64), or 'text'. Optional 'max_words'. Returns the summary.

输入参数pdfurlfiletextmax_words

answer_from_document

Answer a question from a document (AI)

Answer a question grounded ONLY in a source document — a web page, PDF, Office file, or raw text. Provide 'question' plus ONE source: 'url', 'pdf', 'file' (base64), or 'text'. Says so when the answer isn't in the document.

输入参数pdfurlfiletextquestion必填

docx_to_text

DOCX to text

Extract the text of a .docx document (base64). Returns the text inline.

输入参数docx必填

docx_to_pdf

DOCX to PDF

Convert a .docx document (base64) to a PDF. Returns a file_id and a ~1h URL.

输入参数docx必填

read_url

Read a web page as Markdown

Fetch a public http/https URL and return its main content as clean Markdown — ideal for giving an agent readable web content for research or RAG. Private/internal hosts are blocked.

输入参数url必填

url_to_pdf

Snapshot a web page as PDF

Fetch a public http/https URL and render the live page to a PDF. Returns a file_id (chainable into the PDF tools) and a ~1h download URL. Private/internal hosts are blocked.

输入参数url必填

url_to_screenshot

Screenshot a web page

Fetch a public http/https URL and capture a PNG screenshot. Set full_page for the entire scroll height. Returns a file_id and a ~1h download URL.

输入参数url必填full_page

scrape_page

Scrape a web page (HTML + links + metadata)

Fetch a public http/https URL and return its rendered HTML, the links on the page, and page metadata (title/description/OpenGraph/canonical/favicon) — in one render. For clean Markdown use read_url instead. Private/internal hosts are blocked.

输入参数url必填formats

版本历史

1
  1. v1.0.2最新Sep 16, 2026

评分

已满足适用检查项的 72%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分

    请在注册中心条目中发布图标。

  • 文档15 分

    请声明包含 README 的 GitHub 仓库,或在 OAuth 受保护资源元数据中提供 resource_documentation。

  • 许可证不适用

    托管服务按其提供方的条款使用,因此这里不要求许可证。此检查项不计入百分比。