DeepSeek has opened two web-access tools to developers, giving AI agents and retrieval-augmented generation applications a direct way to pull live content from the internet. The tools, a Search API and a Fetch API, are listed in the company's developer documentation with a price of $0.75 per 1,000 successful requests for each.

The Search API finds web pages for a query and returns structured results. DeepSeek says the service runs on its own in-house search engine. The Fetch API works differently. It takes a single web address and returns the page content as Markdown, the plain-text formatting language common in developer tools and AI pipelines.

Both are raw JSON interfaces, not software libraries. Developers send requests to two endpoints under the base address https://api.deepseek.com, one at /v1/tools/search and one at /v1/tools/fetch. Authentication uses the same bearer token that DeepSeek's model API requires, sent in an Authorization header alongside a JSON content type. The documentation includes sample code in curl and Python.

The Search API accepts a query of 1 to 128 Unicode characters. Developers can set the number of results between 1 and 50, with a default of 10. A flag called need_content controls whether the response includes full page text. It defaults to false, which means the content field comes back empty unless a developer asks for it. Other optional fields let developers pass the user's original question to help the system understand the query, or supply an IP address to localize results.

The search syntax supports common operators. Developers can restrict results to specific sites, exclude domains or terms, search for exact phrases, filter by language code, and limit results to pages published before or after a given date. Operators can be combined in a single query.

Each search result includes a title, URL, a short snippet meant for display, and a longer summary intended for a language model to read. Results also carry a relevance score from 0 to 3. The documentation treats scores of 1.5 or higher as high-quality matches. Each result also includes an authority rating from 0 to 4, where 3 and above indicates highly authoritative sources, along with the site name, site icon, and publication date when those are available. A value of -1 means the authority tier is unknown.

The Fetch API accepts any HTTP or HTTPS address up to 8,192 characters long. The URL cannot contain a username or password. The response includes the page title, which is empty if unavailable, and the page content in Markdown. The documentation warns that fetching depends on the target site's availability and access policies. Pages can fail to load if they are unavailable, blocked by site policy, served in an unsupported content type, or contain no extractable text.

Billing is tied to successful results rather than tokens or the number of items returned. A request is billed only when it returns HTTP 200 and produces a result. A search must return a non-empty results array, and a fetch must return page content. Failed requests, empty searches, and timeouts are not charged. The documentation says the count setting does not change the per-request price.

There is a free period for some users. Developers who reach the Search and Fetch tools through DeepSeek Harness, Claude Code, or Codex are not charged for these server-side tool calls for now. Per-request billing for those calls begins at 00:00 Beijing time on November 1, 2026.

Usage is capped by rate limits. Each account is allowed 5 requests per second for Search and 5 for Fetch. The two limits are tracked separately, so heavy use of one does not consume the other's quota. The limits apply to the account regardless of which API key is used, and they are separate from the model concurrency limits. Fetch also has a per-domain limit. Requests that exceed either cap receive an HTTP 429 error.

The documentation lists a range of error codes. A 401 means the API key is missing or invalid. A 402 means the account has insufficient balance and must be topped up before retrying. Codes 408, 429, and 5xx call for waiting and retrying, while other 4xx errors require changing the request before trying again.

Este artigo foi escrito com a assistência de IA.
News Factory APP - notícias agênticas para impulsionar seu SEO e AEO.