{
  "openapi": "3.0.1",
  "info": {
    "title": "Openverse Image Search: CC0 & CC BY Images with Attribution",
    "description": "Search Openverse for openly licensed images (CC0, public domain, CC BY, BY-SA): filter by license, category, source and size, get a ready-to-paste attribution line with the license URL, and optionally download the files, deduped, resized and zipped. No API key needed.",
    "version": "0.1",
    "x-build-id": "RnyzMfULYpNDOdZEX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~openverse-image-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-openverse-image-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/data-done-right~openverse-image-search/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-openverse-image-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/data-done-right~openverse-image-search/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-openverse-image-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Search words",
            "type": "array",
            "description": "What to search for, one search per line. Example: sunset beach. Each search returns up to 'Max results per search' images. Openverse allows only 200 anonymous API requests per day per IP address, and one request returns 20 images.",
            "items": {
              "type": "string"
            }
          },
          "licenses": {
            "title": "Licenses",
            "type": "array",
            "description": "Keep only these licenses. Leave empty for all. cc0 and pdm are public domain; by = CC BY (credit required); by-sa = share-alike; nc = non-commercial; nd = no derivatives. Example: cc0, by.",
            "items": {
              "type": "string",
              "enum": [
                "cc0",
                "pdm",
                "by",
                "by-sa",
                "by-nc",
                "by-nd",
                "by-nc-sa",
                "by-nc-nd"
              ],
              "enumTitles": [
                "CC0 (public domain dedication)",
                "Public Domain Mark",
                "CC BY",
                "CC BY-SA",
                "CC BY-NC",
                "CC BY-ND",
                "CC BY-NC-SA",
                "CC BY-NC-ND"
              ]
            }
          },
          "licenseType": {
            "title": "License type shortcut",
            "enum": [
              "all",
              "commercial",
              "modification",
              "all-cc"
            ],
            "type": "string",
            "description": "Shortcut on top of 'Licenses'. commercial = licenses that allow commercial use; modification = licenses that allow editing; all-cc = Creative Commons only (no public domain mark). all = no shortcut.",
            "default": "all"
          },
          "categories": {
            "title": "Image categories",
            "type": "array",
            "description": "Keep only these image categories. Leave empty for all. Not every image has a category in Openverse, so a category filter can hide many results.",
            "items": {
              "type": "string",
              "enum": [
                "photograph",
                "illustration",
                "digitized_artwork"
              ],
              "enumTitles": [
                "Photograph",
                "Illustration",
                "Digitized artwork"
              ]
            }
          },
          "extensions": {
            "title": "File types",
            "type": "array",
            "description": "Keep only these file types. Leave empty for all. The type is the one Openverse has on record, not checked against the file.",
            "items": {
              "type": "string",
              "enum": [
                "jpg",
                "png",
                "gif",
                "svg"
              ],
              "enumTitles": [
                "JPG",
                "PNG",
                "GIF",
                "SVG"
              ]
            }
          },
          "aspectRatio": {
            "title": "Shape",
            "enum": [
              "",
              "tall",
              "wide",
              "square"
            ],
            "type": "string",
            "description": "Tall, wide or square images only. Leave empty for any shape.",
            "default": ""
          },
          "size": {
            "title": "Size class",
            "enum": [
              "",
              "small",
              "medium",
              "large"
            ],
            "type": "string",
            "description": "Openverse size class: small, medium or large. Leave empty for any size. For exact pixels use min width and min height.",
            "default": ""
          },
          "sources": {
            "title": "Sources",
            "type": "string",
            "description": "Optional: only these Openverse sources, comma separated. Example: flickr,wikimedia. Source names are the ones listed at api.openverse.org/v1/images/stats/. A name that does not exist makes Openverse reject the search."
          },
          "minWidth": {
            "title": "Min width (px)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Drop images narrower than this, using the width Openverse has on record. 0 = no filter. Images without a recorded width are dropped when this is set. Example: 1200.",
            "default": 0
          },
          "minHeight": {
            "title": "Min height (px)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Drop images shorter than this, using the height Openverse has on record. 0 = no filter. Example: 800.",
            "default": 0
          },
          "includeMature": {
            "title": "Include mature content",
            "type": "boolean",
            "description": "Off by default: results flagged as sensitive or mature are left out. Turn on to include them.",
            "default": false
          },
          "maxResultsPerQuery": {
            "title": "Max results per search",
            "minimum": 1,
            "maximum": 240,
            "type": "integer",
            "description": "Most images returned for each search word. Openverse limits anonymous searches to their first 240 results. One API request returns 20 images.",
            "default": 20
          },
          "maxResults": {
            "title": "Max results in total",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Most images returned in the whole run, over all searches. Images beyond this are not returned and not charged.",
            "default": 100
          },
          "download": {
            "title": "Download the image files",
            "type": "boolean",
            "description": "Also download each image into the key-value store and add a public link (fileUrl) to the row. Charged per file on top of the result. Off: you get the records and attribution text only.",
            "default": false
          },
          "downloadSize": {
            "title": "What to download",
            "enum": [
              "original",
              "thumbnail"
            ],
            "type": "string",
            "description": "original = the image file from its own website (can be large, and some hosts refuse downloads). thumbnail = the roughly 600 px version served by Openverse itself, which is faster and more reliable.",
            "default": "original"
          },
          "convertTo": {
            "title": "Convert images to",
            "enum": [
              "original",
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Keep the original format, or convert to JPG, PNG or WebP with Pillow. Transparency is flattened onto white for JPG. SVG stays SVG. Animations keep only the first frame.",
            "default": "original"
          },
          "maxWidth": {
            "title": "Max width (px)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Shrink downloaded images wider than this, keeping the aspect ratio (never upscales). 0 = original size. Example: 1600.",
            "default": 0
          },
          "quality": {
            "title": "JPG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 to 100, used when images are converted or resized to JPG or WebP.",
            "default": 85
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "Downloaded files larger than this are skipped. 1 MB = 1,000,000 bytes.",
            "default": 25
          },
          "zip": {
            "title": "Also make one ZIP",
            "type": "boolean",
            "description": "Also save all downloaded files in one images.zip, with manifest.csv and ATTRIBUTION.txt (license and credit line of every file). The link is in the SUMMARY record. The ZIP itself is free.",
            "default": false
          },
          "zipMaxMb": {
            "title": "Max ZIP size (MB)",
            "minimum": 1,
            "maximum": 300,
            "type": "number",
            "description": "Files that would push the ZIP over this size stay in the key-value store but are left out of the ZIP.",
            "default": 100
          },
          "outputStoreName": {
            "title": "Save files in a named store",
            "type": "string",
            "description": "Optional key-value store name. Named stores are kept until you delete them, while a run's own store expires after your plan's retention period."
          },
          "concurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many files are downloaded at the same time.",
            "default": 4
          },
          "perHostDelayMs": {
            "title": "Delay per host (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum time between two downloads from the same website. At most 3 run at once per host.",
            "default": 300
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 5,
            "maximum": 600,
            "type": "integer",
            "description": "Time allowed for each API request or file download attempt. Failed requests are retried up to 3 times with backoff.",
            "default": 60
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}