Agentic Platform
Documentation API reference Tools Skills

Tools

Push items to a PageWorkers optimization

pageworkers_push_items_to_optimization MCP Collaboration

Run a SQL query, generate a CSV, and upload it to a PageWorkers optimization via the Activation API.

This agent executes a BigQuery SQL query, converts the results into a CSV file, obtains a signed upload URL from the Activation API, and uploads the CSV to the optimization module's dataset. Always prefix tables with "catalog." (e.g. catalog.crawl_pages_20251201).

Playground

POST
item
module_id required

The stable ID of the PageWorkers optimization module to push items to

query required

BigQuery SQL query whose results will be exported as CSV and uploaded to the optimization. Prefix tables with "catalog." (e.g. catalog.crawl_pages_20251201).

Credits

Fixed cost per item requested, plus the data scanned by the query that selects the URLs to push. A narrower query scans less.

These usage SKUs can be charged on a call.

SKU Credits Description
Tool call 1 per request Charged once per successful item, on top of any usage below.
Data scanned 6,250 per TiB scanned Analytical queries are billed on the volume of data the query reads, not on the rows it returns: a narrow filter over a large table can still scan the whole table.

Schemas

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

Item

object
Properties
module_id string required

The stable ID of the PageWorkers optimization module to push items to

query string required

BigQuery SQL query whose results will be exported as CSV and uploaded to the optimization. Prefix tables with "catalog." (e.g. catalog.crawl_pages_20251201).

Example
{
  "module_id": "string",
  "query": "string"
}

Response

object

Output of the PageWorkers push-items-to-optimization agent.

Properties
websiteId string required

The website ID

module_id string required

The optimization module stable ID

filename string required

The filename of the uploaded CSV

row_count integer required

Number of rows exported and uploaded

message string required

Message about the operation

Example
{
  "websiteId": "string",
  "module_id": "string",
  "filename": "string",
  "row_count": 0,
  "message": "string"
}

Endpoints

POST http://agents.botify.com/{organization}/{project}/pageworkers_push_items_to_optimization/process
POST http://agents.botify.com/{organization}/{project}/pageworkers_push_items_to_optimization/batch_process
POST http://agents.botify.com/{organization}/{project}/pageworkers_push_items_to_optimization/async_process
POST http://agents.botify.com/{organization}/{project}/pageworkers_push_items_to_optimization/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}/pageworkers_push_items_to_optimization/process" \
  -H "Authorization: Bearer $BOTIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "item": {
    "module_id": "<module_id>",
    "query": "<query>"
  }
}'

Over MCP

This tool is exposed as the MCP tool pageworkers_push_items_to_optimization. An MCP client passes organization, project and item as tool arguments. Set up MCP →

Raw metadata