An API (Application Programming Interface) is a defined way for one piece of software to ask another for data or functionality. The API sets the available operations and the form of the request and response, so the software using it does not need to know how the other program works internally.
How does an API work?
Think of a weather app checking conditions for a location. The app is the client: it sends a request to an endpoint made available by a weather service. The service processes the request and returns a response that the app can display. The endpoint, accepted inputs, and expected response are defined by that service’s API.
As an Amazon Associate I earn from qualifying purchases.
Google Cloud uses a similar weather example to illustrate an HTTP GET request with a location and an API key. Such sample addresses and credentials are illustrative; they are not a real service to call. In practice, use the endpoint and access details documented by the service you need.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteAn API is both a boundary and a contract. The caller may use only the operations the interface exposes and must send inputs in the expected form. In return, it can rely on the documented behavior without controlling or understanding the implementation behind the boundary. Google Cloud describes the API contract as specifying how to make a request and what response to expect.
#1 Best Overall
What happens in a typical web API request?
- Choose a documented endpoint. An endpoint is a specific URL used to access a resource or API operation.
- Send a request. The request uses an HTTP method, such as GET or POST. Headers carry metadata, and a request body may carry submitted data.
- The service checks the request. It may verify the caller’s identity and whether that caller is allowed to perform the requested action.
- Receive a response. The service returns a result or an error. The client then uses that response—for example, by displaying weather data.
GET commonly retrieves information; POST commonly submits it. REST-style APIs also often use PUT and DELETE. These are common conventions, not guarantees about every API: the service documentation defines what a particular endpoint and method actually do.
API, web API, HTTP, and REST: what is the difference?
| Term | Meaning |
|---|---|
| API | The software interface and rules available to a caller. It can be local or remote, and it does not have to use HTTP. |
| Web API | An API accessed through web technologies or a network service. Browser features can also have APIs, even when a page is not contacting a third-party server. |
| HTTP | A client-server protocol in which a client sends a request and receives a response. HTTP is widely used for web APIs, but it is not another name for API. |
| REST | An architectural style for networked APIs. REST-oriented APIs organize interactions around resources and stateless operations; REST is not a protocol. |
MDN notes that “RESTful” is sometimes used loosely for HTTP services that do not meet every REST constraint. So “HTTP API” and “REST API” are not interchangeable labels, even though many APIs described as REST APIs use HTTP.
Not every API is an internet service
APIs also appear inside the software and devices people use. A browser API lets code use browser capabilities; a library API exposes functions that other programs can call; an operating system can provide APIs for system facilities. MDN distinguishes browser APIs from third-party APIs such as a mapping service. NIST’s glossary definition likewise covers both a system access point and a library function.
Recommended Free Tools
The electrical-socket analogy can help: a device uses a standardized interface without needing to know how electricity is generated. Similarly, an API hides lower-level complexity behind a defined way to request a result. The analogy has limits: real APIs also specify data formats, errors, permissions, and other operating behavior.
Rank #3
Authentication and authorization are different
Some APIs restrict access. Authentication establishes who or what is making a request; authorization checks which actions or data that caller is permitted to use. Depending on the service, access may involve an API key, an OAuth token, or another mechanism. Not every API requires a key, and not every endpoint is public. Follow the API’s documentation rather than assuming a particular access model.
Documentation normally describes endpoints, accepted inputs, response formats, authentication, and errors. A response is not necessarily successful just because the request reached the service: the client should account for errors and use the response according to the service’s documented behavior.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Using an API to capture a website screenshot
A website screenshot API is one specific kind of web service API: a program sends a request describing a page to capture and receives an image or document. For example, ScreenshotNeo provides a website screenshot API and MCP server for developers. Its API accepts a URL in a GET request and can return PNG, JPEG, WebP, or PDF. The example below saves a WebP response; replace the URL and credential with your own values. See the ScreenshotNeo API documentation for supported request options.
cURL
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
open("shot.webp", "wb").write(r.content)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Or skip the browser setup
With one GET request, ScreenshotNeo can capture a page without you setting up a browser. It accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month—no card required.
Best Value
- Used Book in Good Condition
Frequently Asked Questions
Does every API use JSON?
No. An API defines its own accepted inputs and returned data formats; JSON is not universal.
Does an API always need an API key?
No. Access controls vary by service and endpoint. Follow the service’s documentation for its authentication requirements.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




