Pick the Better Web Search for Your AI

Compare Apify and Jina search results with an AI briefing script.

Introduction

30 Second Summary

Search results can look convincing while hiding thin evidence underneath. A weak source list gives an AI less useful material for its answer.

In this project, you will test Apify's RAG Web Browser against Jina AI Search using one shared query. A script will preserve each result set as JSON before one fixed LLM prompt produces two briefings for a scored comparison.

What You'll Build

When your script finishes, you'll see both briefings above a side-by-side table that reveals which search provider supplied stronger evidence for the price.

By the end of this project, you'll have:

  • A repeatable search test that sends the same query to both providers.
  • Two saved JSON result files that preserve 10 records from each provider for inspection.
  • A side-by-side comparison table showing sources found, failed extractions, extracted content length, and cost.
  • Secret Mission: An optional challenge to push your comparison skills further.

What do I need for this project?

You need free Apify and Jina accounts.

You also need Python or Node on your laptop. An LLM API key powers the briefing step.

Before We Start

This project depends on a fair comparison between two search providers. That comparison falls apart if your local tools or model access are missing.

This readiness check proves your computer can run the comparison script. It also proves that your chosen model can generate both briefings later.

In this step, get ready to:
  • Confirm Python runs from your terminal.
  • Prepare a code editor for the comparison script.
  • Confirm access to a briefing API over your internet connection.
Verify Python in your terminal

The terminal is where you will run the comparison script. Python needs to respond there before the project can rely on it.

  • Press Cmd+Space on macOS or the Windows key on Windows to open your search bar.
  • Search for the terminal application included with your operating system.
  • Open the first terminal result.
  • Display your installed Python version by running this command:
python --version

What does this command do?

  • The python --version command asks Python to print its version number.
  • A displayed version confirms that your terminal can reach the Python interpreter.

✔️ I see a Python version

Good. Your terminal can reach the runtime that powers the comparison script.

ⓧ Command not found

Your terminal cannot find Python yet. Install it before continuing.

  • Open the official Python downloads page in your browser.
  • Download the current installer for your operating system.
  • Run the downloaded installer.
  • Allow the installer to make Python available from your terminal if that option appears.
  • Close your terminal application.
  • Reopen your terminal from your operating system search.
  • Run the version command shown above.

You should now see a Python version number in the terminal.

Still Cannot Run Python?

Restart your computer if the installer completed but the terminal still cannot find Python.

Check whether your operating system installed Python under a different command name.

Help me diagnose my Python installation.

Prepare your code editor

A code editor gives you one place to write the script and inspect the saved JSON files. A quick typing check confirms the editor can accept changes before you create project files.

  • Choose the tab that matches your current editor setup.

✔️ I already have a code editor

  • Record the editor you plan to use: your code editor name.
  • Press Cmd+Space on macOS or the Windows key on Windows to open your search bar.
  • Type your code editor name into the search bar.
  • Press Enter to launch the editor.
  • Create a new untitled file using the editor's new-file control.
  • Type workspace ready into the untitled file.

You should see the test text in the editing area. This confirms that your editor is ready.

  • Delete the test text without saving the untitled file.

ⓧ I need a code editor

You can use any code editor that supports Python files. Choose one from its official publisher website.

  • Choose a code editor that supports Python files.
  • Open the editor's official website in your browser.
  • Download the installer for your operating system.
  • Run the downloaded installer.
  • Record the installed editor's name: your code editor name.

The editor is now installed. A small typing check confirms it opens correctly.

  • Press Cmd+Space on macOS or the Windows key on Windows to open your search bar.
  • Type your code editor name into the search bar.
  • Press Enter to launch the editor.
  • Create a new untitled file using the editor's new-file control.
  • Type workspace ready into the untitled file.

You should see the test text in the editing area.

  • Delete the test text without saving the untitled file.

Editor Still Will Not Open?

Confirm that you downloaded the installer for your operating system. Restart your computer if the installation completed but the editor does not appear in search.

Help me open my code editor.

Choose your briefing LLM

