By the end of this lesson you will have a working Pincode finder page that calls a real API, shows a clear screen for every outcome, and you will know where a keyed API call must live.
You need: your coding agent (set up in Web MVP lesson 1), a browser, an empty folder · Time: 8 minutes
Every API has a docs page: the instruction sheet that says what you may ask and what comes back. Agents often write API code from memory, and memory is old. Five minutes with the docs saves an hour of "why is it empty?".
Look for six things:
- Base URL: the start of every address, e.g.
https://api.postalpincode.in. - Endpoints: the paths you can call, e.g.
/pincode/{PINCODE}and/postoffice/{NAME}. - Parameters: what you put in the path or after
?, and their format (6 digits, a city name…). - Auth: does it need a key? Where does the key go?
- Limits and terms: how many calls per minute or day, and whether business use is allowed.
- Errors: what a "not found" or a failure looks like.
The pincode API's docs page (on postalpincode.in, under API Doc) lists the two endpoints and an example answer. It needs no key and publishes no rate limit, so be polite: one call per search, not one per key press.
Do it now Do it now, for the API you want to use
Why?You will paste these six facts into your prompt. An agent that is told "the answer has a Status field that can be Error" writes the right check; an agent that guesses writes a page that shows nothing.
- Base URL: the start of every address, e.g.
Log in free to read the rest of this lesson
Every lesson is free. A free account unlocks all of them and saves your progress.
Still to come in this lesson:
- Make the agent show you the raw answer first
- Build the page with all four screens
- Test it like a suspicious user
- APIs with a key: call them from your server
- Recap