api.data.gov Harvest Records API

The Harvest Records API from api.data.gov — 7 operation(s) for harvest records.

Operations 7

GET /api/v1/harvest_error/{error_id} Get Harvest Error #
GET /api/v1/harvest_record/{record_id} Get Harvest Record #
GET /api/v1/harvest_record/{record_id}/errors List issues for a record #
GET /api/v1/harvest_record/{record_id}/raw Get Harvest Record Raw #
GET /api/v1/harvest_record/{record_id}/transformed Get Harvest Record Transformed #
GET /api/v1/harvest_record_errors/ Json Builder Query #
GET /api/v1/harvest_records/ Json Builder Query #

Specifications

Schemas & Data

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/api-data-gov:api-data-gov-harvest-records-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

api-data-gov-harvest-records-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Datagov Harvester Harvest Records API
  version: 0.1.0
servers:
- url: https://harvest.data.gov
tags:
- name: Harvest Records
paths:
  /api/v1/harvest_error/{error_id}:
    get:
      parameters:
      - in: path
        name: error_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
          description: Successful response
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Not found
      summary: Get Harvest Error
      tags:
      - Harvest Records
      operationId: getApiV1HarvestErrorByErrorId
      x-operation-id-source: derived
  /api/v1/harvest_record/{record_id}:
    get:
      parameters:
      - in: path
        name: record_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordInfo'
          description: Successful response
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Not found
      summary: Get Harvest Record
      tags:
      - Harvest Records
      operationId: getApiV1HarvestRecordByRecordId
      x-operation-id-source: derived
  /api/v1/harvest_record/{record_id}/errors:
    get:
      description: 'Accepts an optional `severity` query param ("error" or "warning"). With no

        param every issue is returned, matching the job-level reads (#799); the

        severity of each row is in the response. The interface function still

        defaults to "error", so None is passed explicitly.'
      parameters:
      - in: path
        name: record_id
        required: true
        schema:
          type: string
      - in: query
        name: severity
        required: false
        schema:
          enum:
          - error
          - warning
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ErrorInfo'
                type: array
          description: List of errors for this record
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: Validation error
      summary: List issues for a record
      tags:
      - Harvest Records
      operationId: getApiV1HarvestRecordByRecordIdErrors
      x-operation-id-source: derived
  /api/v1/harvest_record/{record_id}/raw:
    get:
      parameters:
      - in: path
        name: record_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              type: object
            application/xml:
              type: object
          description: Raw harvest record contents
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Not found
      summary: Get Harvest Record Raw
      tags:
      - Harvest Records
      operationId: getApiV1HarvestRecordByRecordIdRaw
      x-operation-id-source: derived
  /api/v1/harvest_record/{record_id}/transformed:
    get:
      parameters:
      - in: path
        name: record_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              type: object
          description: Transformed harvest record contents
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Not found
      summary: Get Harvest Record Transformed
      tags:
      - Harvest Records
      operationId: getApiV1HarvestRecordByRecordIdTransformed
      x-operation-id-source: derived
  /api/v1/harvest_record_errors/:
    get:
      parameters:
      - in: query
        name: harvest_job_id
        required: false
        schema:
          format: uuid
          type: string
      - in: query
        name: harvest_source_id
        required: false
        schema:
          format: uuid
          type: string
      - in: query
        name: facets
        required: false
        schema:
          type: string
      - in: query
        name: page
        required: false
        schema:
          type: integer
      - in: query
        name: per_page
        required: false
        schema:
          type: integer
      - in: query
        name: paginate
        required: false
        schema:
          type: boolean
      - in: query
        name: count
        required: false
        schema:
          type: boolean
      - in: query
        name: order_by
        required: false
        schema:
          type: string
      - in: query
        name: severity
        required: false
        schema:
          enum:
          - error
          - warning
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  oneOf:
                  - $ref: '#/components/schemas/ErrorInfo'
                  - $ref: '#/components/schemas/OrgInfo'
                  - $ref: '#/components/schemas/SourceInfo'
                  - $ref: '#/components/schemas/RecordInfo'
                  - $ref: '#/components/schemas/JobInfo'
                type: array
          description: List of reuslts for this query
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: Validation error
      summary: Json Builder Query
      tags:
      - Harvest Records
      operationId: getApiV1HarvestRecordErrors
      x-operation-id-source: derived
  /api/v1/harvest_records/:
    get:
      parameters:
      - in: query
        name: harvest_job_id
        required: false
        schema:
          format: uuid
          type: string
      - in: query
        name: harvest_source_id
        required: false
        schema:
          format: uuid
          type: string
      - in: query
        name: facets
        required: false
        schema:
          type: string
      - in: query
        name: page
        required: false
        schema:
          type: integer
      - in: query
        name: per_page
        required: false
        schema:
          type: integer
      - in: query
        name: paginate
        required: false
        schema:
          type: boolean
      - in: query
        name: count
        required: false
        schema:
          type: boolean
      - in: query
        name: order_by
        required: false
        schema:
          type: string
      - in: query
        name: severity
        required: false
        schema:
          enum:
          - error
          - warning
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  oneOf:
                  - $ref: '#/components/schemas/ErrorInfo'
                  - $ref: '#/components/schemas/OrgInfo'
                  - $ref: '#/components/schemas/SourceInfo'
                  - $ref: '#/components/schemas/RecordInfo'
                  - $ref: '#/components/schemas/JobInfo'
                type: array
          description: List of reuslts for this query
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: Validation error
      summary: Json Builder Query
      tags:
      - Harvest Records
      operationId: getApiV1HarvestRecords
      x-operation-id-source: derived
components:
  schemas:
    JobInfo:
      additionalProperties: false
      properties:
        date_created:
          format: date-time
          type: string
        date_finished:
          format: date-time
          type: string
        date_started:
          format: date-time
          type: string
        harvest_source_id:
          format: uuid
          type: string
        id:
          format: uuid
          type: string
        job_type:
          type: string
        records_added:
          type: integer
        records_deleted:
          type: integer
        records_errored:
          type: integer
        records_ignored:
          type: integer
        records_total:
          type: integer
        records_updated:
          type: integer
        records_validated:
          type: integer
        records_warned:
          type: integer
        status:
          enum:
          - in_progress
          - complete
          - new
          - error
          type: string
      required:
      - harvest_source_id
      - id
      - status
      type: object
    OrgInfo:
      additionalProperties: false
      properties:
        aliases:
          items:
            type: string
          type: array
        code_repo_exempt:
          type: boolean
        code_repo_url:
          type: string
        description:
          type: string
        id:
          format: uuid
          type: string
        logo:
          type: string
        name:
          type: string
        organization_type:
          enum:
          - Federal Government
          - City Government
          - State Government
          - County Government
          - University
          - Tribal
          - Non-Profit
          type: string
        slug:
          maxLength: 100
          pattern: ^[a-z0-9-]+$
          type: string
        source_count:
          type: integer
      required:
      - id
      - name
      - slug
      type: object
    ValidationError:
      properties:
        detail:
          properties:
            <location>:
              properties:
                <field_name>:
                  items:
                    type: string
                  type: array
              type: object
          type: object
        message:
          type: string
      type: object
    RecordInfo:
      additionalProperties: false
      properties:
        action:
          enum:
          - create
          - update
          - delete
          type: string
        ckan_id:
          type: string
        date_created:
          format: date-time
          type: string
        date_finished:
          format: date-time
          type: string
        harvest_job_id:
          format: uuid
          type: string
        harvest_source_id:
          format: uuid
          type: string
        id:
          format: uuid
          type: string
        identifier:
          type: string
        parent_identifier:
          type: string
        source_hash:
          type: string
        source_raw:
          type: string
        source_transform:
          additionalProperties: {}
          type: object
        status:
          enum:
          - error
          - success
          - dataset_pending
          type: string
      required:
      - harvest_job_id
      - harvest_source_id
      - id
      - identifier
      type: object
    SourceInfo:
      additionalProperties: false
      properties:
        collection_parent_url:
          type: string
        date_next_run:
          format: date-time
          type: string
        frequency:
          enum:
          - manual
          - daily
          - weekly
          - biweekly
          - monthly
          type: string
        id:
          type: string
        name:
          type: string
        notification_emails:
          items:
            type: string
          type: array
        notification_frequency:
          enum:
          - on_error
          - always
          - on_error_or_update
          type: string
        organization_id:
          format: uuid
          type: string
        schema_type:
          enum:
          - iso19115_1
          - iso19115_2
          - 'dcatus1.1: federal'
          - 'dcatus1.1: non-federal'
          - dcatus3.0
          type: string
        source_type:
          enum:
          - document
          - waf
          - waf-collection
          type: string
        url:
          type: string
      required:
      - frequency
      - id
      - name
      - notification_frequency
      - organization_id
      - schema_type
      - source_type
      - url
      type: object
    ErrorInfo:
      additionalProperties: false
      properties:
        date_created:
          format: date-time
          type: string
        harvest_job_id:
          format: uuid
          type: string
        harvest_record_id:
          format: uuid
          type: string
        id:
          format: uuid
          type: string
        message:
          type: string
        severity:
          enum:
          - error
          - warning
          type: string
        type:
          type: string
      required:
      - harvest_job_id
      - harvest_record_id
      - id
      type: object
    HTTPError:
      properties:
        detail:
          type: object
        message:
          type: string
      type: object