Developer tools5 min readBy Purrkey team

How to explain Ethereum log methods with DuckDuckGo AI chat

Send one prompt to DuckDuckGo AI chat through Purrkey and get a Markdown answer plus structured text blocks you can drop into developer docs

On this page

You have three models to try and one prompt about Ethereum log methods, and you need a plain-language explanation of LOG1 through LOG4 that you can cite in an internal onboarding page before your team's contract review. Each call to serpapi.duckduckgo.duck_ai returns a Markdown answer plus structured text blocks, so the three answers land in one table you can compare line by line

Example input and the comparison table

The prompt below is an example, invented for this guide. Replace the wording with your own question before you run anything

  • q: Explain Ethereum log methods: how do LOG1 through LOG4 differ, and when should a contract emit each one?
  • model: gpt-5.6-luna on the first call, claude-haiku-4-5 on the second, mistral-small-2603 on the third

That question runs well inside the 500 character cap. Three calls, one per model value, with the same q each time so the wording is the only thing that changes

The deliverable is a table with one row per model. Values here are placeholders showing the shape

modelenginenoticetext_blocks[].typetext_blocks[].snippetmarkdownpick
gpt-5.6-lunaduck_ai(empty or notice text)(block type)(one quotable line)(answer as Markdown)yes or no
claude-haiku-4-5duck_ai(empty or notice text)(block type)(one quotable line)(answer as Markdown)yes or no
mistral-small-2603duck_ai(empty or notice text)(block type)(one quotable line)(answer as Markdown)yes or no

Read the three markdown cells side by side, keep the clearest transcript for the docs, and put that model name in your notes as the one to reuse for future explainer prompts. The final column records the choice so the review meeting has something to point at

What goes into the call

The tool is called as POST /v1/runs with serpapi.duckduckgo.duck_ai. q is required and carries the prompt for Duck AI, 1 to 500 characters, with control characters rejected by the input pattern. model is optional, defaults to gpt-5.6-luna, and takes one of seven listed values: gpt-5.6-luna, gpt-6-luna, gpt-5.4-mini, claude-haiku-4-5, mistral-small-2603, tinfoil/gpt-oss-120b, tinfoil/gemma4-31b

Pick the model per call, not once for the whole script. That is what makes the three-row comparison possible in a single run of the loop. The contract documents q and model, so the prompt below sends no other options

The 500 character cap belongs to this step. A long question about event logs, indexed topics and gas costs can creep toward it, and a control character pasted in from a chat window will be rejected. Trim the question rather than splitting it, because a split question gives you two answers that no longer sit in one comparison row

Reading the fields that decide

engine identifies the Duck AI engine and is the only required output field, so it confirms the answer came from the Duck AI engine. markdown holds the full answer as Markdown, and that is what the docs page quotes. text_blocks is the array you mine for a short line: each block carries type, snippet and snippet_highlighted_words, with at most 50 blocks per response. Use type to see how the answer is sectioned and snippet to lift a single sentence into the table

notice decides whether a row is usable. It is set when the search engine returned no results for the query, and the search still counts as one billed call. A row with a notice has nothing to cite, so mark it and move on rather than rewriting the prompt mid-review. Failed searches are not charged

The 50 block ceiling sits next to this reading step. A very broad question about log opcodes can produce a long answer that fills the array, and the tail of the answer may not survive as a separate block. The markdown field is the place to read the answer in full

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to explain Ethereum log
methods with serpapi.duckduckgo.duck_ai. Check the current inputs and price of
serpapi.duckduckgo.duck_ai before running anything. Use this q for every call:
"Explain Ethereum log methods: how do LOG1 through LOG4 differ, and when
should a contract emit each one?" Send it three times, once with model
gpt-5.6-luna, once with claude-haiku-4-5 and once with mistral-small-2603.
Return a table with model, engine, notice, text_blocks types, text_blocks
snippets, markdown and a pick column. Do not edit the answer text and do not
send any other routing options.

Estimated tool cost

Prices read through the Purrkey catalog on November 23, 2026. The listing is $0.015 per call, which is SerpApi's retail price of $75 per 5,000 searches with no markup. The catalog's max_call note reads "Maximum per call. Successful runs settle at the actual AnyAPI charge", so the totals below are ceilings

StepFormulaUnit pricePlanned quantityTotal
One explainer answercalls x per-call price$0.015 per call1$0.015
Same prompt across 3 modelscalls x per-call price$0.015 per call3$0.045
Same prompt across 7 modelscalls x per-call price$0.015 per call7$0.105

The three-model comparison is the plan this guide describes, and it costs at most $0.045. Model fees for the agent are not counted here

Send the three calls

The comparison is small enough to run before the contract review rather than after it. Run serpapi.duckduckgo.duck_ai on Purrkey with the prompt above, then keep the transcript with the clearest wording. If you want a second opinion from a different engine before the meeting, the sourced answer walkthrough covers a related pattern

Get started by giving this to your agent

  • Claude Code
  • Codex
  • Gemini CLI
  • Cursor
  • GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with DuckDuckGo.
Explore DuckDuckGo tools and pricing

FAQ

What is the DuckDuckGo AI chat API used for here?

serpapi.duckduckgo.duck_ai sends a prompt to DuckDuckGo's AI chat and returns the answer as a Markdown transcript plus structured text blocks. This guide uses it to get a plain-language explanation of Ethereum log methods for an onboarding page.

Which models can I choose for DuckDuckGo AI chat?

The catalog lists seven values: gpt-5.6-luna, gpt-6-luna, gpt-5.4-mini, claude-haiku-4-5, mistral-small-2603, tinfoil/gpt-oss-120b and tinfoil/gemma4-31b. The model field is optional and defaults to gpt-5.6-luna.

How long can the prompt be?

The q field takes 1 to 500 characters and rejects control characters. A short explainer question runs well inside that cap.

What happens when DuckDuckGo returns no results?

A notice field is set on the response, and the search still counts as one billed call. Failed searches are not charged.

How many text blocks come back?

text_blocks returns at most 50 blocks, each with a type, a snippet and snippet_highlighted_words. The type field shows how the answer is sectioned and the snippet gives you a line to quote.

How much does it cost to compare three models?

Three calls at $0.015 per call come to at most $0.045. The total is a ceiling, since successful runs settle at the actual AnyAPI charge.

Do I need to send routing options with the call?

No. The contract documents only q and model, and the prompt in this guide sends no other options.

Next step

Try this with DuckDuckGo

The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.

See DuckDuckGo tools

Share this article