Tourist Framework
Project description
Tourist🤳
An open-source, low-cost, serverless application for SERP extraction and web scraping.
Work on LLM projects without worrying about credits, subscriptions, or rate-limits. Tourist is a free alternative to many mainstream SERP API services. Run Tourist on your machine or deploy it into your own AWS account.
[!IMPORTANT]
Tourist is in early development. Features and API's may change unexpectedly.
Overview
Tourist has both Service and Client components. The Service (HTTP API) handles requests from the Client (your app, agent, or scraper scripts). You're in control of both components! None of your data is ever processed or stored by third parties.
Service
Local deployment (for testing...)
[!TIP]
Docker is recommended for running Tourist locally to handle dependencies for headless browsing.
docker run -e X_API_KEY="whatever" -p 8000:8000 ghcr.io/pogzyb/tourist:latest
If the service came up correctly, you should see:
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
Check the docs at http://localhost:8000/docs
AWS deployment (for real...)
Prerequisites:
- AWS Account and Credentials
- S3 Bucket for storing an OpenTofu statefile
- Docker Daemon
Read about the deployment container in the deploy/ folder.
Example deployment command:
docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
--env-file .env \
ghcr.io/pogzyb/tourist-deploy:latest \
apply \
-b tourist-statefile \
-k SeCretTK3y
Use your endpoint: https://xxxxxxxx.lambda-url.us-east-1.on.aws (available the deployment outputs)
[!WARNING]
Tourist uses serverless infrastructure to keep costs extremely low; however these costs will not be $0.00 depending on how heavily you use your API.
[!IMPORTANT]
Tourist uses the X-API-KEY authorization header to protect your API, you should set this value when deploying.
Client
Build your own LLM tools, web scraping apps, or automated testing workflows with the Tourist client.
Python
You can use the python client to interact with your Tourist service. Check out the examples folder for the complete code.
pip install tourist
LLM Tools
For example, create a LangChain Tool for your LLM Agent.
from tourist.core import TouristScraper
from langchain_core.tools import tool
# Assumes you're running locally,
# change this to your cloud endpoint if you've deployed via terraform.
scraper = TouristScraper(
"http://localhost:8000",
x_api_key="doesntmatterlocally", # authorization secret
)
@tool
def search_tool(query: str) -> str:
"""
A search tool.
Useful for when you need to answer questions about current events, people, places, or things.
Input should be a search query.
"""
return scraper.get_serp(query, max_results=3):
# ... use the tools
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tourist-0.3.0.tar.gz.
File metadata
- Download URL: tourist-0.3.0.tar.gz
- Upload date:
- Size: 366.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d785cb619bf72768a18aba8009cfe810314d79ea56a62fd2c9475f938956bee2
|
|
| MD5 |
3ab8b64003bb25db640abf6303136bfc
|
|
| BLAKE2b-256 |
c08ee9b42f83e3c34c2fa2ac355609fd83cc4366de63849bf65e4567ed21d955
|
File details
Details for the file tourist-0.3.0-py3-none-any.whl.
File metadata
- Download URL: tourist-0.3.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8469ccb0a20186e9ea8981d4aaa44dae96db58eba19b7bbb0e34ada4d02205b
|
|
| MD5 |
05bf82eb998a2bd59dcf632538c1fcc1
|
|
| BLAKE2b-256 |
ffced9cc7443b35801c42a6c21a6ea436d40182b4f922eaca43e71e41e225e73
|