API Reference
POST /search
Run a Google search and return the top organic results.
POST https://request.usestring.ai/v1/searchRequest body
| Field | Type | Description |
|---|---|---|
query | string | Required. 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."
}
]
}| Field | Type | Description |
|---|---|---|
position | integer | 1-based rank on the results page. |
title | string | Result title. |
url | string | Destination URL. |
displayUrl | string | Human-readable URL shown beneath the title. |
snippet | string | Result description text. |
Status codes
| Status | Meaning |
|---|---|
200 | Search completed. |
400 | Validation error (e.g. missing query). |
401 | Missing or invalid API key. |
402 | Insufficient account balance. |
429 | Rate limit exceeded. |
500 | Internal error. |
See Search overview for billing.