<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: founder-droid</title>
    <description>The latest articles on DEV Community by founder-droid (@founderdroid).</description>
    <link>https://dev.to/founderdroid</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4264172%2F3cb3673f-188c-41bf-b242-654c74310c38.png</url>
      <title>DEV Community: founder-droid</title>
      <link>https://dev.to/founderdroid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/founderdroid"/>
    <language>en</language>
    <item>
      <title>Generate a Printable Word Search in ~20 Lines of Python (With the Answer Key Free)</title>
      <dc:creator>founder-droid</dc:creator>
      <pubDate>Wed, 25 Nov 2026 08:46:29 +0000</pubDate>
      <link>https://dev.to/founderdroid/generate-a-printable-word-search-in-20-lines-of-python-with-the-answer-key-free-keb</link>
      <guid>https://dev.to/founderdroid/generate-a-printable-word-search-in-20-lines-of-python-with-the-answer-key-free-keb</guid>
      <description>&lt;p&gt;I build kids' activity books. Word searches are the easy part to &lt;em&gt;imagine&lt;/em&gt; and the slow part to &lt;em&gt;make&lt;/em&gt;: place ten words on a grid without collisions, fill the empty cells, then — the part everyone forgets — write down exactly where every word landed so you can print an answer key. Do that by hand for one puzzle and you'll spend twenty minutes. Do it for a whole book and you'll spend your week.&lt;/p&gt;

&lt;p&gt;So I automated it. This is the generator I use, exposed as an API called ActivityForge, and in this tutorial we'll call it from Python: send a theme, get back a finished, print-ready word search — grid, word list, answer key, and a PDF — in about twenty lines.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we're building
&lt;/h2&gt;

