Websites, apps & code / Coding & debugging

Use an online API for the first time

You want your tool to read weather or rates from the web but do not understand APIs.

Fill in your details

Leave blank to use the example. Names are remembered for other prompts too (stored only on your device).

Variation:Approach

Prompt

I want my tool to read data from the web but I have never used an API.

Data I want: Tomorrow's weather in Johor Bahru shown on a web page
What I have: An HTML file and no API experience
Approach: Look for ones needing no sign-up first and explain limits and reliability.

Please:
1. Ask me 3 questions first.
2. Explain in plain words what an API is and how we will do this, then list the plan and write code only after I say OK.
3. For each service suggested, say whether it needs sign-up, the free allowance and limits; if you are unsure of prices or terms, say "check the official site" rather than guessing.
4. If a key is needed: it cannot sit in web page code where anyone can see it. Show me a safe approach or suggest an option that needs no key.
5. Handle "cannot connect" with a friendly message.
6. Teach me how to test it.

Paste it into ChatGPT, Gemini, Claude or Meta AI.

Test result

Run on 2026-12-01 with Claude Sonnet 5.5 (variation: Free, no key needed), using the example details above. AI never answers word for word the same twice, but the shape stays close.

What we noticed

The AI asked 3 questions, explained an API as an order window and suggested the keyless Open-Meteo, but marked free limits and commercial terms as check the official site. No code was written and nothing was tested online.

See what the AI actually wrote

No code yet; 3 questions first:

  1. Do you open your HTML file by double-clicking it in the browser, or is it on a website? (That affects how some APIs must be written.)
  2. What should it show: just tomorrow's high and low and the conditions, or also chance of rain and wind?
  3. If the weather service cannot be reached for now, what friendly message do you want?

What an API is (plain words): an API is like a restaurant's order window. Your page (the customer) writes "tomorrow's weather in Johor Bahru" on a slip and passes it in; the other system (the kitchen) prepares it and passes data back through the window. You do not need to know how the kitchen works, only how to write the slip and read the result.

How we will do it:

  1. Pick a weather service that needs no sign-up and no key. I know Open-Meteo works that way: it takes latitude and longitude and needs no key. Johor Bahru is roughly 1.46, 103.76 (please confirm on a map).
  2. The page uses fetch to ask for data and then shows tomorrow's temperatures.
  3. When it cannot connect, it shows: "Weather is unavailable right now, please try again later."

Limits and reliability (honestly):

  • Whether it needs sign-up, its free allowance and whether commercial use is allowed: I am not sure of the current terms, so check the official site rather than trusting my memory.
  • Free services usually have no reliability guarantee and may limit requests or change format, which is why I will handle the "cannot connect" case.
  • If many people will open your page, the request limits matter more and need checking first.

Keys: this approach needs no key, so there is no problem of a key sitting in the page where anyone can see it. If you later switch to a service that needs a key, the key must not go in the HTML, because anyone can right-click "View source" and see it; it would have to sit on your own server side, or you would go back to a keyless service.

What I plan to write: a small piece of JavaScript in one HTML file: send the request, on success show tomorrow's high and low, on failure (catch) show the friendly message.

How to test:

  1. Normal case: open it in the browser and you should see tomorrow's temperatures; compare with your phone weather app, roughly the same is fine.
  2. Cannot connect: turn off the network and refresh, you should see the friendly message; or deliberately misspell the URL by one letter and see the same.
  3. Open the browser developer tools (F12) "Console" and check for red errors.

Answer the 3 questions and say OK, and I will write the code.

AI tools that suit this

  • Claude Suggested tool Free plan

    Strong at long documents, editing and code

  • ChatGPT Suggested tool Free plan

    The most widely used AI chat, for writing, questions and images

  • Gemini Suggested tool Free plan

    Google's AI; generates and edits images, works with Gmail and Docs

Recommendations only, not sponsored. Check each site for what the free plan includes.

This site is made by FullMark Tech

Want your own website, or your shop spreadsheets automated? FullMark Tech builds business websites and custom Excel tools.

Ask on WhatsApp See FullMark Tech services