Skip to main content
Performs a web search using DuckDuckGo and returns structured results with titles, URLs, and snippets. Cost: 1 credit

Endpoint

POST /api/v1/crawl/search

Request

Headers

HeaderRequiredDescription
AuthorizationYesApiKey ck_... or Bearer <token>
Content-TypeYesapplication/json

Body

{
  "query": "web scraping tools",
  "options": {
    "language": "en-US",
    "region": "us-en",
    "timeRange": null,
    "maxResults": 30
  }
}

Parameters

ParameterTypeRequiredDefaultDescription
querystringYes-Search query (max 500 characters)
options.languagestringNo”tr-TR”Language code
options.regionstringNo""Region code (e.g., “us-en”, “de-de”)
options.timeRangestringNonullTime filter for results
options.maxResultsnumberNo30Maximum results (1-100)

Time Range Options

ValueDescription
nullAny time (default)
"d"Past 24 hours
"w"Past week
"m"Past month
"y"Past year

Region Examples

RegionCode
United Statesus-en
United Kingdomuk-en
Germanyde-de
Francefr-fr
Turkeytr-tr
Spaines-es

Response

Success (200)

{
  "success": true,
  "data": {
    "query": "web scraping tools",
    "totalResults": 30,
    "results": [
      {
        "position": 1,
        "title": "Best Web Scraping Tools in 2024",
        "url": "https://example.com/scraping-tools",
        "snippet": "Discover the top web scraping tools for data extraction..."
      },
      {
        "position": 2,
        "title": "Web Scraping with Python - Complete Guide",
        "url": "https://example.com/python-scraping",
        "snippet": "Learn how to scrape websites using Python and BeautifulSoup..."
      }
    ],
    "timing": {
      "total": 1523
    },
    "creditsUsed": 1,
    "creditsRemaining": 998
  }
}

Response Fields

FieldTypeDescription
querystringYour search query
totalResultsnumberNumber of results returned
resultsarrayArray of search results
results[].positionnumberResult position (1-based)
results[].titlestringPage title
results[].urlstringPage URL
results[].snippetstringText snippet from the page
timing.totalnumberTotal search time in milliseconds
creditsUsednumberCredits charged (always 1)
creditsRemainingnumberYour remaining credit balance

Examples

curl -X POST https://api.crawlkit.com/api/v1/crawl/search \
  -H "Authorization: ApiKey ck_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"query": "python web scraping"}'

Search with Time Filter

Get results from the past month only:
curl -X POST https://api.crawlkit.com/api/v1/crawl/search \
  -H "Authorization: ApiKey ck_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "AI news",
    "options": {
      "timeRange": "m"
    }
  }'

Search with Region

Search for German results:
curl -X POST https://api.crawlkit.com/api/v1/crawl/search \
  -H "Authorization: ApiKey ck_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "beste restaurants",
    "options": {
      "language": "de-DE",
      "region": "de-de"
    }
  }'

Limit Results

Get only 10 results:
curl -X POST https://api.crawlkit.com/api/v1/crawl/search \
  -H "Authorization: ApiKey ck_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "machine learning tutorials",
    "options": {
      "maxResults": 10
    }
  }'

Error Responses

Invalid Query (400)

{
  "success": false,
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Query is required and must be 1-500 characters"
  }
}

Unauthorized (401)

{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

Insufficient Credits (402)

{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_CREDITS",
    "message": "You have 0 credits remaining"
  }
}

Use Cases

Market Research

Find competitors and industry trends

Content Discovery

Find articles and resources on any topic

Lead Generation

Find potential customers and contacts

SEO Analysis

See what ranks for specific keywords

Tips

More specific queries return more relevant results. Instead of “shoes”, try “running shoes for beginners”.
Use search to find URLs, then use the Raw Crawl endpoint to fetch the full page content.
When searching for current events, use timeRange: "d" or timeRange: "w" to get recent results.