Skip to main content
GET
/
images
/
stock
Typescript (SDK)
import { Crevio } from "@crevio/sdk";

const crevio = new Crevio({
  apiKey: process.env["CREVIO_API_KEY"] ?? "",
});

async function run() {
  const result = await crevio.images.stock({
    query: "<value>",
  });

  console.log(result);
}

run();
{
  "query": "<string>",
  "total": 123,
  "photos": [
    {
      "id": 123,
      "url": "<string>",
      "photographer": "<string>",
      "photographer_url": "<string>",
      "alt": "<string>",
      "width": 123,
      "height": 123,
      "avg_color": "<string>",
      "src": {
        "original": "<string>",
        "large": "<string>",
        "medium": "<string>",
        "small": "<string>"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Query Parameters

query
string
required

The search term used to find photos.

count
integer
default:10

Number of photos to return (1–80).

Required range: 1 <= x <= 80
orientation
enum<string>

Filter by photo orientation.

Available options:
landscape,
portrait,
square
color
enum<string>

Filter by dominant color.

Available options:
red,
orange,
yellow,
green,
turquoise,
blue,
violet,
pink,
brown,
black,
gray,
white
size
enum<string>

Filter by minimum photo size.

Available options:
large,
medium,
small

Response

Matching stock photos

object
enum<string>
Available options:
stock_photo_search_result
query
string
total
integer

Total number of matching photos available upstream.

credits_used
enum<integer>
Available options:
0
photos
object[]