A REST API endpoint is a specific URL for a resource, and the HTTP method tells the server what you want to do there. REST is also the dominant API style, used by 93% of organizations according to DreamFactory's API trends report, which is why you keep running into endpoints whether you're building apps or extracting data.
Think of an endpoint like a street address for a resource on the web. The address tells you where to go. The method tells you what you're doing there, like picking up mail or dropping off a package.
If you're reading this, you're probably in one of two situations. Either you're looking at docs full of paths like
/users, /posts/123, and Authorization: Bearer ... and wondering what any of it means. Or you're scraping a site, you opened DevTools, saw a bunch of XHR requests, and realized the cleanest data on the page might be coming from an API endpoint instead of the HTML.That's the practical version of what is a rest api endpoint. It's not just a definition for interviews. It's how modern software exposes data, and it's often the difference between a fragile scraper and a stable extraction pipeline.
Your Digital Vending Machine for Web Data
A vending machine is a useful way to think about endpoints.
You don't ask the machine, "please give me food." You press a specific button for a specific item. In the same way, an application doesn't ask a server, "give me whatever." It sends a request to a specific endpoint that points to a specific resource.
If the machine has slots A1, B2, and C3, each slot maps to a product. If an API has
/products, /products/42, and /orders, each path maps to a resource or a collection of resources. The endpoint is the button you press.What the endpoint actually represents
A REST API endpoint is the request target a client uses to interact with a resource. In practice, that usually means a base URL plus a path, like:
https://api.example.com/products
https://api.example.com/products/42
The important idea is that REST is built around resources, not actions. You point at the thing, then use the HTTP method to say what you want done.
That design has roots going back to 2000, when Roy Fielding formally introduced REST in his doctoral dissertation, and one of its core ideas is statelessness. Each request has to include everything the server needs to process it, without relying on stored client session context, as IBM explains in its overview of REST APIs and their stateless design.
Why junior developers get tripped up
A lot of confusion comes from mixing up these three things:
- API means the overall interface.
- Endpoint means one specific address inside that interface.
- Method means the operation you're trying to perform.
So
/users isn't "the API." It's one endpoint inside an API.This matters outside app development too. In healthcare systems, for example, resource-based APIs are how teams exchange structured records. If you want a real-world example of resource-oriented design in a regulated domain, this guide on unlocking health data using FHIR is worth a read because FHIR uses the same idea of predictable, addressable resources.
The Anatomy of a REST API Endpoint Request
When you look at a request, don't treat it like a wall of syntax. Break it into parts.
Take this fictional bookstore request:
GET https://api.bookstore.com/v1/books?author=OrwellThat single line already tells you a lot. It tells you the action, the server, the resource, and a filter.
URL and path
The endpoint URL usually has two main pieces:
Part | Example | What it means |
Base URL | https://api.bookstore.com | The main API host |
Path | /v1/books | The resource location |
The path points at a collection or a specific item. Draftbit's explanation of REST service endpoints makes this distinction clear: one endpoint maps to a resource collection like
/posts or a single item like /posts/123, while the method defines the operation.That separation is why
/books can support more than one operation without changing the path itself.Method and intent
The HTTP method is the verb.
For the bookstore API:
GET /v1/booksmeans read books
POST /v1/booksmeans create a new book entry
PUT /v1/books/42means update a specific book
DELETE /v1/books/42means remove it
This is one of the most important mental models in REST. The path identifies the resource. The method tells the server what to do with it.
Headers and metadata
Headers carry metadata about the request.
Common examples:
- Authorization carries credentials or a token
- Content-Type tells the server the format of the body
- Accept tells the server what response format the client wants
Because REST requests are self-contained, headers often carry information that a stateful system might otherwise keep in a session. If you're testing real requests, Scrappey's GET request documentation is a straightforward example of how headers and request fields are structured in practice.
Query parameters and request body
Query parameters refine a request without changing the underlying resource.
Examples:
?author=Orwell
?sort=title
?limit=20
They usually help with filtering, sorting, searching, or pagination.
A request body is different. It's the payload you send when you're creating or updating data. For example, a
POST /v1/books request might include JSON with a title and author.If you're trying to understand an unfamiliar request, use this order:
- Read the method.
- Identify the base URL.
- Read the path.
- Check query parameters.
- Inspect headers.
- Look for a body if it's a write operation.
That sequence keeps you from getting lost in details too early.
Essential HTTP Methods and Status Codes
Once you understand the endpoint, you need to understand the conversation around it. That conversation has two parts: the method you send and the status code you get back.
Methods map cleanly to CRUD. That's Create, Read, Update, Delete.
The methods you'll use constantly
HTTP Method | CRUD Operation | Description |
GET | Read | Retrieve a resource or collection |
POST | Create | Send data to create a new resource |
PUT | Update | Replace or update a resource |
PATCH | Update | Change part of a resource |
DELETE | Delete | Remove a resource |
A few patterns make this click fast.
- GET is for fetching data. If you request
/users/10, you want to read that user.
- POST is for creating something new, like sending signup data to
/users.
- PUT and PATCH both update, but teams often use them differently based on how they model updates.
- DELETE removes the target resource.
How to read status codes without panicking
Status codes are grouped by category.
2xx means success
These tell you the server accepted and handled the request.
Common examples include:
- 200 OK for a normal successful response
- 201 Created when a new resource was created
- 204 No Content when the action worked but there's no response body
4xx means the client request has a problem
The server is reachable, but the request isn't acceptable.
Typical causes:
- bad input
- missing authentication
- asking for a resource that doesn't exist
- hitting rate or permission limits
5xx means the server failed
This category usually means your request was valid enough to reach application logic, but the server couldn't complete the work.
For debugging real integrations, it helps to keep a provider-specific error reference nearby. Scrappey's guide to API error codes is a practical example of the kind of documentation you want when you're troubleshooting.
One status code that's easy to misread
Not every successful API workflow returns immediate data.
GitHub's REST statistics endpoints show a good real-world example. Some statistics requests return 202 while GitHub generates cached statistics in the background, and some detailed commit statistics stop being returned for repositories with 10,000 or more commits. That's a useful reminder that endpoint behavior is shaped by performance and data-governance constraints, not just textbook REST rules.
Practical Endpoint Examples in Action
Definitions stick better when you send a real request.
Let's use the public JSONPlaceholder API because it's simple and familiar. We'll fetch one post from
/posts/1.A simple curl request
In a terminal:
curl https://jsonplaceholder.typicode.com/posts/1
That request is small, but it's complete.
- The endpoint is
https://jsonplaceholder.typicode.com/posts/1
- The method is implicitly
GET
- The resource is a single post with ID
1
The server responds with JSON. That's common for REST APIs because JSON is easy for clients to parse.
The same idea in Python
Now do the same thing in code:
import requests url = "https://jsonplaceholder.typicode.com/posts/1" response = requests.get(url) print(response.status_code) print(response.json())
This is the same request-response cycle, just with more control.
You can inspect:
- the status code
- the headers
- the parsed JSON body
Add headers and error handling
Real APIs usually need more than a bare GET.
import requests url = "https://api.example.com/users/42" headers = { "Authorization": "Bearer YOUR_TOKEN", "Accept": "application/json" } response = requests.get(url, headers=headers) if response.status_code == 200: data = response.json() print(data) else: print("Request failed:", response.status_code, response.text)
That pattern is what you'll use most days. Build the URL, attach headers, send the request, check the status code, parse the body.
Where this matters for scraping
Here's the shift many developers make after a few scraping projects.
At first, they scrape visible HTML because that's what's easy to inspect in the browser. Then they notice the page loads data from a cleaner JSON endpoint behind the scenes. Once you can recognize methods, paths, headers, and query params, browser DevTools becomes much more useful. You're not just looking at network noise anymore. You're identifying candidate endpoints for extraction.
For example, a product page may render lots of markup, but the inventory and pricing data might come from a request like:
GET /api/products/42?region=usIf that endpoint is stable and accessible, it's often easier to consume than parsing the final HTML.
Core Principles for Designing Better Endpoints
A few requests are usually enough to tell whether an API feels clear or frustrating. Well-designed endpoints reduce guesswork, which saves time for the people building against them and for the people maintaining them later.
That matters even more if you use APIs for data extraction. In a scraping workflow, a clean endpoint is often the difference between a stable JSON-based pipeline and a brittle HTML parser that breaks the next time the frontend changes.
Name resources like resources
Paths should describe the thing you want, not the action you plan to perform. A REST endpoint works like a labeled shelf in a warehouse. The path tells you which shelf to open, and the HTTP method tells you what you want to do there.
Good examples:
/users
/orders
/products/42
Less helpful examples:
/getUsers
/createOrder
/deleteProduct
This naming pattern makes APIs easier to predict. It also helps when you're inspecting hidden endpoints in browser DevTools during a scraping project. If you see
/api/products/42/reviews, you can infer its purpose quickly. If you see /doProductThing, you have to reverse-engineer intent from trial and error.Version before you need it
Endpoints change over time. Fields get renamed, filters change, and old response shapes stop fitting new product requirements.
A versioned path such as
/v1/users gives you room to change behavior without breaking every client at once. Public API consumers benefit from that, but so do internal tools and scrapers. If a site moves from /v1/search to /v2/search, you can test the new contract without rewriting your whole extraction job in one pass.If you want a practical walkthrough of how endpoint choices affect extraction systems, this quick guide to building a web scraping API shows the tradeoffs clearly.
Treat auth as part of the endpoint design
Authentication belongs in the design from the start because it changes how every request is made.
Decide early:
- what credentials the client sends
- where those credentials go, usually headers
- which resources require which permissions
- what response the client gets when access is denied
Clear auth rules help legitimate clients behave correctly. They also make undocumented endpoints easier to evaluate during scraping research. If an internal API needs rotating tokens, signed requests, or session-bound headers, that affects whether the endpoint is usable or whether HTML extraction is the more realistic route.
Before the video, keep one rule in mind: design for the client that knows the least.
Make errors useful
Useful errors shorten debugging time and make client code simpler.
A
404 Not Found tells the caller the resource does not exist. A 401 Unauthorized or 403 Forbidden points to an auth problem. Those signals matter because clients should be able to react differently. Retry logic for a 500 is reasonable. Retrying a 403 usually is not.Consistency matters too. If one endpoint uses
page and limit for pagination, other endpoints should use the same pattern. The same goes for filters, sort parameters, field names, and error shapes. Predictable APIs are easier to integrate with, easier to document, and much easier to assess when you're choosing between a documented API, a hidden JSON endpoint, or raw HTML scraping.Endpoints for Web Scraping Workflows with Scrappey
A junior developer hits this decision fast. You need product data from a site, the page loads slowly, and DevTools shows both HTML and background XHR requests. Now the question is not "how do I scrape this?" It is "which endpoint or page source gives me usable data with the least maintenance?"
That is why endpoint knowledge matters in scraping work. A REST endpoint is not just something you call in an app integration. It is often the clue that tells you whether you should use the public API, reverse engineer a hidden JSON feed, or skip both and extract the rendered page.
Choosing the right source
You usually have three practical options:
- Use the site's documented REST API
- Use an undocumented internal endpoint you discover in network traffic
- Extract data from rendered HTML
A documented API is usually the cleanest path. Field names tend to be clearer, response shapes are more stable, and your parser does less guesswork.
An undocumented internal endpoint can be a good middle ground. Many modern frontends fetch JSON behind the scenes, so the browser is already showing you a machine-friendly version of the data. The tradeoff is stability. Internal endpoints can change without notice because they were built for the site's own frontend, not for outside consumers.
Rendered HTML is the fallback when no usable endpoint exists, when the data only appears after JavaScript runs, or when the visual structure of the page contains the information you need.
For scraping, the best endpoint is often the one that gives you correct data with the lowest maintenance cost and the fewest compliance concerns.
A practical filter for scraping decisions
A simple way to evaluate the options is to work from the cleanest source toward the messiest one:
- Public API available: start there and verify whether it exposes the fields you need.
- JSON calls visible in the network panel: inspect those requests and check whether the responses are complete enough for your schema.
- Content appears only after rendering: plan for browser-based extraction.
- Anti-bot controls interrupt direct requests: factor that into your choice early, because the technically simple option may fail in production.
- HTML and JSON disagree on field names or values: pick the source that maps more cleanly to your downstream model.
If you want a concrete example of how request design connects to extraction architecture, this guide to building a web scraping API is a useful reference.
Where Scrappey fits
A scraping API works like a service layer between your code and the target site. Your application sends one request to a scraping endpoint with a target URL and options. The service handles rendering, request customization, and response delivery, then returns HTML, rendered output, or structured data depending on the workflow.
Scrappey follows that model. For a development team, that changes the job in a useful way. Less time goes into browser automation and request plumbing. More time goes into the higher-value decision: whether the documented API, a hidden endpoint, or the rendered page is the right source for the data you need.
Conclusion Endpoints Are Your Gateway to Web Data
A REST API endpoint is the address of a resource, and the HTTP method tells the server what action to perform. Once you can read a request as method, URL, headers, parameters, and body, APIs stop feeling abstract.
That skill carries beyond app integration. It helps you debug faster, evaluate API quality, and choose smarter data sources for scraping. When you understand endpoints, you don't just consume web data more cleanly. You make better architectural decisions about where that data should come from.
If you're building data extraction workflows and need an API-based way to fetch pages, rendered content, or structured responses from target sites, Scrappey is worth evaluating alongside your existing tooling. It fits teams that want to work through HTTP requests instead of maintaining every browser and anti-bot detail in-house.
