---
title: "Run a semantic web search with ranked results"
method: POST
path: "/api/v1/web/search"
tags: ["Web"]
---

# Run a semantic web search with ranked results

`POST /api/v1/web/search`

## Request

- Base URL: `https://glim.sh`
- URL: `https://glim.sh/api/v1/web/search`
- Auth: one of:
  - none
  - API key in header `x-api-key`
  - HTTP bearer
  - API key in query parameter `apiKey`

Semantic web search powered by Exa. Returns titles, URLs, and a query-relevant excerpt per result.

## Request body

- object
  - `query` string, required: Search query
  - `include_domains` string[]: Restrict results to these domains (e.g. ['arxiv.org'])
  - `exclude_domains` string[]: Exclude results from these domains. Useful for filtering noisy aggregators or SEO farms when you've seen them dominate results (e.g. ['pinterest.com', 'quora.com']).
  - `published_within_days` integer: Restrict to results published within the last N days. Skip this for broad queries - it excludes pages without publish-date metadata. Common values: 1, 7, 30, 365.

## Response `200`

Search results

- object

## Other responses

- `400`: Bad Request
- `402`: Payment Required
- `502`: Upstream Error

---

[API](https://skmtc.dev/glim/apis/glim-sh.md) · [All operations](https://skmtc.dev/glim/apis/glim-sh/llms.txt) · [OpenAPI document](https://skmtc.dev/glim/apis/glim-sh/revisions/0094e5226d73?raw)
