Daring Foods Media API

Public, unauthenticated read access to the media library behind daring.com - packaging and product photography, recipe imagery and site assets. Verified live at 749 attachments, each with every generated size variant and its own source URL.

OpenAPI Specification

daring-foods-media-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Daring Foods Media API
  version: wp/v2
  summary: Public read access to the daring.com media library - product photography and recipe imagery.
  description: 'Public, unauthenticated read access to the WordPress media library behind daring.com: 749 attachments at time of capture (observed in the X-WP-Total header), covering packaging and product photography, recipe imagery and site assets. Each record carries `source_url` (the canonical file), `mime_type`, `alt_text`, `filename`, `filesize`, and a `media_details` block enumerating every generated size variant with its own URL, width and height - which makes this the practical way to resolve the `featured_media` ID returned by the products, recipes, foodservice-products, posts and pages collections. Images are served from https://daring.com/wp-content/uploads/ and are subject to the site''s Terms & Conditions.'
  contact:
    name: Daring Foods
    url: https://daring.com/faq/
  license:
    name: Site content - all rights reserved; see Terms & Conditions
    url: https://daring.com/terms-and-conditions/
  x-apis-io-provenance:
    method: derived
    source: https://daring.com/wp-json/
    derived_on: '2026-08-04'
    note: Routes enumerated from the live WordPress route index at https://daring.com/wp-json/ (222 routes across 10 namespaces) on 2026-08-04, then probed anonymously one at a time; only routes verified to return HTTP 200 without credentials are documented here. Schemas reflect fields observed in the live responses. Write methods exist on the same routes but require WordPress authentication (cookie + X-WP-Nonce, or Application Passwords) and return HTTP 401 anonymously, so they are not documented. No fabricated operations, parameters or fields.
servers:
- url: https://daring.com/wp-json
  description: Production
tags:
- name: Media
  description: Media library attachments - product and recipe imagery.
paths:
  /wp/v2/media:
    get:
      tags:
      - Media
      operationId: listMedia
      summary: List media items
      description: Returns a paginated collection of media attachments. Verified live at 749 items.
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/perPage'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/order'
      - $ref: '#/components/parameters/orderby'
      - $ref: '#/components/parameters/context'
      - $ref: '#/components/parameters/slugFilter'
      - $ref: '#/components/parameters/include'
      - $ref: '#/components/parameters/exclude'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/fields'
      - name: media_type
        in: query
        description: Limit results to attachments of a specific media type.
        schema:
          type: string
          enum:
          - image
          - video
          - text
          - application
          - audio
      - name: mime_type
        in: query
        description: Limit results to attachments of a specific MIME type.
        schema:
          type: string
      - name: parent
        in: query
        description: Limit results to attachments of the given parent object IDs.
        schema:
          type: array
          items:
            type: integer
      responses:
        '200':
          description: A page of media items.
          headers:
            X-WP-Total:
              $ref: '#/components/headers/XWPTotal'
            X-WP-TotalPages:
              $ref: '#/components/headers/XWPTotalPages'
            Link:
              $ref: '#/components/headers/LinkPagination'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MediaItem'
              example:
              - id: 1648
                date: '2026-06-23T19:23:29'
                slug: crispy-buffalo-plant-chicken-quesadillas
                link: https://daring.com/recipes/crispy-buffalo-plant-chicken-quesadillas/crispy-buffalo-plant-chicken-quesadillas/
                title:
                  rendered: Crispy Buffalo Plant Chicken Quesadillas
                alt_text: Crispy Buffalo Plant Chicken Quesadillas
                media_type: image
                mime_type: image/jpeg
                source_url: https://daring.com/wp-content/uploads/2026/06/Crispy-Buffalo-Plant-Chicken-Quesadillas.jpg
                filename: Crispy-Buffalo-Plant-Chicken-Quesadillas.jpg
                filesize: 1241231
        '400':
          description: Invalid request parameter (rest_invalid_param).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: rest_invalid_param
                message: 'Invalid parameter(s): per_page'
                data:
                  status: 400
                  params:
                    per_page: per_page must be between 1 (inclusive) and 100 (inclusive)
  /wp/v2/media/{id}:
    get:
      tags:
      - Media
      operationId: getMediaItem
      summary: Retrieve a media item
      description: Returns a single media attachment by numeric ID, including every generated size variant. Use this to resolve a `featured_media` ID from any content collection.
      parameters:
      - $ref: '#/components/parameters/idPath'
      - $ref: '#/components/parameters/context'
      - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: The requested media item.
          headers:
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaItem'
              example:
                id: 1648
                date: '2026-06-23T19:23:29'
                slug: crispy-buffalo-plant-chicken-quesadillas
                link: https://daring.com/recipes/crispy-buffalo-plant-chicken-quesadillas/crispy-buffalo-plant-chicken-quesadillas/
                title:
                  rendered: Crispy Buffalo Plant Chicken Quesadillas
                alt_text: Crispy Buffalo Plant Chicken Quesadillas
                media_type: image
                mime_type: image/jpeg
                source_url: https://daring.com/wp-content/uploads/2026/06/Crispy-Buffalo-Plant-Chicken-Quesadillas.jpg
                filename: Crispy-Buffalo-Plant-Chicken-Quesadillas.jpg
                filesize: 1241231
        '404':
          description: Object not found, or no route matches the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: rest_post_invalid_id
                message: Invalid post ID.
                data:
                  status: 404