The briefing stage needs programmatic access to a large language model. You will send the same evidence and prompt to this model for both providers.

Keep This Access Check Safe

Billing settings can feel high-stakes. This check stops before you make a paid request.

You do not need to reveal an API key in this section. Keep every credential off screen.

  • Choose the LLM provider you plan to use for both briefings.
  • Open the provider's official API documentation in your browser.
  • Use the documentation link to open the provider's developer dashboard.
  • Create a developer account if you do not have one.
  • Sign in to your developer account.
  • Confirm that your account offers a way to create API credentials.
  • Open the provider's pricing page to check whether your planned test usage has a cost.
  • Record your chosen provider: your LLM provider.

Before the final check, picture which missing window would stop the comparison first.

  • Return to the terminal from your earlier Python check.
  • Confirm that the Python version output is visible.
  • Switch back to your code editor.
  • Confirm that an untitled editing area opens.
  • Return to the API documentation in your browser.
  • Refresh the page to confirm your internet connection is working.
  • Confirm that your signed-in account can access the provider's API area.

Your local workspace can run Python and accept code. Your browser can also reach the model service that produces the two briefings.

Your workspace is ready. Next, you will create accounts with Apify and Jina AI before connecting their search results to your script.

Create Accounts and Store API Keys

Each web search provider identifies your requests with an API key. This credential lets the provider connect usage to your account.

You will create free accounts for Apify and Jina AI. You will store both credentials in a local .env file so the comparison script can use them without placing secrets in source code.

In this step, get ready to:
  • Prepare an Apify account with a visible API token.
  • Prepare a Jina AI account with a visible API key.
  • Store both credentials in a private .env file.
Create your Apify account

Apify uses an API token to authorize actions under your account. The token gives your later script permission to retrieve Actor results.

Revealing this token is a sensitive moment. Treat it like a password because anyone who has it can use your account's API access.

  • Visit the Apify Console in your browser.
  • Create your free account through the sign-up flow.
  • Complete any email or identity-provider verification that appears.
  • Confirm the Apify Console dashboard loads after sign-in.
  • Select Settings in the left panel.
  • Select API & Integrations.
  • Reveal your personal API token if its value is masked.
  • Keep the API & Integrations page open in its browser tab.

You should see your personal API token on the API & Integrations page. Your Apify account is now ready to authorize the searches you run later.

Can't See Your Apify Token?

Finish any pending account verification before returning to the console. A sensitive settings page may also ask you to sign in again.

Return to Settings. Confirm that API & Integrations is selected.

Help me find my Apify API token without exposing it.

Create your Jina AI account

Jina AI gives new users an auto-generated key. The key authorizes Jina AI Search requests.

This credential also controls access under your account. Keep it visible only long enough to place it in your private local file.

  • Visit the Jina AI API key page in your browser.
  • Create your free account through the sign-up flow.
  • Complete any email or identity-provider verification that appears.
  • Return to the API key page after signing in.
  • Locate the auto-generated API key in the key manager.
  • Reveal the API key if its value is masked.
  • Keep the key manager open in its browser tab.

That's both provider accounts ready. Each dashboard now gives you a credential for the same comparison script.

Can't See Your Jina AI Key?

Confirm that you completed the account verification flow. Return to the API key page after your account is active.

Help me locate my Jina AI API key without revealing it.

Store both keys in .env

Environment variables let a program read configuration from outside its source file. Your .env file stores both credentials locally.

This part handles live credentials, so keep your screen private while you paste them. The file must stay off any public repository.

  • Return to your code editor from earlier.
  • Create a new plain-text file.
  • Save the file to your Desktop with the exact name .env.

You should see .env as the active file in your editor. The empty local file is now ready for both credentials.

  • Return to the Apify browser tab.
  • Copy the token from API & Integrations.
  • Return to .env in your code editor.
  • Set APIFY_TOKEN to the copied token on the first line using NAME=value format.

