Skip to main content
POST
Web fetch: deepseek-fetch
Try it in the Playground on the right: put Bearer sk-your-api-key (a key in the default or svip group) in Authorization, enter the public web page URL you want to read and send. You are billed only when page content is fetched successfully.
Pricing, test data and the things you need to know are in the Overview.

Parameter reference

The request body does not need a model field; unknown fields are ignored.

Response highlights

  • content is the extracted body in Markdown; navigation, ads and other page chrome are mostly removed
  • title is an empty string when the page has no title
  • In testing, a docs page of about 6,400 characters took 1.6 s; some sites are slower, so set your client timeout to 30 s or more

Retrieval limitations and handling failures

Fetch depends on both the target page and the fetch service. A page opening in a browser or appearing in Search does not guarantee Fetch can retrieve it. Even when you set need_content=true in a Search request and the response contains content, a subsequent Fetch request for the same URL can fail. 404 failed to fetch URL means no usable content was obtained. It does not necessarily mean the page is missing or the API endpoint does not exist; the message alone cannot distinguish access restrictions from page processing failures or other causes. Keep the existing search results, reuse available content and check its completeness. Clearly identify summaries as summaries. If you need more content, try another accessible source or abstract page, or download the document for your client to read, instead of repeatedly retrying the same link. Some DeepSeek Harness versions wrap API errors as WEB_PROVIDER_ERROR and append generic endpoint configuration advice. Use the actual request path, HTTP status and original message to diagnose the issue. If the same /v1/tools/fetch endpoint has successful calls, do not change the Base URL solely because some target URLs fail.

Error codes

Soft 404s are billed: some sites answer a missing page with their home page or a notice page instead of a 404, and Fetch treats that as a successful fetch. Make sure the URL is valid before calling.
shell_api_error alone does not identify the cause. Use the HTTP status code and original message. Fetch failures are not limited to 404. If a 503 explicitly says no available channels, check the key’s group and whether the API is enabled first. Some failed requests may not appear in console billing logs. For troubleshooting, retain the time and time zone, full target URL, API path, HTTP status, error body and any request IDs. Do not include your API key or the Authorization header.

Authorizations

Authorization
string
header
required

Add Authorization: Bearer YOUR_API_KEY to the request headers

Body

application/json
url
string
required

HTTP / HTTPS URL with a host, up to 8192 characters, no username or password

Example:

"https://docs.apiyi.com/en"

Response

Fetch succeeded (billed once)

title
string

Page title; empty string if none

content
string

Extracted body text in Markdown