Metadata-Version: 2.4
Name: llama-index-tools-synoppy
Version: 0.1.0
Summary: Synoppy tool spec for LlamaIndex — give your agent the whole web: read, search, crawl, map, extract, classify, enrich, images, and screenshot on one key.
Project-URL: Homepage, https://synoppy.com
Project-URL: Documentation, https://synoppy.com/docs
Project-URL: Repository, https://github.com/Synoppy/synoppy-llama-index
Author-email: Saanora <support@synoppy.com>
License: MIT
License-File: LICENSE
Keywords: agents,llama-index,llamaindex,llm,rag,synoppy,tools,web-scraping,web-search
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: llama-index-core>=0.11
Requires-Dist: synoppy>=1.1.1
Description-Content-Type: text/markdown

# llama-index-tools-synoppy

[![PyPI](https://img.shields.io/pypi/v/llama-index-tools-synoppy.svg)](https://pypi.org/project/llama-index-tools-synoppy/) [![license](https://img.shields.io/pypi/l/llama-index-tools-synoppy.svg)](./LICENSE)

**Give your LlamaIndex agent the whole web.** A [Synoppy](https://synoppy.com) tool spec for [LlamaIndex](https://docs.llamaindex.ai) — read, search, crawl, map, extract, classify, enrich, screenshot, and pull images from the live web, all on one key.

[**Get a free key →**](https://synoppy.com/dashboard) · [Docs](https://synoppy.com/docs) · [synoppy.com](https://synoppy.com)

## Install

```bash
pip install llama-index-tools-synoppy
```

## Quickstart

```python
from llama_index.tools.synoppy import SynoppyToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

tools = SynoppyToolSpec(api_key="syn_live_...").to_tool_list()

agent = FunctionAgent(tools=tools, llm=OpenAI(model="gpt-4o"))
response = await agent.run("Find the top HN story, read it, and summarize it.")
print(response)
```

`SynoppyToolSpec(...).to_tool_list()` returns one LlamaIndex tool per endpoint.

## Tools

| Tool | Endpoint | What it does |
| --- | --- | --- |
| `read` | `/api/scrape` | URL → clean markdown (nav/ads stripped) |
| `search` | `/api/search` | Ranked live-web results, optionally read to markdown |
| `crawl` | `/api/crawl` | Crawl a site → markdown per page (RAG ingest) |
| `map` | `/api/map` | Every URL on a domain |
| `extract` | `/api/extract` | Page → structured JSON from a prompt |
| `classify` | `/api/classify` | NAICS/SIC industry codes, or custom labels |
| `enrich` | `/api/brand` | Domain / email → brand profile (logo, colors, fonts, socials) |
| `images` | `/api/images` | Every image on a page + alt text |
| `screenshot` | `/api/screenshot` | URL → PNG (base64 data URL) for vision models |

Each tool returns a compact dict plus `creditsUsed`, and hands back `{"error", "code"}` on failure.

For typed extraction (a JSON Schema), custom timeouts, or raw responses, use the [`synoppy`](https://pypi.org/project/synoppy/) client directly.

MIT licensed · built by [Saanora](https://synoppy.com)
