POST
/
llmstxt
curl --request POST \
  --url https://api.firecrawl.dev/v1/llmstxt \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "<string>",
  "maxUrls": 2,
  "showFullText": false
}'
{
  "success": true,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

LLMs.txt 生成端点为任何网站创建 LLMs.txt 和 LLMs-full.txt 文件。这些文件提供了网站内容的结构化、适合语言模型的格式,使语言模型更容易理解和处理信息。

寻找状态端点?请查看 LLMs.txt 状态 端点。

响应结构

响应包含:

  • success: 布尔值,指示请求是否成功
  • id: 生成作业的唯一标识符

输出格式

  1. LLMs.txt

    • 网站的简洁、结构化摘要

    • 包含关键链接和描述

    • 以 Markdown 格式编写,便于解析

    • 示例:

      # http://example.com llms.txt
      
      - [页面标题](https://example.com/page): 简要描述
      - [另一个页面](https://example.com/another): 另一个描述
      
  2. LLMs-full.txt(当 showFullText 为 true 时)

    • 包含已处理页面的完整内容

    • 保持层次结构

    • 包括更详细的信息

    • 示例:

      # http://example.com llms-full.txt
      
      ## 页面标题
      
      页面的完整内容...
      
      ## 另一个页面
      
      更详细的内容...
      

计费

计费基于 API 调用和处理的 URL:

  • 基础费用:每次 API 调用 1 积分
  • 额外费用:每个处理的 URL 1 积分
  • 使用 maxUrls 参数控制 URL 成本

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
url
string
required

The URL to generate LLMs.txt from

maxUrls
integer
default:2

Maximum number of URLs to analyze

showFullText
boolean
default:false

Include full text content in the response

Response

200
application/json

LLMs.txt generation job started successfully

success
boolean
Example:

true

id
string

ID of the LLMs.txt generation job