Overview

The GovContractScout API provides programmatic access to state and local government contract data, plus our AI-powered matching algorithm. Use it to search contracts, score them against your business profile, and integrate government procurement intelligence into your workflow.

Base URL

https://www.govcontractscout.com/api/v1
Version
1.0.0
Format
JSON (application/json)
Authentication
Bearer token

Available Endpoints

MethodEndpointDescription
GET/v1/contractsSearch and filter contracts
GET/v1/contracts/:idGet contract details
GET/v1/statesList states with contract counts
GET/v1/naicsList NAICS codes with contract counts
POST/v1/matchScore a contract against a profile
POST/v1/match/batchScore multiple contracts (max 50)
POST/v1/match/searchSearch contracts with match scoring
GET/v1/usageCheck your API usage

Authentication

All API requests require a valid API key sent via the Authorization header as a Bearer token.

bash
curl -X GET "https://www.govcontractscout.com/api/v1/contracts" \
  -H "Authorization: Bearer gcs_live_xxxxxxxxxxxxxxxxxxxx"

Key Types

PrefixEnvironmentData
gcs_live_ProductionReal contracts
gcs_test_SandboxSample data

Getting an API Key

  1. Log into your GovContractScout dashboard
  2. Navigate to API Keys
  3. Click "Create New Key" and give it a name
  4. Copy the key immediately — it is only shown once
Security: Your API key is displayed only once at creation. Store it securely. If compromised, revoke it from your dashboard and create a new one.

Rate Limits

API requests are rate-limited based on your plan. Limits are applied per API key.

PlanRequests / MinuteRequests / Month
Starter6010,000
Growth300100,000
EnterpriseCustomUnlimited

Response Headers

Every API response includes rate limit headers so you can track your usage programmatically:

http
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1709500000
ParameterTypeRequiredDescription
X-RateLimit-LimitintegerNoMax requests per minute for your plan
X-RateLimit-RemainingintegerNoRequests remaining in current window
X-RateLimit-ResetintegerNoUnix timestamp when the window resets

Handling 429 Responses

When you exceed the rate limit, the API returns a 429 status with a retry_after value in seconds:

json
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Retry after 45 seconds.",
    "retry_after": 45
  }
}

Error Handling

The API uses standard HTTP status codes and returns consistent error objects. All errors follow this format:

json
{
  "error": {
    "code": "error_code",
    "message": "Human-readable description",
    "param": "field_name",
    "doc_url": "https://docs.govcontractscout.com/errors/error_code"
  }
}

Error Codes

CodeHTTP StatusDescription
invalid_api_key401API key is missing, invalid, or revoked
rate_limit_exceeded429Too many requests, retry after the specified delay
invalid_parameter400A query parameter or body field has an invalid value
missing_parameter400A required parameter was not provided
resource_not_found404The requested contract or resource does not exist
validation_error422Request body failed validation (details array included)
server_error500Internal server error

Validation Errors

When request body validation fails, the response includes a details array with per-field errors:

json
{
  "error": {
    "code": "validation_error",
    "message": "Request body validation failed",
    "details": [
      { "field": "profile.naics_codes", "message": "Must be an array of strings" },
      { "field": "profile.service_areas", "message": "Required field missing" }
    ],
    "doc_url": "https://docs.govcontractscout.com/errors/validation_error"
  }
}

List Contracts

GET/v1/contracts

Search and filter the contract database. Returns paginated results without the full description field (use the detail endpoint for that).

Query Parameters

ParameterTypeRequiredDescription
statestringNoSingle state filter, 2-letter code (e.g., "CA")
statesstringNoComma-separated state codes (e.g., "CA,TX,NY")
naicsstringNoNAICS code or prefix (e.g., "541512" or "541")
naics_codesstringNoComma-separated exact NAICS codes
min_valueintegerNoMinimum estimated value in dollars
max_valueintegerNoMaximum estimated value in dollars
keywordstringNoKeyword search on contract title
agencystringNoAgency name, partial match (case-insensitive)
due_afterstringNoISO 8601 date, contracts due after this date
due_beforestringNoISO 8601 date, contracts due before this date
posted_afterstringNoISO 8601 date, contracts posted after this date
statusstringNo"active" (default), "expired", or "all"
sortstringNo"due_date", "posted_date", "value", or "title"
orderstringNo"asc" or "desc" (default)
pageintegerNoPage number (default: 1)
per_pageintegerNoResults per page (default: 20, max: 100)