You should see one populated line beginning with APIFY_TOKEN.

  • Return to the Jina AI browser tab.
  • Copy the API key from the key manager.
  • Return to .env in your code editor.
  • Set JINA_API_KEY to the copied key on the second line using NAME=value format.
  • Save .env.

You should now see two populated lines in .env. Each credential has its own documented environment variable name.

Keep the File Private

Your .env file contains credentials that can authorize API usage. Keep the file on your computer.

  • Never upload .env to a public repository.
  • Never paste either credential into source code.
  • Rotate a credential from its provider dashboard if it is exposed.

Before you verify the setup, predict the two credential labels you expect to see in .env.

  • Return to the Apify API & Integrations page to confirm your personal token remains visible.
  • Return to the Jina AI key manager to confirm your API key remains visible.
  • Return to .env in your code editor.
  • Confirm the first credential label is APIFY_TOKEN.
  • Confirm the second credential label is JINA_API_KEY.
  • Check that each label has a non-empty value after its equals sign.

Your credential setup is complete. Both provider dashboards show their credentials while your private .env file stores local copies for the script.

Your accounts and credentials are ready. Next up, you will run Apify's RAG Web Browser on the first comparison query.

Run Apify RAG Web Browser

Your Apify credentials are stored privately in .env. This step creates the first evidence set for your provider comparison.

A list of search links gives your briefing model very little evidence. This run extracts the page content behind those links.

The RAG Web Browser runs as an Apify Actor. Each run stores the extracted content in a dataset for inspection.

In this step, get ready to:
  • Configure RAG Web Browser with your first query.
  • Run the Actor with a limit of 10 results.
  • Export the dataset as a local JSON file.
Configure the Actor input

The input fixes the query size before either provider is compared. Using the same result count keeps the later briefing test consistent.

  • Return to the browser tab where you signed in to Apify.
  • Open the official RAG Web Browser Actor page.
  • Select Try for free to load the Actor in Apify Console.
  • Confirm that the Input tab is active.
  • Enter <first query> in the query field.
  • Set maxResults to 10.

The input now targets one topic with a maximum of 10 search results. That fixed sample size becomes the baseline for Jina AI later.

  • Choose markdown under outputFormats.

Why Use Markdown Output?

Markdown keeps headings and links while removing much of the surrounding webpage markup. This gives the briefing model readable evidence without a large amount of page structure.

Before You Use Credits

Apify charges this Actor per event plus platform usage. This run is bounded by one query with a maximum of 10 fetched pages.

The finished run shows the amount charged. That value becomes part of your final comparison.

Run the search and inspect the cost

Before you start the run, how many dataset records do you expect the current input to produce?

  • Click Start.
  • Keep the run page open for several minutes while the Actor searches the web.
  • Select the Output tab after the run finishes.
  • Count the records shown in the dataset view.

You should see 10 records. Each record represents one search result considered by the Actor.

Good work. Your first provider has returned the ten-record evidence set for the comparison.

Why Keep Every Record?

Limited or empty extracted content remains evidence of retrieval quality. The raw dataset preserves that signal for later scoring.

  • Locate the amount charged in the completed run details.
  • Record the displayed value here: your Apify run cost.

Seeing Fewer Than 10 Records?

Return to the Input tab. Confirm that maxResults contains 10.

Run the Actor again if the first run failed before completing the search.

Help me troubleshoot my RAG Web Browser run.

Export the dataset

The Console dataset is useful for inspection. A local export gives the later script a stable input file.

  • Click Export in the Output tab.
  • Choose JSON as the export format.
  • Click Download.

Your browser downloads the full dataset as a JSON array.

  • Reveal the downloaded file in Finder on macOS or File Explorer on Windows.
  • Move the downloaded file into the local folder that already contains .env.
  • Rename the downloaded file to apify_results.json.

Before you inspect the file, do you expect the export to preserve all 10 records from the Console?

  • Switch back to your code editor from earlier.
  • Select apify_results.json in your editor's file sidebar.
  • Count the top-level objects in the JSON array.
  • Inspect one object for extracted web content plus source metadata.

You should see an array containing 10 objects. The records include web content plus details about their sources.

