Agentic Platform
Documentation API reference Tools Skills

Tools

Find Nearest Pages for Topic

nearest_page_for_topic

Get the nearest page for a given topic.

Find your five most relevant pages for a given topic from Google search results. This can help you evaluate your pages' relevance to identify internal linking opportunities and content optimization.

Playground

Your organization, project and token stay in this browser's local storage and are sent straight to the API — this page never sees them.

POST
item
topic required The topic to analyze.
country required The country to search for.

Billing

Fixed cost per topic requested, plus one set of search results for it, plus one model call for each of the top five results to judge how well it matches. A topic with fewer than five results costs proportionally less.

These usage SKUs can be charged on a call, including SKUs from tools this one may call.

SKU Credits Description Used by
Tool call 1 per request Charged once per successful item, on top of any usage below.
  • This tool
GPT-4o (standard), input 2,500 per million tokens Tokens the model reads from the prompt you send.
  • This tool
GPT-4o (standard), output 10,000 per million tokens Tokens the model writes in its answer.
  • This tool
GPT-4o (standard), read from cache 1,250 per million tokens Tokens the model reads from a cached prompt. Cheaper than a fresh read.
  • This tool
Search results (live) 2 per query One organic search-results page for one query, fetched while you wait.

Schemas

item is what you send, config how the tool behaves, and the response is what you get back.

Item

object
Properties
topic string required

The topic to analyze.

country string required

The country to search for.

Example
{
  "topic": "string",
  "country": "string"
}

Response

object
Properties
pages array required

List of evaluated topic pages.

Items: TopicPage

Example
{
  "pages": [
    {
      "url": "string",
      "title": "string",
      "description": "string",
      "relevance_score": 0.0,
      "explanation": "string"
    }
  ]
}

Type Definitions

1 type

These are the available sub-object types that can be used in the properties above.

TopicPage object
#
url string required

URL of the page.

title string required

Title of the page.

description string required

Description of the page.

relevance_score number required

Relevance score.

explanation string required

Explanation of the relevance score.

Endpoints

POST http://agents.botify.com/{organization}/{project}/nearest_page_for_topic/process
POST http://agents.botify.com/{organization}/{project}/nearest_page_for_topic/batch_process
POST http://agents.botify.com/{organization}/{project}/nearest_page_for_topic/async_process
POST http://agents.botify.com/{organization}/{project}/nearest_page_for_topic/async_batch_process

See running a long job in the background for the polling flow.

cURL

curl -X POST "http://agents.botify.com/{organization}/{project}/nearest_page_for_topic/process" \
  -H "Authorization: Bearer $BOTIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "item": {
    "topic": "<topic>",
    "country": "<country>"
  }
}'

Raw metadata