| You want to… | Go to |
|---|---|
| Search photos from a Python script or app | Python |
| Search photos from JavaScript or Node.js | JavaScript |
| Give photo search to a LangChain or LangGraph agent | LangChain |
| Give photo search to a Vercel AI SDK agent | Vercel AI SDK |
| Use another agent framework | Agent frameworks |
| Automate without code, in n8n, Make or Zapier | No-code |
| Ask for photos in ChatGPT, Claude, Cursor or VS Code | AI assistants |
Python
Install the library (Python 3.9 or later):search.py, put your key in place of YOUR_API_KEY, and run python search.py:
pip3 and python3 instead of
pip and python. Rather keep the key out of your code? Write Client() and set the
PEXAFY_API_KEY environment variable instead.
The library also searches by image, pages through results for you, and comes with an async client
and a pexafy command. Everything is in its README on GitHub
· PyPI.
JavaScript
No package needed: with Node.js 18 or later,fetch is built in. Save this as search.mjs, put
your key in place of YOUR_API_KEY, and run node search.mjs:
LangChain
langchain-pexafy gives LangChain and LangGraph agents three tools: search photos, find similar
photos and get one photo, each with its licence and credit line.
PEXAFY_API_KEY environment variable, then hand the tools to your agent:
Vercel AI SDK
pexafy-ai-sdk gives AI SDK agents three tools to find free-to-use photos, each with its licence
and credit line.
PEXAFY_API_KEY environment variable, then hand the tools to your model:
Agent frameworks
Most agent frameworks can use an MCP server, the standard way to plug tools into an AI agent. Point yours athttps://mcp.pexafy.com/mcp and send your key as Authorization: Bearer YOUR_KEY:
the agent gets Pexafy’s search tools. Any Pexafy key works. One page per framework, with code you
can copy:
OpenAI Agents SDK
Python and TypeScript
Claude Agent SDK
Python and TypeScript
Google ADK
Python and TypeScript
Mastra
TypeScript
CrewAI
Python
LlamaIndex
Python
Pydantic AI
Python
Strands Agents
Python
Agno
Python
Microsoft Agent Framework
Python
No-code
There is no Pexafy app to install in n8n, Make or Zapier: one web request does the job. Add an HTTP step to your workflow with these settings:| Tool | Step to add |
|---|---|
| n8n | An HTTP Request node. Turn on Send Query Parameters for q, and Send Headers for x-api-key. |
| Make | The HTTP app, Make a request module. Add x-api-key under Headers, q under Query String, and set Parse response to Yes. |
| Zapier | Webhooks by Zapier, with the GET event. Add q under Query String Params, and x-api-key under Headers. |
data, and the link
to each one is in urls.regular.
Prefer to ask in a chat?
ChatGPT, Claude, Cursor or VS Code can search Pexafy for you, with no code and, for most of them,
no key.