That export is now ready beside .env. Your comparison has its first local result set.

Can't Find the Complete Export?

Check your browser's download list for the most recent JSON file. Confirm that you exported from the completed run's Output tab.

Export the dataset again if the file contains fewer than 10 top-level objects.

Help me verify my Apify dataset export.

Your Apify evidence set is saved with its run cost recorded. Next, you will collect the matching result set from Jina AI.

Collect Jina Search Results

Your Apify RAG Web Browser evidence is already saved with 10 records. A fair comparison now needs a second result set built from the same query.

Jina AI Search returns source metadata with extracted page content. You will add a Python collector that requests 10 records through an API call.

In this step, get ready to:
  • Load the Jina API key from .env without printing it.
  • Request 10 Jina results for the first query.
  • Save the response as jina_results.json beside the Apify output.
Load your Jina credential

The collector needs your private key to authenticate each request. The script reads that key into memory without displaying its value.

  • Create compare_searches.py in the code editor from earlier.
  • Place compare_searches.py in the same folder as apify_results.json.
  • Add the credential loader by pasting this code into compare_searches.py:
# Use Python's standard library for files, JSON, environment values, and HTTP.
import json
import os
from pathlib import Path
from urllib.request import Request, urlopen

def load_env(path=".env"):
    # Load private values into this process without printing them.
    for line in Path(path).read_text(encoding="utf-8").splitlines():
        if not line or line.lstrip().startswith("#") or "=" not in line:
            continue
        key, value = line.split("=", 1)
        os.environ.setdefault(key.strip(), value.strip().strip("\"'"))

What does this code do?

  • The imports provide file access through Path. They also provide the tools needed for the later Jina request.
  • The load_env() function reads each assignment from .env.
  • The loader skips blank lines. It also skips comments.
  • The key values stay inside the running process. The function never prints them.
  • Save compare_searches.py.
  • Confirm that the loader finds your Jina credential by running this command:
python -c "import compare_searches; compare_searches.load_env(); print('JINA_API_KEY loaded:', bool(compare_searches.os.environ.get('JINA_API_KEY')))"

What does this check do?

The command runs load_env() before checking whether JINA_API_KEY exists. It prints only a Boolean result, so your credential remains private.

You should see JINA_API_KEY loaded: True in your terminal.

Seeing False?

  • Confirm that .env is in the same folder as compare_searches.py.
  • Confirm that the Jina credential uses the name JINA_API_KEY inside .env.
  • Keep the key value private while checking the file.

Help me diagnose why my Python script cannot load JINA_API_KEY from .env.

Request ten matching results

The request uses the same result count as the Apify run. This keeps the amount of evidence comparable before you score either provider.

  • Move to the end of compare_searches.py in your code editor.
  • Add the Jina request function by pasting this code below load_env():
def search_jina(query, api_key):
    # Request the same result count used for the Apify run.
    body = json.dumps({"q": query, "num": 10}).encode("utf-8")
    request = Request(
        "https://s.jina.ai/",
        data=body,
        headers={
            "Authorization": f"Bearer {api_key}",
            "Content-Type": "application/json",
            "Accept": "application/json",
        },
        method="POST",
    )
    with urlopen(request, timeout=90) as response:
        return json.load(response)

How does the request work?

  • The request body sends the learner-entered query through q.
  • The num value requests a maximum of 10 results.
  • The Authorization header authenticates the request with the key loaded from .env.
  • The response is parsed as JSON so the script can save structured records.
  • Save compare_searches.py.
  • Check the script for syntax errors by running this command:
python -m py_compile compare_searches.py

What does this check prove?

Python compiles the named file before any web request runs. A successful check returns you to the terminal prompt without a traceback.

Your request function is now valid Python code. The final chunk gives it a query and saves its response.

Seeing a syntax error?

  • Check that the lines inside search_jina() use the same four-space indentation.
  • Check that every opening parenthesis has a matching closing parenthesis.
  • Compare the quotation marks around each header with the code above.

Help me fix the syntax error in my search_jina() function.

