Skip to Content
searchSDK

searchSDK vs calling providers directly

When to call a web search provider directly, and when searchSDK fits.

Calling a provider directly means using its own API or SDK. searchSDK is one interface over many. Both call the provider from your server; the difference is what you write and maintain.

Provider API or SDKsearchSDK
ShapeThe provider's ownOne for every provider, its body in raw
SwitchingRewrite the callsChange the provider id
FallbackYou write itOpt-in, in your order, every attempt recorded
CostFrom the provider's billingOn every response and attempt, with its source
FeaturesAll of them, as they shipThe options each provider's spec maps
StatusMaintained by the providerTypeScript on npm, Python from source; not verified against live APIs yet

When should you call a provider directly?

  • You use one provider and do not plan to change.
  • You need an option searchSDK does not map yet.
  • You want a published package the provider supports.

When does searchSDK fit?

  • You call more than one provider, or want to try several with the same code.
  • You want fallback when a provider is down, rate limited or out of quota.
  • You want to know what each attempt cost, retries included.

Can you use both?

Yes. raw keeps the provider's response and providerOptions passes options only one provider understands. A provider's own SDK can sit beside searchSDK in one app.

On this page