String Web Access API
API Reference

POST /search

Run a Google search and return the top organic results.

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

Request body

FieldTypeDescription
querystringRequired. The search query to run against Google.
curl https://request.usestring.ai/v1/search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "best coffee shops in san francisco" }'

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 (e.g. missing query).
401Missing or invalid API key.
402Insufficient account balance.
429Rate limit exceeded.
500Internal error.

See Search overview for billing.