The API.
Two endpoints, one shape. Send your key as a bearer token, POST JSON, read back ranked JSON. Learn search and you know contents.
- Base URL
- https://damngoodsearch.com/api/v1/search
- Method
- POST
- Auth
- Authorization: Bearer <key>
Authenticate.
Every request carries your key as a bearer token. Create one in the dashboard, then send it on the Authorization header.
Get your API keyMake a request.
Send a POST with a JSON body. Only query is required.
curl -X POST https://damngoodsearch.com/api/v1/search \
-H "Authorization: Bearer dgs_live_..." \
-H "Content-Type: application/json" \
-d '{"query": "best espresso machines 2026"}'
| Field | Type | Required | Description |
|---|---|---|---|
| query | string | yes | The search query. |
Read the response.
Results come back ranked and deduplicated, the shape a tool call expects.
{
"query": "best espresso machines 2026",
"results": [
{
"title": "The 14 Best Espresso Machines of 2026",
"url": "https://www.seriouseats.com/best-espresso-machines",
"snippet": "Our favorite is the Breville Bambino Plus.",
"rank": 1,
"source": "Serious Eats"
}
],
"related": ["best espresso machine for home", "best budget espresso machine"],
"count": 10,
"ms": 42
}
| Field | Type | Required | Description |
|---|---|---|---|
| query | string | yes | The query you sent, echoed back. |
| results | object[] | yes | Ranked, deduplicated results. See the result fields below. |
| related | string[] | yes | Related searches, useful for query expansion and follow-ups. |
| count | number | yes | Number of results returned. |
| ms | number | yes | Server-side response time in milliseconds. |
Each result contains:
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | yes | The result's title. |
| url | string | yes | The result's URL. |
| snippet | string | no | A short text summary of the result. May be empty when the source provides none. |
| rank | number | yes | 1-based position in the result set. |
| source | string | no | Publisher or site name, when known. |
| displayUrl | string | no | Human-readable breadcrumb for the URL. |
Fetch the page.
Search returns where to look. When you need the full text of a result, call contents with the URL. It comes back as clean markdown, billed separately so you only pay when you use it.
- Endpoint
- https://damngoodsearch.com/api/v1/contents
- Price
- $1.50 / 1,000
curl -X POST https://damngoodsearch.com/api/v1/contents \
-H "Authorization: Bearer dgs_live_..." \
-d '{"url": "https://example.com/article"}'
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | yes | The http(s) URL to fetch. |
The response:
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | yes | The URL you sent. |
| text | string | yes | The page's main content as clean markdown. |
| ms | number | yes | Server-side response time in milliseconds. |
Errors.
Failures come back as JSON with an error field and a matching status code.
| Status | Meaning |
|---|---|
| 400 | The request body was not valid JSON, or a required field (query or url) was missing. |
| 401 | The API key was missing, malformed, or revoked. |
| 402 | The monthly free limit was reached. Upgrade to keep going. |
| 502 | The endpoint was briefly unavailable. Retry the request. |
Rate limits.
Search and contents calls each count as one request. The free tier is 1,000 requests a month. Past that it is $1.50 per 1,000, no cap. Your live count is in the dashboard.
View your usage