Example

bash
curl -X GET "https://www.govcontractscout.com/api/v1/contracts?states=CA,TX&naics=541512&min_value=100000&status=active" \
  -H "Authorization: Bearer gcs_live_xxxx"

Response

json
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "title": "IT Infrastructure Modernization",
      "contract_number": "RFP-2026-0142",
      "state": "CA",
      "agency": "California Department of Technology",
      "location": "Sacramento, CA",
      "posting_date": "2026-02-15T00:00:00Z",
      "due_date": "2026-03-30T17:00:00Z",
      "estimated_value": 500000,
      "naics_codes": ["541512", "541519"],
      "keywords": ["cloud", "migration", "aws", "security"],
      "source_portal": "California eProcure",
      "source_url": "https://caleprocure.ca.gov/event/...",
      "status": "active",
      "days_until_due": 27,
      "created_at": "2026-02-15T08:30:00Z"
    }
  ],
  "meta": {
    "total": 1547,
    "page": 1,
    "per_page": 20,
    "total_pages": 78
  }
}

Get Contract

GET/v1/contracts/:id

Get full details for a single contract, including the full description and updated_at timestamp.

Path Parameters

ParameterTypeRequiredDescription
idstring (UUID)YesContract UUID

Example

bash
curl -X GET "https://www.govcontractscout.com/api/v1/contracts/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer gcs_live_xxxx"

Response

json
{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "title": "IT Infrastructure Modernization",
    "contract_number": "RFP-2026-0142",
    "state": "CA",
    "agency": "California Department of Technology",
    "location": "Sacramento, CA",
    "posting_date": "2026-02-15T00:00:00Z",
    "due_date": "2026-03-30T17:00:00Z",
    "estimated_value": 500000,
    "naics_codes": ["541512", "541519"],
    "keywords": ["cloud", "migration", "aws", "security"],
    "description": "The California Department of Technology (CDT) is seeking qualified vendors...",
    "source_portal": "California eProcure",
    "source_url": "https://caleprocure.ca.gov/event/...",
    "status": "active",
    "days_until_due": 27,
    "created_at": "2026-02-15T08:30:00Z",
    "updated_at": "2026-02-15T08:30:00Z"
  }
}

List States

GET/v1/states

Get a list of supported U.S. states with the number of currently active contracts in each.

Example

bash
curl -X GET "https://www.govcontractscout.com/api/v1/states" \
  -H "Authorization: Bearer gcs_live_xxxx"

Response

json
{
  "data": [
    { "code": "CA", "name": "California", "active_contracts": 2341 },
    { "code": "FL", "name": "Florida", "active_contracts": 1234 },
    { "code": "NY", "name": "New York", "active_contracts": 1543 },
    { "code": "TX", "name": "Texas", "active_contracts": 1876 }
  ]
}

List NAICS Codes

GET/v1/naics

Get NAICS codes used in the contract database, with active contract counts. Optionally filter by code prefix or search by name.

Query Parameters

ParameterTypeRequiredDescription
prefixstringNoFilter by NAICS code prefix, 2-6 digits (e.g., "541")
searchstringNoSearch by name, case-insensitive (e.g., "engineering")

Example

bash
curl -X GET "https://www.govcontractscout.com/api/v1/naics?prefix=541" \
  -H "Authorization: Bearer gcs_live_xxxx"

Response

json
{
  "data": [
    { "code": "541330", "name": "Engineering Services", "active_contracts": 892 },
    { "code": "541512", "name": "Computer Systems Design Services", "active_contracts": 654 },
    { "code": "541519", "name": "Other Computer Related Services", "active_contracts": 432 },
    { "code": "541611", "name": "Administrative Management Consulting", "active_contracts": 387 }
  ]
}

Score Contract

POST/v1/match

Calculate a match score for a single contract against your contractor profile. Uses a 5-factor algorithm: NAICS codes (30%), keywords/skills (25%), budget fit (20%), location (15%), and timeline (10%).

Request Body