Save the response beside the Apify output

The final section turns the two helper functions into a runnable collector. It also rejects incomplete result sets before they can weaken the comparison.

  • Move to the end of compare_searches.py in your code editor.
  • Add the runnable entry point by pasting this code below search_jina():
def main():
    # Read the private key only when the script starts.
    load_env()
    api_key = os.environ.get("JINA_API_KEY")
    if not api_key:
        raise RuntimeError("JINA_API_KEY is missing from .env")

    # Reuse the exact query so the two result sets stay comparable.
    query = input("Enter the same query used for Apify: ").strip()
    response = search_jina(query, api_key)
    results = response.get("data", response) if isinstance(response, dict) else response
    if not isinstance(results, list) or len(results) != 10:
        raise RuntimeError("Jina did not return exactly 10 results")

    # Save clean records beside the existing Apify export.
    output_path = Path("jina_results.json")
    output_path.write_text(
        json.dumps(results, indent=2, ensure_ascii=False),
        encoding="utf-8",
    )
    print(f"Saved {len(results)} Jina results to {output_path}.")

if __name__ == "__main__":
    main()

What does this code do?

  • The script checks for JINA_API_KEY before making a request.
  • The prompt captures the exact query used for the Apify run.
  • The result check stops an incomplete response from being treated as comparable evidence.
  • The final lines write the 10 records to jina_results.json.
  • Save compare_searches.py.

Before you run the collector, do you expect its saved record count to match the Apify export?

  • Run the completed collector with this command:
python compare_searches.py

What happens when this runs?

The script first waits for your query. After you enter it, the script sends one authenticated request to Jina AI Search.

  • Enter the exact first query you used for the Apify run.
  • Press Enter to send the request.

You should see Saved 10 Jina results to jina_results.json. in the terminal. This confirms that the two providers now have matching record counts.

Request not completing?

  • Confirm that your internet connection is still active.
  • Confirm that the key stored under JINA_API_KEY is the current key from your Jina dashboard.
  • Run the credential check from the first substep again without displaying the key value.

Help me diagnose why my Jina Search request is failing without exposing my API key.

✔️ Awesome, I've got everything!

Great work. Save compare_searches.py before moving to the checkpoint.

ⓧ I'd like to double check the full code

# Use Python's standard library for files, JSON, environment values, and HTTP.
import json
import os
from pathlib import Path
from urllib.request import Request, urlopen

def load_env(path=".env"):
    # Load private values into this process without printing them.
    for line in Path(path).read_text(encoding="utf-8").splitlines():
        if not line or line.lstrip().startswith("#") or "=" not in line:
            continue
        key, value = line.split("=", 1)
        os.environ.setdefault(key.strip(), value.strip().strip("\"'"))

def search_jina(query, api_key):
    # Request the same result count used for the Apify run.
    body = json.dumps({"q": query, "num": 10}).encode("utf-8")
    request = Request(
        "https://s.jina.ai/",
        data=body,
        headers={
            "Authorization": f"Bearer {api_key}",
            "Content-Type": "application/json",
            "Accept": "application/json",
        },
        method="POST",
    )
    with urlopen(request, timeout=90) as response:
        return json.load(response)

def main():
    # Read the private key only when the script starts.
    load_env()
    api_key = os.environ.get("JINA_API_KEY")
    if not api_key:
        raise RuntimeError("JINA_API_KEY is missing from .env")

    # Reuse the exact query so the two result sets stay comparable.
    query = input("Enter the same query used for Apify: ").strip()
    response = search_jina(query, api_key)
    results = response.get("data", response) if isinstance(response, dict) else response
    if not isinstance(results, list) or len(results) != 10:
        raise RuntimeError("Jina did not return exactly 10 results")

    # Save clean records beside the existing Apify export.
    output_path = Path("jina_results.json")
    output_path.write_text(
        json.dumps(results, indent=2, ensure_ascii=False),
        encoding="utf-8",
    )
    print(f"Saved {len(results)} Jina results to {output_path}.")

if __name__ == "__main__":
    main()

