Metadata-Version: 2.2
Name: simlir
Version: 0.1.3
Summary: Typed Python client for the simlir public product API
Author: simlir engineering
License: Copyright 2026 simlir Ltd
        
        Licensed under the Apache License, Version 2.0 (the "License");
        you may not use this file except in compliance with the License.
        You may obtain a copy of the License at
        
            http://www.apache.org/licenses/LICENSE-2.0
        
        Unless required by applicable law or agreed to in writing, software
        distributed under the License is distributed on an "AS IS" BASIS,
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        See the License for the specific language governing permissions and
        limitations under the License.
        
Keywords: product data,product search,shopping api,gtin,sku,ai
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE

# simlir

Search and look up products with Simlir's typed Python client.

## Start

1. [Create an account and API key](https://simlir.com/dashboard/sign-up).
2. Install the client:

```bash
python -m pip install simlir
```

3. Keep `SIMLIR_API_KEY` in your server environment and make a search:

```python
import os
from simlir import Simlir

client = Simlir(api_key=os.environ["SIMLIR_API_KEY"])
result = client.search(query="wireless headphones", market="GB", limit=5)

for product in result.results:
    print(product.title, product.price.amount, product.price.retailer)
```

Search and image-search calls need a market code: `GB`, `US`, `DE`, `FR`, `ES`, `IT`, `AU` or `CA`. First-party Simlir catalogue coverage is verified for GB; supplementary results may be available in other supported markets. Matches depend on relevance, filters and current catalogue coverage, and a supported code does not guarantee results or delivery. Each text/image discovery call relevance-checks up to 50 Simlir candidates and up to 50 additional partner catalogue candidates, then returns one combined result set. `limit` is the total cap (default and maximum 100); `offset` paginates that combined window. `ships_from` optionally selects up to 12 merchant-origin country codes (OR logic), defaulting to the selected market. Bounded query, market and filter details are sent to a partner product catalogue; image searches may also send image content. Product rows keep the Simlir shape without a provider field. Usable product pages are preferred, known tracking query parameters are removed, and a variant checkout link is used only when no usable product page URL is available; cart-shaped paths are treated as checkout links. See the [Privacy Policy](https://simlir.com/privacy) and [developer docs](https://simlir.com/docs) for details. Text search and exact identifier lookup cost 1 credit. Image search costs 2 credits.

## Other lookups

```python
exact = client.lookup(identifier="5051234567890", type="gtin", market="GB")
visual = client.search_by_image(
    image_url="https://example.com/product.jpg",
    market="GB",
    query="a compact fridge freezer with a water dispenser",
)
if result.results:
    product = client.get_product(id=result.results[0].id)
    print(product.title, product.price.amount, product.price.retailer)
```

For image search, use a publicly reachable HTTPS image URL. Add `query` when the image cannot show an important requirement, such as size, compatibility or intended use. Prices and stock can change; check the retailer for current details.

## More

- [SDK quickstart and response fields](https://simlir.com/docs#sdks)
- [REST endpoints](https://simlir.com/docs#rest)
- [Costs and limits](https://simlir.com/docs#limits)
- [API and data terms](https://simlir.com/terms)

The SDK is Apache-2.0 licensed. That licence does not cover the hosted service or returned product data.

## Maintainers

```bash
python -m compileall -q src
python -m unittest discover -s tests -p 'test_*.py'
python -m pip wheel --no-deps --no-build-isolation --wheel-dir /tmp/simlir-python-sdk-wheel .
```
