PHPackages                             shipfastlabs/toolkit-tavily - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. shipfastlabs/toolkit-tavily

ActiveLibrary[Search &amp; Filtering](/categories/search)

shipfastlabs/toolkit-tavily
===========================

Tavily tools for the Laravel AI SDK - Search, Extract, Crawl, and Map

1.0.0(2d ago)00MITPHPPHP ^8.4.0

Since Jun 7Pushed 2d agoCompare

[ Source](https://github.com/shipfastlabs/toolkit-tavily)[ Packagist](https://packagist.org/packages/shipfastlabs/toolkit-tavily)[ RSS](/packages/shipfastlabs-toolkit-tavily/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

shipfastlabs/toolkit-tavily
===========================

[](#shipfastlabstoolkit-tavily)

[![Latest Version](https://camo.githubusercontent.com/a0afd38490dc8ce04ec7ff61f624b978961b3918a8a3f944891d5f1cfc8a78d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73686970666173746c6162732f746f6f6c6b69742d746176696c792e737667)](https://packagist.org/packages/shipfastlabs/toolkit-tavily)[![Total Downloads](https://camo.githubusercontent.com/40e507736eff691c4b4245662db594a242fe0ecc4dbc69e5ff4ce9dd2a3b80f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73686970666173746c6162732f746f6f6c6b69742d746176696c792e737667)](https://packagist.org/packages/shipfastlabs/toolkit-tavily)

> Tavily tools for the Laravel AI SDK - Search, Extract, Crawl, and Map

Part of the [shipfastlabs/toolkit](https://github.com/shipfastlabs/toolkit) catalog of reusable AI tools for the Laravel AI SDK.

Installation
------------

[](#installation)

```
composer require shipfastlabs/toolkit-tavily
```

Usage
-----

[](#usage)

Register every Tavily tool at once with the `Tavily` helper:

```
use Shipfastlabs\Toolkit\Tavily\Tavily;

$tools = Tavily::all(); // Collection
```

Or add individual tools to an agent's `tools()`:

```
use Shipfastlabs\Toolkit\Tavily\TavilySearch;
use Shipfastlabs\Toolkit\Tavily\TavilyExtract;
use Shipfastlabs\Toolkit\Tavily\TavilyCrawl;
use Shipfastlabs\Toolkit\Tavily\TavilyMap;

$tools = [
    new TavilySearch,
    new TavilyExtract,
    new TavilyCrawl,
    new TavilyMap,
];
```

Tools
-----

[](#tools)

### TavilySearch

[](#tavilysearch)

Search the web for real-time information.

ParameterTypeRequiredDescription`query`stringyesThe search query to look up on the web.`max_results`integernoMaximum number of search results to return (1-10). Defaults to 5.`search_depth`stringno`"basic"` for fast results or `"advanced"` for comprehensive. Defaults to `"basic"`.`include_answer`booleannoWhether to include a concise AI-generated answer. Defaults to false.### TavilyExtract

[](#tavilyextract)

Extract clean, structured content from URLs.

ParameterTypeRequiredDescription`urls`stringyesA single URL or comma-separated URLs to extract content from.`query`stringnoOptional query to rerank extracted chunks by relevance.`extract_depth`stringno`"basic"` or `"advanced"`. Defaults to `"basic"`.`format`stringno`"markdown"` or `"text"`. Defaults to `"markdown"`.`include_images`booleannoWhether to include images extracted from URLs. Defaults to false.### TavilyCrawl

[](#tavilycrawl)

Intelligently crawl a website and extract content.

ParameterTypeRequiredDescription`url`stringyesThe root URL to begin the crawl from.`instructions`stringnoOptional natural language instructions for the crawler.`max_depth`integernoMaximum crawl depth (1-5). Defaults to 1.`max_breadth`integernoMaximum links to follow per page (1-500). Defaults to 20.`limit`integernoTotal number of links to process. Defaults to 50.`extract_depth`stringno`"basic"` or `"advanced"`. Defaults to `"basic"`.`allow_external`booleannoWhether to allow crawling external domains. Defaults to false.### TavilyMap

[](#tavilymap)

Discover and map a website's structure.

ParameterTypeRequiredDescription`url`stringyesThe root URL to begin the mapping from.`instructions`stringnoOptional natural language instructions for the crawler.`max_depth`integernoMaximum map depth (1-5). Defaults to 1.`max_breadth`integernoMaximum links to follow per page (1-500). Defaults to 20.`limit`integernoTotal number of links to process. Defaults to 50.`allow_external`booleannoWhether to allow crawling external domains. Defaults to false.Provider setup
--------------

[](#provider-setup)

All tools read their API credentials from Laravel's `services` config and their optional defaults from the `ai` config.

### 1. Add the Tavily service to `config/services.php`

[](#1-add-the-tavily-service-to-configservicesphp)

```
// config/services.php

return [

    // ... existing services ...

    'tavily' => [
        'key' => env('TAVILY_API_KEY'),
    ],

];
```

### 2. Add toolkit defaults to `config/ai.php`

[](#2-add-toolkit-defaults-to-configaiphp)

```
// config/ai.php

return [

    // ... existing laravel/ai config ...

    'toolkit' => [
        'tavily' => [
            'search' => [
                'max_results' => (int) env('TAVILY_SEARCH_MAX_RESULTS', 5),
                'search_depth' => env('TAVILY_SEARCH_DEPTH', 'basic'),
                'include_answer' => (bool) env('TAVILY_SEARCH_INCLUDE_ANSWER', false),
            ],
            'extract' => [
                'extract_depth' => env('TAVILY_EXTRACT_DEPTH', 'basic'),
                'format' => env('TAVILY_EXTRACT_FORMAT', 'markdown'),
            ],
            'crawl' => [
                'max_depth' => (int) env('TAVILY_CRAWL_MAX_DEPTH', 1),
                'max_breadth' => (int) env('TAVILY_CRAWL_MAX_BREADTH', 20),
                'limit' => (int) env('TAVILY_CRAWL_LIMIT', 50),
                'extract_depth' => env('TAVILY_CRAWL_EXTRACT_DEPTH', 'basic'),
            ],
            'map' => [
                'max_depth' => (int) env('TAVILY_MAP_MAX_DEPTH', 1),
                'max_breadth' => (int) env('TAVILY_MAP_MAX_BREADTH', 20),
                'limit' => (int) env('TAVILY_MAP_LIMIT', 50),
            ],
        ],
    ],

];
```

### 3. Add environment variables to `.env`

[](#3-add-environment-variables-to-env)

```
TAVILY_API_KEY=tvly-your-key-here

# Search defaults
TAVILY_SEARCH_MAX_RESULTS=5
TAVILY_SEARCH_DEPTH=basic
TAVILY_SEARCH_INCLUDE_ANSWER=false

# Extract defaults
TAVILY_EXTRACT_DEPTH=basic
TAVILY_EXTRACT_FORMAT=markdown

# Crawl defaults
TAVILY_CRAWL_MAX_DEPTH=1
TAVILY_CRAWL_MAX_BREADTH=20
TAVILY_CRAWL_LIMIT=50
TAVILY_CRAWL_EXTRACT_DEPTH=basic

# Map defaults
TAVILY_MAP_MAX_DEPTH=1
TAVILY_MAP_MAX_BREADTH=20
TAVILY_MAP_LIMIT=50
```

Config keyEnv varDefaultDescription`services.tavily.key``TAVILY_API_KEY`-**Required.** Your Tavily API key.`ai.toolkit.tavily.search.max_results``TAVILY_SEARCH_MAX_RESULTS``5`Default search results (1-10).`ai.toolkit.tavily.search.search_depth``TAVILY_SEARCH_DEPTH``"basic"``"basic"` or `"advanced"`.`ai.toolkit.tavily.search.include_answer``TAVILY_SEARCH_INCLUDE_ANSWER``false`Default for AI-generated answer.`ai.toolkit.tavily.extract.extract_depth``TAVILY_EXTRACT_DEPTH``"basic"``"basic"` or `"advanced"`.`ai.toolkit.tavily.extract.format``TAVILY_EXTRACT_FORMAT``"markdown"``"markdown"` or `"text"`.`ai.toolkit.tavily.crawl.max_depth``TAVILY_CRAWL_MAX_DEPTH``1`Max crawl depth (1-5).`ai.toolkit.tavily.crawl.max_breadth``TAVILY_CRAWL_MAX_BREADTH``20`Max links per page (1-500).`ai.toolkit.tavily.crawl.limit``TAVILY_CRAWL_LIMIT``50`Total links to process.`ai.toolkit.tavily.crawl.extract_depth``TAVILY_CRAWL_EXTRACT_DEPTH``"basic"``"basic"` or `"advanced"`.`ai.toolkit.tavily.map.max_depth``TAVILY_MAP_MAX_DEPTH``1`Max map depth (1-5).`ai.toolkit.tavily.map.max_breadth``TAVILY_MAP_MAX_BREADTH``20`Max links per page (1-500).`ai.toolkit.tavily.map.limit``TAVILY_MAP_LIMIT``50`Total links to process.Safety
------

[](#safety)

- All tools validate required inputs before calling the API.
- Numeric parameters are clamped to their valid ranges.
- API errors are caught and returned as friendly string messages.
- Requires a valid Tavily API key.

Tavily API
----------

[](#tavily-api)

These tools use the Tavily API. Tavily offers a generous free tier with 1,000 API credits per month.

Full API reference:

- [Search Endpoint](https://docs.tavily.com/documentation/api-reference/endpoint/search)
- [Extract Endpoint](https://docs.tavily.com/documentation/api-reference/endpoint/extract)
- [Crawl Endpoint](https://docs.tavily.com/documentation/api-reference/endpoint/crawl)
- [Map Endpoint](https://docs.tavily.com/documentation/api-reference/endpoint/map)

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance99

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31663512?v=4)[Pushpak Chhajed](/maintainers/pushpak1300)[@pushpak1300](https://github.com/pushpak1300)

---

Top Contributors

[![pushpak1300](https://avatars.githubusercontent.com/u/31663512?v=4)](https://github.com/pushpak1300 "pushpak1300 (2 commits)")

---

Tags

ailaravellaravel-aitoolsearchlaravelaitoolmapextractcrawltavily

### Embed Badge

![Health badge](/badges/shipfastlabs-toolkit-tavily/health.svg)

```
[![Health](https://phpackages.com/badges/shipfastlabs-toolkit-tavily/health.svg)](https://phpackages.com/packages/shipfastlabs-toolkit-tavily)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[illuminate/database

The Illuminate Database package.

2.8k54.1M11.0k](/packages/illuminate-database)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

936572.3k2](/packages/mailerlite-laravel-elasticsearch)[moonshine/moonshine

Laravel administration panel

1.3k239.9k72](/packages/moonshine-moonshine)[algolia/scout-extended

Scout Extended extends Laravel Scout adding algolia-specific features

4186.6M6](/packages/algolia-scout-extended)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
