Chat with website
Chat with website · GPT Actions
Website Content Vector Retriever
POST /actor-tasks/apify_gpt~website-content-vector-retriever-gpt/run-sync-get-dataset-items?clean=true&format=jsonwebsite-content-vector-retriever
原始 API 定义
{
"openapi": "3.0.1",
"info": {
"title": "Website Content Vector Retriever",
"description": "",
"version": "v1"
},
"servers": [
{
"url": "https://api.apify.com/v2"
}
],
"paths": {
"/actor-tasks/apify_gpt~website-content-vector-retriever-gpt/run-sync-get-dataset-items?clean=true&format=json": {
"post": {
"operationId": "website-content-vector-retriever",
"x-openai-isConsequential": false,
"summary": "",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/inputSchema"
}
}
}
},
"responses": {
"200": {
"description": "OK"
}
}
}
}
},
"components": {
"schemas": {
"inputSchema": {
"type": "object",
"required": [
"url",
"query"
],
"properties": {
"url": {
"title": "URL",
"type": "string",
"description": "A URL of a website where to fetch the web pages from. The URL can be a top-level domain like https://example.com, a subdirectory https://example.com/some-directory/, or a specific page https://example.com/some-directory/page.html."
},
"query": {
"title": "Query",
"type": "string",
"description": "Text query to look for on the website."
},
"openaiApiKey": {
"title": "OpenAI API key",
"type": "string",
"description": "OpenAI API key to generate vector embeddings."
},
"maxCrawlPages": {
"title": "Maximum number of pages",
"minimum": 0,
"maximum": 1000,
"type": "integer",
"description": "The maximum number pages to crawl. It includes the start URLs, pagination pages, pages with no content, etc. The crawler will automatically finish after reaching this number. This setting is useful to prevent accidental crawler runaway.",
"default": 1000
},
"maxResults": {
"title": "Max results",
"minimum": 0,
"type": "integer",
"description": "The maximum number of resulting web pages to store. The crawler will automatically finish after reaching this number. This setting is useful to prevent accidental crawler runaway. If both **Max page** and **Max results** are defined, then the crawler will finish when the first limit is reached. Note that the crawler skips pages with the canonical URL of a page that has already been crawled, hence it might crawl more pages than there are results.",
"default": 9999999
},
"chunkSize": {
"title": "Chunk size",
"minimum": 1,
"type": "integer",
"description": "The maximum size of each chunk in characters or tokens.",
"default": 1000
},
"chunkOverlap": {
"title": "Chunk overlap",
"minimum": 0,
"type": "integer",
"description": "The number of overlapping characters or tokens between consecutive chunks.",
"default": 200
},
"crawlerType": {
"title": "Crawler type",
"enum": [
"playwright:firefox",
"cheerio"
],
"type": "string",
"description": "<div>Select the crawling engine:<ul><li><strong>Stealthy web browser</strong> (default) - Another headless web browser with anti-blocking measures enabled. Try this if you encounter bot protection while scraping. For best performance, use with Apify Proxy residential IPs. </li><li><strong>Raw HTTP client</strong> - High-performance crawling mode that uses raw HTTP requests to fetch the pages. It is faster and cheaper, but it might not work on all websites.</li></ul></div>",
"default": "cheerio"
},
"maxCacheAge": {
"title": "Max cache age in days",
"minimum": 1,
"type": "integer",
"description": "The maximum age of cached records, in days, to consider them useful. By default, set to 30.",
"default": 30
},
"cacheKeyValueStoreName": {
"title": "Cache key-value store name",
"type": "string",
"description": "Name of the key-value store where the actor will store its cache.",
"default": "website-content-vector-retriever-cache"
},
"indexWebsiteContentCrawledRunId": {
"title": "Index Website Content Crawled Run ID",
"type": "string",
"description": "When set, it invokes a special mode in which we index the crawl to the database, rather than answer user queries. This is invoked using webhook from Website Content Crawler, scheduled by this actor. Note that the URL and Query need to also be passed, but the URL can be dummy, as they it's ignored."
},
"forceRescrape": {
"title": "Force rescrape",
"type": "boolean",
"description": "When set to true, the actor will ignore the cache and scrape the website again."
}
}
}
}
}
}