String API
API Reference

POST /search

Search Google, DuckDuckGo, Brave, Mojeek, or Bing and return the top organic results.

POST https://request.usestring.ai/v1/search

Request body

FieldTypeDefaultDescription
querystringRequired. The search query to run.
enginestring"google"Search engine to query. "google", "duckduckgo", "brave", "mojeek", or "bing".
countrystring"US"ISO 3166-1 alpha-2 country code used to localize results.
languagestringOptional language tag such as "en" or "pt-br" for result language.

Any other field is rejected with a 400.

Country codes are case-insensitive and normalized to uppercase, so "gb" and "GB" behave the same way. Country and language apply to Google, DuckDuckGo, Brave, Mojeek, and Bing searches.

curl https://request.usestring.ai/v1/search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "construction consulting firms", "engine": "bing", "country": "GB", "language": "en" }'

Response

{
  "results": [
    {
      "position": 1,
      "title": "Example Result Title",
      "url": "https://example.com/page",
      "displayUrl": "https://example.com › page",
      "snippet": "A short description of the page as shown on the results page."
    }
  ]
}
FieldTypeDescription
positioninteger1-based rank on the results page.
titlestringResult title.
urlstringDestination URL.
displayUrlstringHuman-readable URL shown beneath the title.
snippetstringResult description text.

Status codes

StatusMeaning
200Search completed.
400Validation error (missing query, an invalid option, or an unrecognized field).
401Missing or invalid API key.
402Insufficient account balance.
403Provider verification challenge.
429Rate limit exceeded.
500Internal error.

See Search overview for billing.