> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.aventure.vc/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.aventure.vc/_mcp/server.

# Get one stored web search by document id

GET https://api.aventure.vc/v1/search/web/{documentId}

Fetch-by-id, NOT a search: rebuilds one historical web-search result from a stored source-document version (the resolved request and normalized items) identified by documentId. To run a search, use the search web operation. Requires the edit_cache permission.

Reference: https://docs.aventure.vc/api-reference/a-venture-api/search/get-web-search

## Authentication

- `Authorization` header (bearer token, required) — User bearer token: Supabase or Clerk session JWT, Clerk OAuth access token, or Clerk personal API key
- `X-API-Key` header (required) — Admin API key for system-to-system write operations

## Request

### Path parameters

- `documentId` (string, required) — Source document id

## Response

### 200

OK

- `document` (object, required) — Source-document ledger row backing this result
  - `cacheHitCount` (integer, required)
  - `createdAt` (datetime, required)
  - `documentType` (string, required)
  - `id` (string, required) — Document id
  - `provider` (string, required)
  - `sourceKey` (string, required) — Canonical fetch identity: canonical URL, query hash, or dataset + external id
  - `expiresAt` (datetime, optional, nullable)
  - `httpStatus` (integer, optional, nullable)
  - `lastAccessedAt` (datetime, optional, nullable)
  - `providerRequestId` (string, optional, nullable)
  - `rawByteCount` (long, optional, nullable)
  - `rawCharset` (string, optional, nullable)
  - `rawMediaType` (string, optional, nullable)
  - `upstreamContentEncoding` (string, optional, nullable)
- `result` (list of object, required) — Normalized result items in provider rank order
  - `relevanceScore` (double, required)
  - `snippet` (string, required)
  - `title` (string, required)
  - `url` (string, required)
- `search` (object, required) — Web search request represented by this result
  - `search` (string, required) — Search text sent to the upstream web search provider
  - `bypassCache` (boolean, optional, default: false) — Skip cache lookup and refresh from the search provider
  - `cacheKey` (string, optional, nullable) — Stable lookup text for cache keying when generated search text varies between runs
  - `language` (string, optional, nullable) — Search language code
  - `region` (string, optional, nullable) — Search region code
  - `resultLimit` (integer, optional, nullable) — Maximum number of normalized results to keep
  - `source` (string, optional, nullable) — Optional caller identity for source-document attribution and abuse triage. Any non-blank string up to 64 characters is accepted and persisted with the resolved request context.

## Examples

**Response**

```json
{
  "document": {
    "cacheHitCount": 1,
    "createdAt": "2024-01-15T09:30:00Z",
    "documentType": "string",
    "id": "string",
    "provider": "string",
    "sourceKey": "string",
    "expiresAt": "2024-01-15T09:30:00Z",
    "httpStatus": 1,
    "lastAccessedAt": "2024-01-15T09:30:00Z",
    "providerRequestId": "string",
    "rawByteCount": 1,
    "rawCharset": "string",
    "rawMediaType": "string",
    "upstreamContentEncoding": "string"
  },
  "result": [
    {
      "relevanceScore": 1.1,
      "snippet": "string",
      "title": "string",
      "url": "string"
    }
  ],
  "search": {
    "search": "OpenAI latest funding news",
    "bypassCache": false,
    "cacheKey": "OpenAI",
    "language": "en",
    "region": "us",
    "resultLimit": 5,
    "source": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.aventure.vc/v1/search/web/documentId"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.aventure.vc/v1/search/web/documentId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.aventure.vc/v1/search/web/documentId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.aventure.vc/v1/search/web/documentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.aventure.vc/v1/search/web/documentId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.aventure.vc/v1/search/web/documentId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.aventure.vc/v1/search/web/documentId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.aventure.vc/v1/search/web/documentId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```