Lovely RouterDocs
Get a key
Data tools

Data tools

Pay-per-result scrapers, search and enrichment tools your code or agent can call with the same key and balance as the Models API.

Data tools return structured data from the web: web search results, any web page as Markdown, Google Maps places, TikTok comments, LinkedIn profiles, Amazon reviews, job listings. You find a tool, send it a JSON input, and get JSON results back. Each run is billed from your prepaid balance: a per-call fee plus a per-result fee, never more than the cap you set.

There is no separate account or subscription. The API key you use for models works for tools, and tool spend counts toward the same balance and key spend limits.

Try it#

The catalog is public. List it without a key:

cURL
curl https://lovelyrouter.com/v1/tools

Running a tool needs a key. This run finds up to 20 coffee shops in Austin and costs at most $0.00551:

cURL
curl https://lovelyrouter.com/v1/tools/google-maps-places/run \
  -H "Authorization: Bearer $LOVELY_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "input": {"searchTerms": ["coffee shop"], "location": "Austin, Texas, USA"},
    "max_results": 20
  }'

The response holds the run's status, what it cost and the results in items. Run a tool covers long runs, polling and pagination.

What's in the catalog#

Every tool belongs to one category. Filter by its id with GET /v1/tools?category=reviews, or browse them on the tools page.

CategoryIdExample tools
Social mediasocial-mediatiktok-search, instagram-posts, youtube-transcript, x-search, reddit-search, linkedin-posts
Search & SEOsearchgoogle-search, google-maps-places, google-news, google-trends, facebook-ads, website-traffic
E-commerceecommerceamazon-product, amazon-bestsellers, ebay-sold, aliexpress-products, facebook-marketplace
Leads & enrichmentlead-generationlinkedin-profile, linkedin-company, google-maps-leads, website-contacts, email-verify
Reviewsreviewsgoogle-maps-reviews, amazon-reviews, trustpilot-reviews, app-store-reviews, g2-reviews
Jobsjobslinkedin-jobs, indeed-jobs, glassdoor-jobs, upwork-jobs, career-site-jobs
Travel & real estatetravelbooking-hotels, airbnb-listings, zillow-listings, tripadvisor-places, google-flights
Web extractionwebweb-fetch, website-crawl, website-screenshot, browser-agent

Tools are added over time. GET /v1/tools and the tools page always show the current list.

How pricing works#

Each tool has two prices, either of which can be zero:

  • Per-call fee, charged once for a run that succeeds.
  • Per-result fee, charged for each result the run returns. The unit depends on the tool: a place, a review, a page, a profile.

A run costs:

Text
per-call fee + per-result fee × results returned

Some examples at today's prices:

ToolPriceExample run
google-maps-places$0.000238 / place + $0.00075 / call20 places: $0.00551
trustpilot-reviews$0.0015 / review + $0.0075 / call20 reviews: $0.0375
google-trends$0.039 / callAny successful run: $0.039

Prices can change. The tools page and GET /v1/tools show the live price of every tool in its price object.

Cap the cost with max_results#

Every run has a result cap, max_results. A run never returns or bills more results than its cap. When you leave it out, the tool's default_results applies, and you can raise it up to the tool's own max_results.

So the most a run can cost is known before it starts: per-call fee + per-result fee × max_results.

Hold, then settle#

  1. Hold. When a run starts, its maximum cost is reserved from your balance. If your balance or the key's spend limit can't cover it, the run is refused with 402 and nothing is charged. Lower max_results or top up.
  2. Settle. When the run ends, it is charged for what it actually returned, and the rest of the hold goes back to your balance.

A Google Maps search capped at 20 places holds $0.00551. If 14 places come back, you pay $0.004082 and $0.001428 returns to your balance.

Failed and stopped runs#

OutcomeYou pay
succeededPer-call fee + per-result fee × results
failed or timed_outPer-result fee for results delivered before it ended. No per-call fee.
stopped (you stopped it)Per-result fee for results delivered before it stopped. No per-call fee.
Refused at start (bad input, tool unavailable)Nothing

A failed run that returned no results costs nothing. Every run and its charge appears in Tools in your dashboard.

The life of a run#

  1. Find a tool

    List or search the catalog, or describe your task to the planner. See Find the right tool.

  2. Read its input schema

    GET /v1/tools/{id} returns the tool's input_schema, an example_input and its price.

  3. Start the run

    POST /v1/tools/{id}/run with your input and a max_results cap. The maximum cost is held from your balance.

  4. Wait or poll

    The request waits up to 60 seconds by default. A run that finishes in time comes back with 200 and its results. A longer run comes back with 202, and you poll GET /v1/tools/runs/{run_id} until it finishes.

  5. Settle and read results

    The finished run reports results, charge_usd and the data in items. Runs nobody polls are settled automatically within minutes, so a hold is never stuck.

Browser agent#

The browser agent is in the same catalog under the id browser-agent. Give it a goal and a start URL and it works through the task in a real browser. It is billed per step instead of per result: max_results sets the maximum number of steps. For its full API, including logins, structured output and human approval, see Browser agent.

Limits#

LimitValue
Runs in progress per account10 (including browser-agent runs)
input size50,000 characters of JSON
wait per requestUp to 300 seconds
Results per runUp to the tool's max_results
Planner requests100 per minute per key

A run over the concurrency limit is refused with 429. Start it again once another run finishes.

Next steps#