← cresta Interview Insights

cresta·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Cresta SWE interview with a practical coding problem centered on HTTP requests and data processing. Nothing algorithmically crazy, but the details around error handling and API quirks made it trickier than it looked on the surface.

Questions Asked (1)

Q1

Write a function that calls the Wikipedia REST API, parses the JSON response, filters the results based on a criterion given during the interview, and returns some aggregation like a count or sum.

API & IntegrationsTechnical Trade-offsAlgorithms & Data Structures
Author's notes

The Wikipedia User-Agent thing tripped me up at first.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the exact API endpoint, the filter criterion, and the aggregation type with the interviewer. Then outline a modular solution: fetch data with proper error handling, parse JSON, apply the filter, and compute the aggregation. Finally, discuss edge cases and potential optimizations.

Pro tip: Mention that you would use a library like requests for HTTP calls and handle rate limits and pagination, showing awareness of real-world API constraints. Also, explicitly state assumptions about the API response structure to avoid ambiguity.

1. Clarify Requirements

Ask the interviewer to specify the Wikipedia API endpoint, the filter criterion, and the aggregation type (count or sum). Confirm the expected input and output formats.

2. Design the Function

Outline the function signature and modular components: API call, JSON parsing, filtering, and aggregation. Consider error handling and edge cases.

3. Implement API Call and Parsing

Write code to make the HTTP request, handle potential errors (e.g., network issues, non-200 responses), and parse the JSON response into a usable data structure.

4. Apply Filter and Aggregate

Iterate over the parsed data, apply the given filter criterion, and compute the required aggregation (count or sum). Ensure the logic is correct and efficient.

5. Test and Discuss Trade-offs

Walk through test cases, including edge cases like empty results or malformed data. Discuss trade-offs such as using streaming vs. loading all data, and potential optimizations.

Key Points to Mention

  • HTTP request handling with proper status code checks and timeouts
  • JSON parsing and navigating nested structures
  • Filtering logic based on the given criterion (e.g., using list comprehensions or filter functions)
  • Aggregation implementation (count or sum) with attention to data types
  • Error handling and edge cases (e.g., empty response, missing fields)
  • API rate limiting, pagination, and authentication considerations

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.