That is the parity point complete. Your folder now contains 10 Apify records plus 10 Jina records for the same question.

Both evidence sets are ready. Next up, you will send each one through the same briefing prompt to see how their answers differ.

Generate Matching Briefings

The Apify result file now holds ten records for <first query>. The Jina AI result file holds the matching ten records.

Your chosen LLM can now turn each evidence set into a briefing. You will generate both briefings under matching conditions.

A fair comparison keeps the writer constant while the evidence changes. One fixed prompt makes the provider result set the variable you are testing.

In this step, get ready to:
  • Confirm both result sets use one fixed briefing prompt.
  • Generate one provider-specific briefing from each result set.
  • Verify that both briefings print in the terminal.
Confirm the fixed briefing setup

The briefing workflow must treat both providers equally. You will trace each result file into the same LLM request before running it.

  • Open compare_searches.py in your code editor.
  • Find the section that reads apify_results.json.
  • Trace the Apify result set into the chosen LLM request.
  • Find the section that reads jina_results.json.
  • Confirm the Jina result set uses the same chosen LLM request with the same fixed prompt.

You should be able to follow two input paths into one shared briefing workflow. The provider result set is the only input that changes.

Why keep the writer fixed?

Changing the LLM or briefing prompt would add another variable to the comparison. Reusing both keeps the test focused on the retrieved evidence.

Each provider receives the same writing task. Differences in the briefings can therefore reveal differences in the source material.

Generate the two briefings

The briefing run reads each saved result set separately. It sends each set through the shared writing workflow.

  • Switch back to the terminal from the previous step.

Before you rerun the script, how much of the final briefing do you expect to change when only the evidence changes?

  • Rerun compare_searches.py using the same Python command from the previous step.

You should see two separate provider-specific briefings print one after the other. One briefing is grounded in apify_results.json.

The other briefing is grounded in jina_results.json. Both answer the same assignment for <first query>.

The briefings can surface different details because each LLM call receives different evidence. That variation is the result you will score in the next step.

Only see one briefing?

  • Confirm compare_searches.py still points to the saved apify_results.json file.
  • Confirm the script still points to the saved jina_results.json file.
  • Check that your chosen LLM access is still active if the script stops during briefing generation.

Help me diagnose why my comparison script prints only one provider briefing.

That completes the fair-writing stage. Both providers have now received the same writer under the same assignment.

Your matching briefings are ready. Next, you will score the evidence behind them in a comparison table.

Score the Search Providers

The same fixed prompt has now produced two briefings for <first query>. Both briefings can sound convincing even when one evidence set contains more gaps.

Scoring turns that impression into a repeatable decision. You will weigh four visible signals before the script names a winner.

In this step, get ready to:
  • Capture the Apify run cost from the completed actor run.
  • Score Apify against Jina AI using the same four metrics.
  • Verify the comparison table against the saved results.
Understand the scoring signals

Each JSON result file contains both successful extractions and possible gaps. A fair comparison keeps those gaps visible.

What does the score measure?

  • Sources found: the number of result records returned for the query.
  • Empty or failed extractions: result records that did not provide usable extracted content.
  • Extracted-content characters: the total amount of text available to ground the briefing.
  • Cost per run: the recorded cost or usage associated with producing the result set.
  • Return to the code editor from earlier.
  • Select apify_results.json in the file explorer.
  • Confirm that the file contains 10 result records for <first query>.
  • Switch to jina_results.json.
  • Confirm that the response contains 10 result records for the same query.

Both files should contain 10 result records. Empty content still remains in the comparison because it reveals an extraction failure.

Run the scored comparison

Cost completes the comparison because it shows what each evidence set required to produce. The Apify value in your table should agree with the completed actor run.

  • Switch back to the Apify Console from earlier.
  • Select the completed RAG Web Browser actor run for <first query>.
  • Record the displayed run cost here: your Apify run cost.
  • Return to the terminal from earlier.

Before you rerun

This run may use more of your search allowance. It may also create two more briefing requests through your chosen LLM, so check that model's pricing before continuing.

