Skip to content
API Reference
API Reference

DeepSeek Search

Send a request through RunAPI's DeepSeek-compatible Search operation.

01

Overview

Synchronous search selected by this path. No model is required and streaming is not supported. Unknown fields are accepted but ignored.

Quick start

  1. Create an API key and set it as RUNAPI_API_KEY.
  2. Send the documented JSON body; no model is required.
  3. Read the JSON response and handle the documented protocol errors.

Endpoint

POST /v1/tools/search
Base URL
https://runapi.ai
Contract version
v1
Preferred authentication
Authorization: Bearer YOUR_API_TOKEN
02

Authentication carriers

RunAPI accepts each carrier listed below. Generated samples use the protocol's preferred header.

header - Preferred
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

Compatible models

Open a model page for current pricing, rate limits, and commercial-usage details.

Show 1 compatible model
04

Request contract

JSON body

Synchronous search selected by this path. No model is required and streaming is not supported. Unknown fields are accepted but ignored.

JSON body5 fields
countinteger
Optional

Number of results requested from 1 to 50.

localizationstring
Optional

Localization hint such as the end user's IP address.

need_contentboolean
Optional

Request page content in search results.

ori_question["string", "null"]
Optional

Original question of 1–128 Unicode characters. Null is treated as omitted.

querystring
Required

Search query of 1–128 Unicode characters; must not consist entirely of whitespace.

Request example

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

Synchronous response

HTTP 200

Schema

JSON
{
  "additionalProperties": true,
  "properties": {
    "results": {
      "description": "Search results. An empty array is a successful response and incurs no charge.",
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "results"
  ],
  "type": "object"
}

Example

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

Protocol error: 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"
}

Example

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

Protocol error: 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"
}

Example

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

Protocol error: 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"
}

Example

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

Generated Code Samples

Each cURL, JavaScript, and Python sample sends the validated request from this contract without requiring a protocol-specific SDK.

Install

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())