> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reposeek.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Python

> Call Reposeek from Python using the standard library.

# Python

This example uses only Python's standard library.

```python theme={null}
import json
import os
import urllib.error
import urllib.request

body = json.dumps(
    {
        "query": "local AI assistant that remembers screen activity",
        "limit": 5,
        "filters": {
            "stars": {"min": 1000},
            "forks": {"min": 10},
            "license": ["MIT", "Apache-2.0"],
        },
    }
).encode("utf-8")
request = urllib.request.Request(
    "https://api.reposeek.ai/v1/search",
    data=body,
    headers={
        "Authorization": f"Bearer {os.environ['REPOSEEK_API_KEY']}",
        "Content-Type": "application/json",
    },
    method="POST",
)

try:
    with urllib.request.urlopen(request) as response:
        payload = json.loads(response.read().decode("utf-8"))
        request_id = response.headers.get("X-Request-Id")
        server_timing = response.headers.get("Server-Timing")
        print(json.dumps(payload, indent=2))
        if request_id:
            print(f"X-Request-Id: {request_id}")
        if server_timing:
            print(f"Server-Timing: {server_timing}")
except urllib.error.HTTPError as exc:
    payload = json.loads(exc.read().decode("utf-8"))
    print(json.dumps(payload, indent=2))
    raise SystemExit(exc.code)
```

Successful responses contain top-level `request_id` and `results`; each result includes `stars` and `forks`. The `X-Request-Id` header matches the JSON `request_id`.

The playground also includes an unfiltered `local AI assistant that remembers screen activity` example.

<a href="https://reposeek.ai/dashboard/playground?example=local-ai-screen-memory">Explore in API Playground</a>

Sign in to run this request from your dashboard.