Before you run the script, which provider do you expect to win from the briefings you already read?

  • Generate the scored comparison from the terminal by running this command:
python compare_searches.py

What does this command do?

  • The script evaluates the saved Apify result set against the saved Jina result set.
  • It counts the available sources and failed extractions for each provider.
  • It totals the extracted-content characters for each provider.
  • It places cost beside the quality metrics before printing the winner.

You should see the two provider-specific briefings followed by a side-by-side comparison table. A winner for <first query> should appear after the metrics.

Comparison table missing?

Confirm that your terminal is using the folder containing compare_searches.py. The script also needs apify_results.json and jina_results.json in their existing locations.

If the script stops during a provider request, confirm that the private .env file still contains both credentials. Keep the credential values out of screenshots and messages.

Help me debug why my comparison script does not print the score table.

Audit the winner

A winner label can hide a close trade-off. Checking the raw rows confirms that the decision matches the evidence you collected.

Before you inspect the table, do you expect the provider with more extracted text to have fewer failed extractions?

  • Read the Apify row in the comparison table.
  • Compare its displayed cost with your Apify run cost.
  • Read the Jina row in the comparison table.
  • Confirm that both rows show sources found.
  • Confirm that both rows show empty or failed extractions.
  • Confirm that both rows show extracted-content characters.
  • Locate the overall winner for <first query>.

You should see one row for each provider with all four comparison metrics. The Apify cost should match the value shown in the Apify Console.

That is the decision point complete. You now have a winner supported by visible evidence instead of the tone of either briefing.

Your first head-to-head comparison is complete. Next up, you will rerun the test on a different topic to see whether the winner changes.

Rerun on a New Topic

You compared Apify's RAG Web Browser with Jina AI Search on your first query. The comparison table named one winner.

Search performance can change with the topic because each query reaches a different set of pages. This rerun tests whether the winner holds when every other comparison rule stays fixed.

In this step, get ready to:
  • Choose a second topic for the comparison.
  • Run both search providers with the same settings.
  • Compare the second winner with the first winner.
Choose a second topic

A fair rerun changes only the query. Keeping the workflow fixed makes the topic the only new factor.

  • Scroll back to the first comparison table in the terminal from earlier.
  • Record its overall winner here: Apify or Jina.
  • Choose a new topic for your second run: <second query>.
Collect the second Apify result set

The local JSON export connects the completed actor run to your comparison script. Saving the latest run under the existing filename keeps that workflow reusable.

  • Switch back to the Apify Console from earlier.
  • Return to the RAG Web Browser actor input from your first run.
  • Replace the existing query with <second query>.
  • Keep the requested result count at 10.
  • Start the second actor run with the same settings as the first run.

When the run finishes, you should see 10 result records in the dataset view. You should also see the cost for this run.

Not seeing 10 records?

  • Return to the actor input to confirm that the requested result count is 10.
  • Repeat the run if the actor stopped before producing its dataset.

Help me troubleshoot the second RAG Web Browser run.

  • Record the displayed run cost here: second Apify run cost.
  • Export all 10 result records using the same export method as your first run.
  • Save the latest export as apify_results.json to replace the first-query result file.

Your local apify_results.json now contains the 10 Apify records for your second query. The first-query comparison remains available in your terminal history.

Run the second comparison

The fixed LLM prompt holds the briefing conditions steady. Differences in the new briefings or scores now come from the evidence returned for your second topic.

Before you rerun the script, do you think the first winner will stay ahead on this topic?

  • Switch back to the terminal from earlier.
  • Rerun compare_searches.py for <second query> using the same query-entry method as your first comparison.
  • Use second Apify run cost as the Apify cost value for this comparison.

You should see jina_results.json refreshed with 10 Jina results for your second query. The terminal prints one Apify briefing followed by one Jina briefing.

The new comparison table shows sources found, failed extractions, extracted-content characters, cost per run, and the overall winner. The Apify cost should match the cost displayed for your second actor run.

  • Record the second overall winner here: Apify or Jina.
  • Compare Apify or Jina with Apify or Jina.
  • Confirm that the table's Apify cost matches second Apify run cost.

