Using Behance API Pagination and Filtering to Build a Custom Portfolio Feed
Learn how to paginate and filter Behance project listings with the public API, handle rate limits, and verify results in your own application.
08 Apr 2026, 06:38 UTC

Problem: fetching too much data wastes bandwidth and hits rate limits
If you try to show a curated list of Behance projects on your own site—say, the most‑viewed illustration work from the past week—you might be tempted to request the entire collection and filter it locally. That approach downloads many unnecessary objects, increases latency, and quickly exhausts the Behance API’s hourly request quota.
Thesis: pagination and filtering let you retrieve only what you need while staying within limits
Behance’s /v2/projects endpoint supports standard pagination (page and per_page) and several filter parameters (sort, time_window, creative_fields). By combining them you can request a small, relevant slice of data, monitor the rate‑limit headers, and handle throttling gracefully.
1. Setting up the request (auth optional)
For public data you only need a client ID (API key). If you later need private or mature‑content projects, exchange an OAuth 2.0 token with the appropriate scopes. The examples below use a client ID; replace YOUR_CLIENT_ID with your actual key.
# Replace the placeholder with your Behance client ID
curl "https://www.behance.net/v2/projects?client_id=YOUR_CLIENT_ID&page=1&per_page=10"
Run this in any terminal with internet access; no special privileges are required.
2. Pagination basics
The response wraps the project array in an object that includes total (total matching projects) and pages (total pages based on per_page). Each page returns up to per_page items, default 20, maximum 100.
To verify pagination:
- Request
page=1&per_page=5and confirm theprojectsarray length is 5. - Note the
totalandpagesvalues. - Request
page=2&per_page=5and ensure the returned projects are distinct from the first page and continue the sequence.
Check the headers X‑RateLimit‑Limit and X‑RateLimit‑Remaining to see how many calls you have left in the current hour.
3. Filtering options
You can narrow results with three query parameters:
sort:published_date,views,comments, etc.time_window:all,week,month(limits results to that period).creative_fields: an array of field IDs (e.g., 12 for Illustration, 5 for Graphic Design). Find IDs in Behance’s documentation or by inspecting the explore page.
To test a filter, add the parameters and inspect a few returned objects to confirm they match the criteria (e.g., check that stats.views is high when sort=views).
4. Worked example: recent illustration projects sorted by views
Suppose you want the ten most‑viewed illustration pieces from the last week.
curl "https://www.behance.net/v2/projects?
client_id=YOUR_CLIENT_ID&
page=1&
per_page=10&
sort=views&
time_window=week&
creative_fields=12"
Where to run: any command‑line environment with curl (or use Postman, Insomnia, or a HTTP library in your language).
Expected checks:
- The JSON response’s
projectsarray should contain exactly 10 objects (unless fewer than 10 exist in the window). - Each object should have a
creative_fieldsarray that includes the ID 12. - The
stats.viewsvalues should be in non‑increasing order. - Inspect the
X‑RateLimit‑Remainingheader; after a handful of calls you should see it decrement.
If the API returns HTTP 429, the response includes a Retry‑After header indicating seconds to wait before retrying.
Trade‑off and limitation: data freshness and authentication requirements
Behance caches project data for a few minutes, so very recent changes (new covers, updated view counts) may not appear instantly in API responses. For truly real‑time data you would need to poll more frequently, which increases the risk of hitting rate limits.
Private projects or items flagged as mature content are omitted from public responses unless the request includes a valid user token with the read_private or view_mature scopes. If your application needs those items, you must implement OAuth 2.0 flow and securely store the access token.
Actionable closing: start small, monitor headers, handle throttling
Begin with per_page=5 to verify your filter logic, then increase to the page size you need. Log the X‑RateLimit‑Remaining value after each request; when it drops below a threshold (e.g., 10), pause or implement exponential backoff before the next call. Treat HTTP 429 as a signal to respect the Retry‑After header rather than immediately retrying.
By using pagination and filtering intentionally, you can build a responsive Behance‑powered feed that stays within API limits, delivers relevant content, and gracefully handles the platform’s caching and authentication constraints.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.