# APIs & Web Services > Twelfth graders learn how modern apps talk to each other through APIs — sending requests to endpoints and getting back responses (often as JSON) — the glue… **Computer Science** | **Grade 12** *A free lesson plan from K12 Academics. Source page: https://lessonplans.k12academics.com/k12-lesson-g12-cs-apis.html* Twelfth graders learn how modern apps talk to each other through APIs — sending requests to endpoints and getting back responses (often as JSON) — the glue that connects the software behind maps, weather, payments, and more. **Copy link** works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment. ## Everything you need before the bell rings ### Learning Objectives Students will be able to… - Explain an **API**. - Know **request & response**. - Understand **JSON**. - Connect services. When a weather app shows the forecast, it’s asking another service for data — through an API. How do APIs let programs talk to each other? ## The APIs Explorer Project this and tap each part. Have students learn how APIs let programs share data. ## 55 minutes, five moves Tap any phase to open the teacher moves and student actions. ### Hook — Apps Talking to Apps A weather app asks another service for data through an API — how? #### 👩‍🏫 Teacher Moves - Show an app pulling live data. - Ask where it comes from. - Set up. #### 🎒 Student Actions - Look. - Wonder. - Get ready. ### Unplugged — Unplug It Students practice. #### 👩‍🏫 Teacher Moves - Role-play request and response. - One student is the API. - Pass a “JSON” note. #### 🎒 Student Actions - Request. - Respond. - Pass it. ### Use — Explore APIs Students use. #### 👩‍🏫 Teacher Moves - Send students to the APIs Explorer. - Note request/response. - Note JSON. #### 🎒 Student Actions - Tap each. - Note them. - Explain. ### Modify — Modify Students modify. #### 👩‍🏫 Teacher Moves - Sketch a request to an API. - Predict the response. - Explain the endpoint. #### 🎒 Student Actions - Sketch it. - Predict. - Explain. ### Create — Create Students create. #### 👩‍🏫 Teacher Moves - Describe an API your app would use. - Name its data. - Complete the exit ticket. #### 🎒 Student Actions - Describe. - Name it. - Complete the exit ticket. ## Built to the standards you report on Aligned to the CSTA K-12 Computer Science Standards (Level 3) and ISTE Standards. Use APIs and libraries. Analyze how data is exchanged. Use third-party services. Computational Thinker. ## One lesson, every learner ### Multilingual Learners - API-part cards. - Sentence frame: “An API ___.” - Role-play a call. ### Support & Access - Start with request and response. - Use the role-play. - Name one part. ### Stretch & Extend - Read a real JSON response. - Call a public API. - Explain REST. ### What to gather - 📽️Projector / board - 📨Request/response cards - 💻The APIs Explorer - 📦A sample JSON file - ✏️Pens - 🎫Exit-ticket slips ### Key terms - **API**: a way for programs to share data - **request**: asking an API for data - **response**: what the API sends back - **endpoint**: a URL that receives requests - **JSON**: a data format for APIs - **web service**: a service accessed online - **data**: information exchanged - **integration**: connecting services ## Exit Ticket Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students. ### Create: connect the services. Have students describe an app idea and one API it would use to get data. A printable APIs sheet is in the Computer Science library. ## Check your understanding **1. What does “API” mean?** - connecting services - a URL that receives requests - a data format for APIs - a way for programs to share data *(correct)* “API” means: a way for programs to share data **2. Which word means: “asking an API for data”?** - request *(correct)* - web service - response - JSON “request” means: asking an API for data **3. What does “response” mean?** - a URL that receives requests - a way for programs to share data - connecting services - what the API sends back *(correct)* “response” means: what the API sends back **4. Which word means: “a URL that receives requests”?** - endpoint *(correct)* - JSON - integration - API “endpoint” means: a URL that receives requests **5. What does “JSON” mean?** - asking an API for data - a data format for APIs *(correct)* - what the API sends back - connecting services “JSON” means: a data format for APIs **6. Which word means: “a service accessed online”?** - response - web service *(correct)* - endpoint - integration “web service” means: a service accessed online ## Printable worksheet --- Full lesson page: https://lessonplans.k12academics.com/k12-lesson-g12-cs-apis.html All lessons: https://lessonplans.k12academics.com/