Matching winner values mean the same provider won both topics. Different winner values mean the result changed with the topic.

You have turned a one-topic result into a reusable cross-topic test. Your recorded outcome now shows whether the provider choice holds when the source landscape changes.

Secret mission

Audit the Briefings for Grounding

Your metric winner has one more test to pass. Audit factual claims from both briefings against the saved search results to discover which provider produced the most defensible evidence base.

Clean Up Your Resources

Clean Up Your Resources

Choose whether to keep your local comparison files, pause your work, or remove the files. Completed Apify and Jina AI requests leave no background task consuming credits.

Resources you used:

  • Your private .env file containing local copies of both API keys.
  • Your reusable compare_searches.py comparison script.
  • Your latest apify_results.json result file.
  • Your latest jina_results.json result file.

Keep everything running

No action is needed. Choose this if you plan to compare more topics or refine your scoring method.

  • Keep compare_searches.py so you can rerun the same workflow with another query.
  • Keep apify_results.json as the latest Apify evidence set.
  • Keep jina_results.json as the latest Jina AI evidence set.
  • Keep .env private and excluded from every public repository.
  • Use the completed provider run history when you need to review the recorded costs.

Pause - I'll come back to this later

Close your local tools while preserving the comparison workflow. Your completed provider requests stay finished until you start another run.

  • Wait for any active comparison to return control to your terminal.
  • Close the terminal from this project.
  • Close the code editor from this project.
  • Keep .env private while the project is paused.
  • Leave compare_searches.py with both JSON result files so the workflow is ready when you return.

Delete - I don't want to use this again

Remove the local project files when you no longer need the comparison workflow. Your signed-in provider accounts remain available.

Protect your API keys

Deleting .env removes the local copies of your keys. It does not revoke credentials stored by the providers.

  • Rotate your Apify API key in the signed-in dashboard if .env ever entered a public repository.
  • Rotate your Jina AI API key in the signed-in dashboard if .env ever left your computer.
  • Copy the terminal comparison table into your notes if you want to preserve your findings.
  • Choose the tab for your computer to remove the four local project files.

macOS

These steps remove the local comparison files through Finder.

  • In Finder, return to the folder that contains compare_searches.py.
  • Select .env, apify_results.json, compare_searches.py, and jina_results.json.
  • Delete the selected files using Finder's deletion control.
  • Confirm that the four file names are no longer listed in the project folder.
  • Permanently clear the deleted files from your computer when you no longer need to recover them.

Windows

These steps remove the local comparison files through File Explorer.

  • In File Explorer, return to the folder that contains compare_searches.py.
  • Select .env, apify_results.json, compare_searches.py, and jina_results.json.
  • Delete the selected files using File Explorer's deletion control.
  • Confirm that the four file names are no longer listed in the project folder.
  • Permanently clear the deleted files from your computer when you no longer need to recover them.

Linux

These steps remove the local comparison files through your file manager.

  • In your file manager, return to the folder that contains compare_searches.py.
  • Select .env, apify_results.json, compare_searches.py, and jina_results.json.
  • Delete the selected files using your file manager's deletion control.
  • Confirm that the four file names are no longer listed in the project folder.
  • Permanently clear the deleted files from your computer when you no longer need to recover them.

Nice Work!

Nice Work!

You did it! You built a reusable workflow that compares evidence from Apify RAG Web Browser with Jina AI Search.

You've learned how to:

  • Run the same query against both search providers. Save 10 results per provider as JSON evidence files for inspection.
  • Generate provider-specific briefings with one fixed prompt. Use the same LLM for each briefing. Compare how each evidence set shapes the final answer.
  • Count sources found. Flag empty or failed extractions. Measure extracted-content characters. Compare cost per run. Rerun the workflow on a second topic to see whether the winner changes.
  • Secret Mission: Complete an optional challenge to push your web search comparison skills further.

Ready to quiz yourself?