Metadata-Version: 2.4
Name: talordata-serp
Version: 0.1.3
Summary: A Python SDK for TalorData SERP API.
Author: TalorData SDK Contributors
Maintainer: TalorData SDK Contributors
License-Expression: MIT
Project-URL: Homepage, https://github.com/Talordata/talordata-serp-python
Project-URL: Documentation, https://docs.talordata.com/serp-api/send-your-first-request
Project-URL: Repository, https://github.com/Talordata/talordata-serp-python
Project-URL: Issues, https://github.com/Talordata/talordata-serp-python/issues
Keywords: talordata,serp,search,sdk,api
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: twine>=5.1; extra == "dev"
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

# TalorData Python Library

[TalorData](https://talordata.com/?campaignid=hiy46bmdwF990Hqs&utm_source=Github29&utm_term=Github29) official python SDK for integrating search data into your AI workflow, RAG / fine-tuning, or Python application. TalorData helps developers and AI applications connect to real-time, structured, and reliable search data through a single SERP API. With support for Google, Bing, News, Images, Shopping, Maps, Scholar, Trends, and more, TalorData makes it easier to build AI agents, search copilots, SEO workflows, and data-driven automations powered by live search results.

## Install

```plaintext
pip install talordata-serp
```

## Quick Start

Sign up at [TalorData](https://talordata.com/?campaignid=hiy46bmdwF990Hqs&utm_source=Github29&utm_term=Github29) and get your API key from the dashboard.

```plaintext
import os

from talordata_serp import Client

client = Client(api_token=os.getenv("TALORDATA_API_TOKEN"))

results = client.search(
    engine="google",
    q="pizza",
)

print(results["search_metadata"]["status"])
print(results["search_information"]["query_displayed"])
```

You can also set the token once in your shell:

```plaintext
export TALORDATA_API_TOKEN=your_token
```

Then use the top-level helper:

```plaintext
import talordata_serp

results = talordata_serp.search(q="pizza", engine="google")
print(results)
```

## Examples

Runnable examples are included in the directory:`examples/`

*   `examples/basic_search.py`
    
*   `examples/search_with_url.py`
    
*   `examples/html_output.py`
    

Run one with:

```plaintext
python examples/basic_search.py
```

## API Design

*   `Client(api_token=...)`: create a reusable client.
    
*   `client.search(...)`: send a form-encoded request to and parse JSON automatically.`POST``/serp/v1/request`
    
*   `client.search_json(...)`: same as , but always returns a plain .`search()``dict`
    
*   `client.search_html(...)`: return raw HTML/text output.
    
*   `talordata_serp.search(...)`: convenience helper for one-off requests.
    

## Example With URL

The official docs also show -based requests. The SDK supports that directly:`url`

```plaintext
from talordata_serp import Client

client = Client(api_token="your_token")

results = client.search(
    url="https://www.google.com/search",
    q="pizza",
    json=1,
)

print(results.as_dict())
```

## Notes

*   Auth uses the header.`Authorization: Bearer <token>`
    
*   Requests are sent as .`application/x-www-form-urlencoded`
    
*   The SDK targets the endpoint, where returns parsed JSON data, returns both and , and returns HTML.`serp/v1/request``json=1``json=2``html``json``json=3`
    
*   `json=1` is the default mode used by .`client.search(...)`
    
*   Boolean params are normalized to and to match common form API expectations.`"1"``"0"`
    

## Learn more

Explore TalorData SERP API integrations and use cases:

[Quick Start](https://talordata.com/?campaignid=hiy46bmdwF990Hqs&utm_source=Github29&utm_term=Github29)

[View Documentation](https://docs.talordata.com/serp-api/introduction)
