Zum Inhalt springen
API-Referenz
API-Referenz

DeepSeek Search

Senden Sie eine Anfrage über die DeepSeek-kompatible Search-Operation von RunAPI.

01

Übersicht

Synchrone Suche über diesen Pfad. Kein Modell erforderlich; Streaming wird nicht unterstützt. Unbekannte Felder werden akzeptiert, aber ignoriert.

Schnellstart

  1. Erstellen Sie einen API-Schlüssel und setzen Sie ihn als RUNAPI_API_KEY.
  2. Senden Sie den dokumentierten JSON-Body; kein Modell erforderlich.
  3. Lesen Sie die JSON-Antwort und behandeln Sie die dokumentierten Protokollfehler.

Endpunkt

POST /v1/tools/search
Basis-URL
https://runapi.ai
Vertragsversion
v1
Bevorzugte Authentifizierung
Authorization: Bearer YOUR_API_TOKEN
02

Authentifizierungsträger

RunAPI akzeptiert jeden der unten aufgeführten Träger. Generierte Beispiele verwenden den bevorzugten Header des Protokolls.

header - Bevorzugt
Authorization: Bearer YOUR_API_TOKEN
header
x-api-key: YOUR_API_TOKEN
header
x-goog-api-key: YOUR_API_TOKEN
query
?key=YOUR_API_TOKEN
03

Kompatible Modelle

Öffnen Sie eine Modellseite für aktuelle Preise, Ratenlimits und Details zur kommerziellen Nutzung.

1 kompatibles Modell anzeigen
04

Anfrage-Vertrag

JSON-Body

Synchrone Suche über diesen Pfad. Kein Modell erforderlich; Streaming wird nicht unterstützt. Unbekannte Felder werden akzeptiert, aber ignoriert.

JSON-Body5 Felder
countinteger
Optional

Angeforderte Ergebnisanzahl von 1 bis 50.

localizationstring
Optional

Lokalisierungshinweis, etwa die IP-Adresse des Endnutzers.

need_contentboolean
Optional

Seiteninhalte in Suchergebnissen anfordern.

ori_question["string", "null"]
Optional

Ursprüngliche Frage mit 1–128 Unicode-Zeichen. Null gilt als nicht angegeben.

querystring
Erforderlich

Suchanfrage mit 1–128 Unicode-Zeichen; darf nicht nur aus Leerzeichen bestehen.

Anfragebeispiel

JSON
{
  "count": 5,
  "localization": "203.0.113.7",
  "need_content": true,
  "ori_question": null,
  "query": "DeepSeek V4 release"
}
05

Synchrone Antwort

HTTP 200

Schema

JSON
{
  "additionalProperties": true,
  "properties": {
    "results": {
      "description": "Suchergebnisse. Ein leeres Array ist eine erfolgreiche Antwort und wird nicht berechnet.",
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "results"
  ],
  "type": "object"
}

Beispiel

JSON
{
  "results": [
    {
      "snippet": "Browse DeepSeek models and API documentation.",
      "title": "DeepSeek models on RunAPI",
      "url": "https://runapi.ai/models/deepseek"
    }
  ]
}
06

Protokollfehler: invalid_request

HTTP 400

Schema

JSON
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}

Beispiel

JSON
{
  "error": {
    "message": "'query' is required",
    "type": "invalid_request_error"
  }
}
07

Protokollfehler: rate_limited

HTTP 429

Schema

JSON
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}

Beispiel

JSON
{
  "error": {
    "message": "Too many requests, please retry later",
    "type": "rate_limit_error"
  }
}
08

Protokollfehler: unavailable

HTTP 503

Schema

JSON
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}

Beispiel

JSON
{
  "error": {
    "message": "Service temporarily unavailable",
    "type": "service_unavailable"
  }
}
09

Generierte Code-Beispiele

Jedes cURL-, JavaScript- und Python-Beispiel sendet die validierte Anfrage aus diesem Vertrag, ohne ein protokollspezifisches SDK zu benötigen.

Installieren

Shell
pip install requests
PYTHON
import requests

response = requests.post(
    "https://runapi.ai/v1/tools/search",
    headers={"Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json"},
    json={"query": "DeepSeek V4 release", "count": 5, "ori_question": None, "localization": "203.0.113.7", "need_content": True}
)
response.raise_for_status()
print(response.json())