How to find out number of file search tool calls to calculate price of Response API

I’m trying to calculate the total price of query to response API. I know I can get number of input and output tokens. However to calculate total price, I need to find out the number of tool calls as well.

Is there a way to get from Response API information on how many calls to file search tool were made?

Did you find the answer for this? If I use my custom tool - then would there still be a charge for the tool call?

Currently, the Responses API does not expose an explicit count of tool calls.

To calculate pricing, you need to count tool calls client-side by inspecting response.output and counting entries with type: “tool_call” (e.g. file_search).

OpenAI charges separately only for built-in tools like file_search.

Custom tools do not incur additional OpenAI charges beyond token usage.