ParameterTypeRequiredDescription
contract_idstring (UUID)YesThe contract to score
profile.naics_codesstring[]YesYour NAICS codes (max 5)
profile.primary_skillsstring[]YesYour core competencies
profile.secondary_skillsstring[]NoAdditional skills
profile.service_areasstring[]YesStates you can work in (2-letter codes)
profile.headquarters_statestringYesYour HQ state (2-letter code)
profile.min_contract_valueintegerNoMinimum contract value you would bid on
profile.max_contract_valueintegerNoMaximum contract value you can handle
profile.min_days_to_deadlineintegerNoMinimum days needed to prepare a bid (default: 30)
profile.remote_capablebooleanNoCan perform work remotely (default: false)

Example

bash
curl -X POST "https://www.govcontractscout.com/api/v1/match" \
  -H "Authorization: Bearer gcs_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "contract_id": "550e8400-e29b-41d4-a716-446655440000",
    "profile": {
      "naics_codes": ["541512", "541519"],
      "primary_skills": ["cloud migration", "aws", "devops"],
      "secondary_skills": ["security", "terraform"],
      "service_areas": ["CA", "NV", "OR"],
      "headquarters_state": "CA",
      "min_contract_value": 50000,
      "max_contract_value": 1000000,
      "remote_capable": true
    }
  }'

Response

json
{
  "data": {
    "contract_id": "550e8400-e29b-41d4-a716-446655440000",
    "match_score": 87,
    "match_grade": "excellent",
    "breakdown": {
      "naics_score": 100,
      "naics_weight": 0.30,
      "budget_score": 100,
      "budget_weight": 0.20,
      "location_score": 100,
      "location_weight": 0.15,
      "keywords_score": 72,
      "keywords_weight": 0.25,
      "timeline_score": 80,
      "timeline_weight": 0.10
    },
    "match_reasons": [
      "Strong industry match - NAICS codes align perfectly",
      "Contract value ($500,000) fits your budget range ($50K-$1M)",
      "Located in your service area (California)",
      "Your skills match: cloud, migration, aws, devops"
    ]
  }
}

Match Grades

GradeScore RangeMeaning
excellent85 – 100Strong fit, prioritize this contract
good70 – 84Good fit, worth reviewing
okay60 – 69Moderate fit, review if time permits
poor0 – 59Weak fit, likely skip

Batch Score

POST/v1/match/batch

Score multiple contracts against a profile in a single request. Maximum 50 contracts per request. Non-existent contract IDs are silently skipped.

Request Body

ParameterTypeRequiredDescription
contract_idsstring[] (UUIDs)YesArray of contract UUIDs to score (max 50)
profileobjectYesContractor profile (same shape as /match endpoint)

Example

bash
curl -X POST "https://www.govcontractscout.com/api/v1/match/batch" \
  -H "Authorization: Bearer gcs_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "contract_ids": [
      "550e8400-e29b-41d4-a716-446655440000",
      "550e8400-e29b-41d4-a716-446655440001",
      "550e8400-e29b-41d4-a716-446655440002"
    ],
    "profile": {
      "naics_codes": ["541512"],
      "primary_skills": ["cloud", "aws"],
      "service_areas": ["CA"],
      "headquarters_state": "CA"
    }
  }'

Response

json
{
  "data": [
    {
      "contract_id": "550e8400-e29b-41d4-a716-446655440000",
      "match_score": 87,
      "match_grade": "excellent",
      "breakdown": { ... },
      "match_reasons": [ ... ]
    },
    {
      "contract_id": "550e8400-e29b-41d4-a716-446655440001",
      "match_score": 72,
      "match_grade": "good",
      "breakdown": { ... },
      "match_reasons": [ ... ]
    }
  ]
}

API Usage

GET/v1/usage

Check your current API usage statistics, including requests used, remaining quota, and rate limit for the current billing period.

Example

bash
curl -X GET "https://www.govcontractscout.com/api/v1/usage" \
  -H "Authorization: Bearer gcs_live_xxxx"

Response

json
{
  "data": {
    "plan": "starter",
    "period_start": "2026-03-01",
    "period_end": "2026-03-31",
    "requests_used": 4521,
    "requests_limit": 10000,
    "requests_remaining": 5479,
    "rate_limit_per_minute": 60
  }
}

Need help?

Contact us at api-support@govcontractscout.com

Get started

Create your API key from the dashboard

Pricing

View plans starting at $99/month

GovContractScout API v1.0.0