&lt;p&gt;A small Python script that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;POSTs to the word-search endpoint with a theme (&lt;code&gt;ocean&lt;/code&gt;), an age band (&lt;code&gt;6-8&lt;/code&gt;), and a seed (&lt;code&gt;42&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Prints the letter grid and the words to find&lt;/li&gt;
&lt;li&gt;Saves the print-ready PDF that comes back in the same response&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The API lives on RapidAPI. The free tier gives you 100 calls a day, and every plan — free included — reaches every endpoint and every format. The paid plans only change how many calls you get, starting at $19/month. Nothing in this tutorial needs a paid plan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;Subscribe on the &lt;a href="https://rapidapi.com/aerolyf-global-holdings-llc-aerolyf-global-holdings-llc-default/api/activityforge" rel="noopener noreferrer"&gt;ActivityForge listing&lt;/a&gt; (the free tier is fine), copy your key from the listing's Endpoints page, then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install requests
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;RAPIDAPI_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_key_here
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 1: Make the call
&lt;/h2&gt;

&lt;p&gt;The whole request is one POST. Two headers carry your key and the host; the JSON body carries the puzzle settings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="no"&gt;HOST&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"activityforge.p.rapidapi.com"&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;generate_word_search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"https://{HOST}/v1/word-search"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"X-RapidAPI-Key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"RAPIDAPI_KEY"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"X-RapidAPI-Host"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;HOST&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"Content-Type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"application/json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"theme"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ocean"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# or send "words": [...] with your own list&lt;/span&gt;
            &lt;span class="s2"&gt;"age_band"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"6-8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# "3-5" | "6-8" | "9-12"&lt;/span&gt;
            &lt;span class="s2"&gt;"seed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# same seed = same puzzle, forever&lt;/span&gt;
            &lt;span class="s2"&gt;"format"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"all"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# "json" | "svg" | "pdf" | "all"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"request failed"&lt;/span&gt;
        &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"ActivityForge {response.status_code}: {message}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few things worth knowing about the parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;theme&lt;/strong&gt; — there are 12 built-in word lists: animals, ocean, space, garden, food, weather, farm, jungle, arctic, school, sports, and music. If you'd rather use your own vocabulary, send &lt;code&gt;words&lt;/code&gt; (a list of up to 50) instead of &lt;code&gt;theme&lt;/code&gt;. Custom words pass through a kids-safety screen before they can reach a puzzle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;age_band&lt;/strong&gt; — &lt;code&gt;3-5&lt;/code&gt;, &lt;code&gt;6-8&lt;/code&gt;, or &lt;code&gt;9-12&lt;/code&gt;. It tunes word length, grid size, and difficulty together, so a puzzle for a five-year-old is forwards-only on a small grid, and a puzzle for a ten-year-old runs in all directions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;format&lt;/strong&gt; — &lt;code&gt;json&lt;/code&gt; returns just the puzzle data, &lt;code&gt;svg&lt;/code&gt; or &lt;code&gt;pdf&lt;/code&gt; add a rendered page, and &lt;code&gt;all&lt;/code&gt; returns everything in one response. Errors come back in a consistent shape — &lt;code&gt;{"error": {"code", "message"}}&lt;/code&gt; — which is what the error handling above reads.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 2: Print the puzzle
&lt;/h2&gt;

&lt;p&gt;The response carries the grid as a list of strings, one per row, plus the word list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="s2"&gt;"RAPIDAPI_KEY"&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Set RAPIDAPI_KEY first — see the docstring at the top of this file."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;puzzle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;generate_word_search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Word search — theme: {puzzle['theme']}, "&lt;/span&gt;
          &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"ages {puzzle['age_band']}, seed {puzzle['seed']}\n"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;puzzle&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"grid"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"\nFind these words:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;", "&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;puzzle&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"words"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it and you get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Word search — theme: ocean, ages 6-8, seed 42

A Y P P Y N S A I L
U L H K M C W T C P
C L E V A W V N S I
F L G S A A F I H H
I E E L M H D H I D
S H C O N E D P P N
H S C B R S I L I A
M P E A R L U O S S
P U B M M N Q D W M
T B E A C H S U E C

Find these words: DOLPHIN, SQUID, SHELL, BEACH, PEARL, FISH, WAVE, SAIL, SHIP, SAND
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's a real response, not a mockup — you can check BEACH across the bottom row yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: The answer key is already in the response
&lt;/h2&gt;

&lt;p&gt;Here's the part that saves the real time. The response includes a &lt;code&gt;solution&lt;/code&gt; object with a &lt;code&gt;placements&lt;/code&gt; list — every word's start and end coordinates (as &lt;code&gt;[row, column]&lt;/code&gt;) and its direction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"word"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"WAVE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"end"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"direction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"left"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"word"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"BEACH"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"end"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"direction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"right"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"word"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"SHELL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"end"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"direction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"up"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check WAVE against the grid: row 2, column 5 is W, and reading left you cross A, V, E. The placements aren't decoration — the generator verifies each word at its stated coordinates before the puzzle is returned, so the key can't disagree with the grid. If you don't want the solution in the response, send &lt;code&gt;"include_solution": false&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Save the printable PDF
&lt;/h2&gt;

&lt;p&gt;Because we asked for &lt;code&gt;format: "all"&lt;/code&gt;, the same response also carries &lt;code&gt;svg&lt;/code&gt; (a print-ready page) and &lt;code&gt;pdf_base64&lt;/code&gt; (a vector PDF, base64-encoded). Saving the PDF is three lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;base64&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"word-search.pdf"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"wb"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base64&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;b64decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;puzzle&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"pdf_base64"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the page you hand to a kid — no layout work, no drawing the grid yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  The seed trick
&lt;/h2&gt;

&lt;p&gt;Look back at the request: &lt;code&gt;"seed": 42&lt;/code&gt;. Run the script again tomorrow, next month, on a different machine — you get this exact puzzle, letter for letter. Leave the seed out and every call returns a fresh random puzzle.&lt;/p&gt;

&lt;p&gt;This matters more than it sounds. If you're building a printable pack, you can generate a catalog once, record the seeds, and re-render the identical puzzles forever — your answer keys and page numbers never drift. And in tests, a seeded call is a fixed fixture: if the output ever changes, your test tells you.&lt;/p&gt;

&lt;h2&gt;
  
  
  What else it does
&lt;/h2&gt;

&lt;p&gt;Word search is one of four generators, all with the same request shape and the same seed behavior:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;POST /v1/maze&lt;/code&gt;&lt;/strong&gt; — mazes sized by difficulty or by exact &lt;code&gt;cols&lt;/code&gt;/&lt;code&gt;rows&lt;/code&gt; (4–30), with the verified solution path as coordinates and directions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;POST /v1/dot-to-dot&lt;/code&gt;&lt;/strong&gt; — 8 shapes (star, heart, flower, balloon, house, rocket, fish, tree), 10–60 dots, numbered in order.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;POST /v1/activity-page&lt;/code&gt;&lt;/strong&gt; — a themed, age-banded page set that bundles the activities together with answer-key pages, ready to print on US Letter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every generator proves its own output the same way the word search does — mazes are checked solvable, dot sequences are checked complete and ordered — because a broken puzzle in a printed book is a refund, not a bug report.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The free tier is 100 calls a day, which is plenty to build something real. The full script from this tutorial — plus a JavaScript version — is in the &lt;a href="https://github.com/founder-droid/activityforge-examples" rel="noopener noreferrer"&gt;examples repo&lt;/a&gt;, and the API itself is on &lt;a href="https://rapidapi.com/aerolyf-global-holdings-llc-aerolyf-global-holdings-llc-default/api/activityforge" rel="noopener noreferrer"&gt;RapidAPI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you generate a puzzle pack with it, I'd like to see what you made.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Part of the ActivityForge series — the launch post covers how this generator came out of my activity-book pipeline and why every puzzle ships with a proof-checked answer key.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>api</category>
      <category>tutorial</category>
      <category>education</category>
    </item>
    <item>
      <title>I turned my kids' activity-book generator into an API — word searches, mazes &amp; dot-to-dots with proven answer keys</title>
      <dc:creator>founder-droid</dc:creator>
      <pubDate>Wed, 25 Nov 2026 08:04:30 +0000</pubDate>
      <link>https://dev.to/founderdroid/i-turned-my-kids-activity-book-generator-into-an-api-word-searches-mazes-dot-to-dots-with-5247</link>
      <guid>https://dev.to/founderdroid/i-turned-my-kids-activity-book-generator-into-an-api-word-searches-mazes-dot-to-dots-with-5247</guid>
      <description>&lt;p&gt;For the past year I've been building children's activity books — word searches, mazes, dot-to-dots — and the hardest part was never the drawing. It was &lt;em&gt;trusting the puzzles&lt;/em&gt;. A word search where one word isn't actually in the grid, or a maze with no solution, is a one-star review waiting to happen.&lt;/p&gt;

&lt;p&gt;So my generator pipeline grew up around one rule: &lt;strong&gt;a puzzle doesn't ship unless the code proves it works.&lt;/strong&gt; Every word placement is checked against its coordinates. Every maze is walked by a solver before it's accepted. Every dot-to-dot sequence is verified complete and in order.&lt;/p&gt;

&lt;p&gt;This week I put that pipeline behind an API. It's called &lt;strong&gt;ActivityForge&lt;/strong&gt;, and it's live on RapidAPI:&lt;br&gt;
&lt;a href="https://rapidapi.com/aerolyf-global-holdings-llc-aerolyf-global-holdings-llc-default/api/activityforge" rel="noopener noreferrer"&gt;https://rapidapi.com/aerolyf-global-holdings-llc-aerolyf-global-holdings-llc-default/api/activityforge&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;One POST returns a print-ready puzzle — structured JSON, an SVG page, and a vector PDF (US Letter) in the same response:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Word searches&lt;/strong&gt; — 12 built-in themes (animals, ocean, space, farm, jungle…) or your own word list, which passes a child-safety screen before it can reach a puzzle&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mazes&lt;/strong&gt; — by difficulty or exact grid size, with the solution path as coordinates and directions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dot-to-dots&lt;/strong&gt; — 8 original silhouettes, 10–60 dots&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Activity pages&lt;/strong&gt; — a themed, age-banded set (puzzles + answer-key pages) composed into one printable PDF&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Age bands (3-5, 6-8, 9-12) tune word length, grid size, and maze difficulty automatically. Pass a &lt;code&gt;seed&lt;/code&gt; and the same puzzle regenerates exactly — build a catalog once, re-render it forever.&lt;/p&gt;
&lt;h2&gt;
  
  
  Real output, no mockups
&lt;/h2&gt;

&lt;p&gt;This is an actual response (ocean theme, ages 6-8, seed 42):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;B F P A Y P S A N D
P Y N U L H K M C W
T L H S I F C N S P
S R C V I G S I H A
A A A B E A C H I F
I E H E L M D P P H
L P D C O N I L E C
B W A V E R U O S I
M S P U B M Q D M N
W S H E L L S M T U
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Words: DOLPHIN, SQUID, BEACH, PEARL, SHELL, WAVE, SAIL, FISH, SAND, SHIP — and the response includes the solution with every word's start and end coordinates, so your app can highlight the answer key without guessing. (Check row 8 if you're skeptical. WAVE is right there.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Call it in 30 seconds
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"https://activityforge.p.rapidapi.com/v1/word-search"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"POST"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"X-RapidAPI-Key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;RAPIDAPI_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"X-RapidAPI-Host"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"activityforge.p.rapidapi.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"Content-Type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"application/json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ocean"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;age_band&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"6-8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;seed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"all"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;puzzle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;puzzle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"\n"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Find:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;puzzle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;words&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;", "&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Python works the same way — full runnable examples for both live in the examples repo: &lt;a href="https://github.com/founder-droid/activityforge-examples" rel="noopener noreferrer"&gt;https://github.com/founder-droid/activityforge-examples&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Who it's for
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Teacher-tool and homeschool apps&lt;/strong&gt; that need fresh worksheets instead of a static PDF library&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kids' app developers&lt;/strong&gt; adding a printable/activity section&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Printable sellers&lt;/strong&gt; (Etsy, TPT, Gumroad) who need original activity content at volume — seeds make catalogs reproducible&lt;/li&gt;
&lt;li&gt;Anyone prototyping an education product who doesn't want to write a maze solver this weekend&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pricing
&lt;/h2&gt;

&lt;p&gt;There's a free tier (100 calls/day — enough to integrate and test for real), then PRO at $19/mo for 15,000 calls, ULTRA $59 (75,000), and MEGA $139 (250,000). Every plan reaches every endpoint and format; the plans differ by volume, nothing else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The listing's playground runs real calls against the live API:&lt;br&gt;
&lt;a href="https://rapidapi.com/aerolyf-global-holdings-llc-aerolyf-global-holdings-llc-default/api/activityforge" rel="noopener noreferrer"&gt;https://rapidapi.com/aerolyf-global-holdings-llc-aerolyf-global-holdings-llc-default/api/activityforge&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you build something with it — or you hit an edge case my correctness proofs missed — I want to hear about it in the comments or the listing's discussion tab. Broken puzzles are the enemy; reports get fixed fast.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;ActivityForge is built and run by AeroLyf Global Holdings LLC. All wordlists and puzzle designs are original content.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>webdev</category>
      <category>education</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
