ChatGPT · Arazzo Workflow

ChatGPT Web Search Grounded Answer

Version 1.0.0

Answer a question with the built-in web search tool and return citations.

1 workflow 1 source API 1 provider
View Spec View on GitHub AgentsArtificial IntelligenceChatGPTEmbeddingsFine-TuningGPT-4GPT-5Language ModelOpenAIReal-TimeArazzoWorkflows

Provider

chatgpt

Workflows

web-search-answer
Generate a web-search-grounded answer and surface its citations.
Creates a response with the web_search_preview tool enabled, then retrieves the response with file/web search results included to extract the answer text and the first annotation citation.
3 steps inputs: apiKey, model, question outputs: answerText, citationTitle, citationUrl, responseId
1
createSearchResponse
createResponse
Create a stored response with the built-in web_search_preview tool so the model can ground its answer in live search results.
2
pollAnswer
getResponse
Poll the response while it is still generating, looping until it leaves the in_progress status.
3
retrieveAnswer
getResponse
Retrieve the completed response with web search results included to pull the answer text and the first URL citation annotation.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: ChatGPT Web Search Grounded Answer
  summary: Answer a question with the built-in web search tool and return citations.
  description: >-
    Uses the Responses API built-in web_search_preview tool to answer a
    current-events question. The response is created with the tool enabled,
    then retrieved to extract both the generated answer text and the URL
    citations the model attached as annotations. The flow branches when the
    response did not complete so callers can react to a failed or incomplete
    run. Every step spells out its request inline so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-610.60
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-610.60
      capability_name: Artificial Intelligence Management
      spec: chatgpt-responses-api-openapi.yml
      confidence: 0.7
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: responsesApi
  url: ../openapi/chatgpt-responses-api-openapi.yml
  type: openapi
workflows:
- workflowId: web-search-answer
  summary: Generate a web-search-grounded answer and surface its citations.
  description: >-
    Creates a response with the web_search_preview tool enabled, then
    retrieves the response with file/web search results included to extract
    the answer text and the first annotation citation.
  inputs:
    type: object
    required:
    - apiKey
    - model
    - question
    properties:
      apiKey:
        type: string
        description: OpenAI API key used as the Bearer credential.
      model:
        type: string
        description: Model ID used to generate the response (e.g. gpt-4o).
      question:
        type: string
        description: The current-events question to answer.
  steps:
  - stepId: createSearchResponse
    description: >-
      Create a stored response with the built-in web_search_preview tool so
      the model can ground its answer in live search results.
    operationId: createResponse
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiKey"
    requestBody:
      contentType: application/json
      payload:
        model: $inputs.model
        input: $inputs.question
        tools:
        - type: web_search_preview
        store: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      responseId: $response.body#/id
      status: $response.body#/status
    onSuccess:
    - name: completed
      type: goto
      stepId: retrieveAnswer
      criteria:
      - context: $response.body
        condition: $.status == "completed"
        type: jsonpath
    - name: notDone
      type: goto
      stepId: pollAnswer
      criteria:
      - context: $response.body
        condition: $.status != "completed"
        type: jsonpath
  - stepId: pollAnswer
    description: >-
      Poll the response while it is still generating, looping until it leaves
      the in_progress status.
    operationId: getResponse
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiKey"
    - name: response_id
      in: path
      value: $steps.createSearchResponse.outputs.responseId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
    onSuccess:
    - name: stillRunning
      type: goto
      stepId: pollAnswer
      criteria:
      - context: $response.body
        condition: $.status == "in_progress"
        type: jsonpath
  - stepId: retrieveAnswer
    description: >-
      Retrieve the completed response with web search results included to pull
      the answer text and the first URL citation annotation.
    operationId: getResponse
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiKey"
    - name: response_id
      in: path
      value: $steps.createSearchResponse.outputs.responseId
    - name: include
      in: query
      value:
      - file_search_call.results
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      answerText: $response.body#/output/0/content/0/text
      citationUrl: $response.body#/output/0/content/0/annotations/0/url
      citationTitle: $response.body#/output/0/content/0/annotations/0/title
  outputs:
    responseId: $steps.createSearchResponse.outputs.responseId
    answerText: $steps.retrieveAnswer.outputs.answerText
    citationUrl: $steps.retrieveAnswer.outputs.citationUrl
    citationTitle: $steps.retrieveAnswer.outputs.citationTitle

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/chatgpt-web-search-answer-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.