Docs/Gateway/VisualSearch

VisualSearch

Turn a public URL into an image or page capture with one API call. Use it to collect visual references, save posts, or bring web content into your app.

What you get

  • Pinterest: the pin’s original image.
  • X: an image of the selected post.
  • Web pages: a picture of the captured page.

Results include page details and an image download. Post and page pictures are generated from saved content, so their appearance can differ from the live website.

Get started

Use your Codegraff API key and send the URL you want to capture. Access is currently limited to approved accounts.

bash
curl https://gateway.codegraff.com/v1/visualsearch \
  -H "Authorization: Bearer $CODEGRAFF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/"}'

The response includes the captured page and an image or picture. To download it, use its download_url with your API key and send itsaccess_token as the X-VisualSearch-Asset-Token header. Keep your API key on your server, not in browser code.

Have a query instead of a URL?

Use web search to find pages, then pass a result URL to VisualSearch. VisualSearch captures URLs; it is not reverse-image search.

Saved results, faster retrieval

Successful captures join a shared collection. When a recent result already exists, VisualSearch can return it without fetching the website again. You get the same content at the same request price, with less waiting.

Need an updated version? Add "refresh": true to your request. Public pages are supported; pages requiring a login may not be available.

Pricing

Paid access starts at $4 per 1,000 successful capture requests. The request price is the same whether the result is newly captured or already saved.