components:
  parameters:
    orderby:
      name: orderby
      in: query
      description: Field to sort the collection by.
      schema:
        type: string
        enum:
        - date
        - id
        - include
        - modified
        - relevance
        - slug
        - title
        default: date
    offset:
      name: offset
      in: query
      description: Offset the result set by a specific number of items.
      schema:
        type: integer
        minimum: 0
    context:
      name: context
      in: query
      description: Scope under which the request is made; determines the fields present in the response. Anonymous callers may use `view` and `embed` only - `edit` returns HTTP 401.
      schema:
        type: string
        enum:
        - view
        - embed
        default: view
    order:
      name: order
      in: query
      description: Sort direction.
      schema:
        type: string
        enum:
        - asc
        - desc
        default: desc
    slugFilter:
      name: slug
      in: query
      description: Limit results to items with one of the given slugs.
      schema:
        type: array
        items:
          type: string
    page:
      name: page
      in: query
      description: Current page of the collection (1-based).
      schema:
        type: integer
        minimum: 1
        default: 1
    exclude:
      name: exclude
      in: query
      description: Ensure result set excludes specific IDs.
      schema:
        type: array
        items:
          type: integer
    idPath:
      name: id
      in: path
      required: true
      description: Unique numeric identifier for the object.
      schema:
        type: integer
    perPage:
      name: per_page
      in: query
      description: Maximum number of items returned per page. Verified server cap is 100; a larger value returns HTTP 400 rest_invalid_param.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
    include:
      name: include
      in: query
      description: Limit result set to specific IDs.
      schema:
        type: array
        items:
          type: integer
    search:
      name: search
      in: query
      description: Limit results to those matching a free-text string.
      schema:
        type: string
    fields:
      name: _fields
      in: query
      description: Comma-separated list of fields to limit the response to (e.g. `id,slug,title,link`). A WordPress core response-shaping convention, verified working on this host.
      schema:
        type: string
  schemas:
    MediaItem:
      type: object
      description: A media library attachment.
      properties:
        id:
          type: integer
        date:
          type: string
          format: date-time
        modified:
          type: string
          format: date-time
        slug:
          type: string
        type:
          type: string
          examples:
          - attachment
        link:
          type: string
          format: uri
          description: Attachment page URL on daring.com.
        title:
          type: object
          properties:
            rendered:
              type: string
        author:
          type: integer
        caption:
          type: object
          properties:
            rendered:
              type: string
        description:
          type: object
          properties:
            rendered:
              type: string
        alt_text:
          type: string
          description: Alternative text for accessibility. Frequently empty on this host.
        media_type:
          type: string
          examples:
          - image
        mime_type:
          type: string
          examples:
          - image/jpeg
        filename:
          type: string
        filesize:
          type: integer
          description: Size of the original file in bytes.
        media_details:
          type: object
          description: Width, height, file path, EXIF metadata, and a `sizes` map of every generated variant with its own source_url.
        source_url:
          type: string
          format: uri
          description: Direct URL of the original uploaded file.
        post:
          type:
          - integer
          - 'null'
          description: ID of the object the attachment is attached to.
        _links:
          type: object
    Error:
      type: object
      description: 'The WordPress REST error envelope. NOTE: this is NOT RFC 9457 problem+json - the media type is application/json and the shape is {code, message, data}.'
      required:
      - code
      - message
      - data
      properties:
        code:
          type: string
          description: Machine-readable WordPress error code, e.g. rest_post_invalid_id, rest_invalid_param, rest_no_route.
          examples:
          - rest_post_invalid_id
        message:
          type: string
          description: Human-readable error message.
          examples:
          - Invalid post ID.
        data:
          type: object
          properties:
            status:
              type: integer
              description: HTTP status code, repeated in the body.
              examples:
              - 404
            params:
              type: object
              additionalProperties:
                type: string
              description: 'Present on rest_invalid_param: per-parameter validation messages.'
            details:
              type: object
              description: 'Present on rest_invalid_param: per-parameter structured detail.'
  headers:
    LinkPagination:
      description: RFC 8288 Link header carrying `prev` and `next` relations for the collection.
      schema:
        type: string
    XWPTotal:
      description: Total number of items in the unpaginated collection.
      schema:
        type: integer
    XWPTotalPages:
      description: Total number of pages available at the requested per_page size.
      schema:
        type: integer
    CacheControl:
      description: 'Observed as `max-age=600, must-revalidate` on this host (WP Engine edge cache, x-cacheable: SHORT).'
      schema:
        type: string