Search1APIDocs

New API

Resell Search1API web search, news, page reading, maps and more through your New API gateway with the Search1API plugin from the New API plugin marketplace.

New API is an open-source AI gateway. The Search1API plugin, listed in the New API community plugin marketplace, adds Search1API's endpoints to the gateway: your users call them with a gateway token, and the gateway bills each request in your own prices.

The plugin is for gateway administrators. It runs inside New API and forwards requests to Search1API with the channel's API key. Your users never see the key.

Before you start

You need:

  • a New API deployment with task plugins, signed in as the Root administrator; and
  • a Search1API API key. Sign in at app.s1.dev, open API Keys, and create one. New accounts include free credits to test with.

Install the plugin

  1. In New API, open Task Plugins (/task-plugins) and make sure the task plugin switch at the top is on.
  2. Open Marketplace, choose the Community source, and search for Search1API.
  3. Pick the latest version, read the changelog, and choose Install and enable.

If your gateway has no Community source, add this index URL as a marketplace source:

https://www.newapi.ai/api/v1/community/index.json

The plugin's page in the web marketplace is newapi.ai/en/plugins.

Add a channel

  1. Create a channel of type Task Plugin (61) and bind the Search1API plugin.
  2. Paste your Search1API API key as the channel key.
  3. Leave the API address empty. The plugin fills in https://api.search1api.com.
  4. Add the models you want to sell. Each endpoint is its own model, so you can price, group and grant them separately.

If your upstream is another New API gateway that also has the plugin, use a New API (60) channel instead, with that gateway's address and token, and add the Search1API plugin to the channel.

Models and endpoints

Clients call the gateway with Search1API's own paths and JSON bodies, as described in the API reference, starting with Search. Every path is also served under /search1api, for example POST /search1api/search.

EndpointModelWhat it does
POST /searchsearch1api-searchWeb search, optionally reading the top result pages
POST /newssearch1api-newsNews search
POST /crawlsearch1api-crawlRead a web page as clean text
POST /asksearch1api-askSearch and answer a question with cited sources
POST /mapssearch1api-mapsGoogle Maps places
POST /sitemapsearch1api-sitemapList the links of a site
POST /trendingsearch1api-trendingTrending topics on a platform
POST /extractsearch1api-extractExtract structured data from a page with a JSON schema
POST /deepcrawlsearch1api-deepcrawlStart a crawl of a whole site

/search, /news and /crawl also accept a JSON array of up to 50 requests. A deep crawl returns a task id; poll GET /deepcrawl/status/{task_id} until status is completed.

Set prices

Every model has one usage field, credits: the Search1API credits a request uses. Set a price per credit for each model in the gateway's model pricing, for example:

tier("credits", u("credits") * 0.004)

This charges your users 0.004 USD per credit. Choose your own price.

A request uses the same credits it would use on Search1API directly:

EndpointCredits
/search, /news1 per query, plus 1 for each result page read with crawl_results
/crawl1 per URL
/ask5
/maps3 per page
/extract10
/deepcrawl20 per started crawl; status checks are free
/sitemap, /trending1

See Credits and limits for details. The gateway reserves the most a request can cost, then settles to the credits Search1API reports for it, so a result page that could not be read is not billed. Failed requests are not billed. Through an upstream New API gateway the charge is not reported back, so requests settle at the reserved amount.

Call it

curl https://your-gateway.example.com/search \
  -H "Authorization: Bearer sk-your-gateway-token" \
  -H "Content-Type: application/json" \
  -d '{"query": "latest AI chip export rules", "max_results": 5, "crawl_results": 2}'

The response is Search1API's own response. Errors come back in Search1API's format.

SDKs, CLI and MCP

The official SDKs and the MCP server work through the gateway: set their base URL to https://your-gateway.example.com/search1api and use a gateway token as the API key. For the local MCP server, set SEARCH1API_API_URL:

SEARCH1API_KEY="sk-your-gateway-token" \
SEARCH1API_API_URL="https://your-gateway.example.com/search1api" \
npx -y search1api-mcp

Limits

  • Request bodies must be JSON.
  • Screenshots and the compatibility endpoints are not served by the plugin.
  • Requests are subject to the gateway's timeout. Large batches with many page reads can take more than a minute.

On this page