Skip to content

Feature Request: Add TalorData SERP API as a search engine option #37

Description

@talordata-serp-api

Context: WebThinker currently supports Bing and Google Serper as search backends. Adding TalorData would give users a more cost-effective alternative with broader coverage.

Why TalorData?

  • $0.25/1K responses — vs Serper's $0.30/1K and Bing's ~$7/1K transactions
  • Covers Google, Bing, Yandex, and DuckDuckGo — all from one API
  • No token limits — pay per search, not per token
  • Simple REST API — POST to https://api.talordata.com/serp with JSON body, API key in header

Implementation reference (~80 lines, same pattern as the existing google_serper_search in scripts/search/bing_search.py):

import requests
import json

TALORDATA_URL = "https://api.talordata.com/serp"

def talordata_search(query: str, api_key: str, timeout: int = 20):
    payload = json.dumps({
        "q": query,
        "source": "google",  # google, bing, yandex, duckduckgo
        "num": 10
    })
    headers = {
        'Authorization': f'Bearer {api_key}',
        'Content-Type': 'application/json'
    }
    
    max_retries = 3
    retry_count = 0
    while retry_count < max_retries:
        try:
            response = requests.post(TALORDATA_URL, headers=headers, data=payload, timeout=timeout)
            response.raise_for_status()
            return response.json()
        except (requests.Timeout, requests.RequestException) as e:
            retry_count += 1
            if retry_count == max_retries:
                print(f"TalorData API error: {e}")
                return {}
            time.sleep(1)
    return {}

def extract_relevant_info_talordata(search_results):
    useful_info = []
    if 'organic' in search_results:
        for i, result in enumerate(search_results['organic']):
            info = {
                'id': i + 1,
                'title': result.get('title', ''),
                'url': result.get('link', ''),
                'site_name': result.get('source', ''),
                'date': result.get('date', ''),
                'snippet': result.get('snippet', ''),
                'context': ''
            }
            useful_info.append(info)
    return useful_info

Then in run_web_thinker.py, add "talordata" to --search_engine choices and add the conditional call + --talordata_api_key arg — exactly the same way google_serper_search_async is called. Users can get a free API key at https://talordata.com/?campaignid=xMIfqL3XwkpjRHGI&utm_source=WebThinker&utm_term=WebThinker

I'm happy to open a PR with the full implementation if that's easier. Happy to provide a test API key too.

Pricing comparison for your paper's reproducibility context:

  • TalorData: $0.25/1K searches → ~$25 for 100K queries (GPQA/GAIA benchmarks)
  • Serper: $0.30/1K → ~$30 for 100K queries
  • Bing: $7/1K transactions → ~$700 for 100K queries

This would make WebThinker significantly more affordable for academic research budgets and for users running large-scale evaluations.

Happy to discuss — our docs are at https://docs.talordata.com/serp-api/ and you can sign up for a free trial at https://talordata.com/?campaignid=xMIfqL3XwkpjRHGI&utm_source=WebThinker&utm_term=WebThinker

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions