# French Public Procurement Trends

Builds monthly or yearly time series of awarded French public-contract volumes and amounts from DECP.

## Endpoint

- Method: `POST`
- URL: `https://api.helpmyagent.com/v1/procurement/fr/trends`
- Price: `0.020 USD` / call

## Machine discovery

- llms.txt: https://helpmyagent.com/llms.txt
- OpenAPI 3.1: https://api.helpmyagent.com/openapi.json
- capabilities.json: https://helpmyagent.com/capabilities.json
- MCP: https://helpmyagent.com/mcp
- RFC 9727: https://helpmyagent.com/.well-known/api-catalog
- pricing.json: https://helpmyagent.com/pricing.json
- x402: https://helpmyagent.com/.well-known/x402
- x402-service.json: https://helpmyagent.com/.well-known/x402-service.json
- Health status: https://helpmyagent.com/health

## x402 payment methods

- USDC on `eip155:8453`
- RLUSD on `xrpl:0`

## Coverage

FR

## Use when

- Track how French awarded public-contract volumes and amounts evolve month by month or year by year.

## Avoid when

- Use procurement/fr/market for a current segment overview without a time series.
- Use procurement/fr/search for open tender opportunities.

## Limitations

- The current partial month or year can mechanically reduce the latest period.

## Example queries

- Show monthly French public-procurement trends for CPV 641 over 24 months.

## Freshness

```json
{
    "mode": "source_dependent"
}
```

## Sources

- [Données essentielles de la commande publique (DECP)](https://www.data.economie.gouv.fr/api/explore/v2.1/catalog/datasets/decp-2022-marches-valides/records)

## Input schema

```json
{
    "type": "object",
    "properties": {
        "cpv_prefix": {
            "type": "string",
            "pattern": "^[0-9]{1,8}$",
            "description": "Optional CPV prefix used to restrict procurement records to a purchasing segment."
        },
        "department": {
            "type": "string",
            "pattern": "^(?:[0-9]{2,3}|2A|2B)$",
            "description": "Optional French department code used to restrict results geographically."
        },
        "buyer": {
            "type": "string",
            "minLength": 2,
            "maxLength": 200,
            "description": "Public-buyer name or identifier used to restrict procurement results. (minimum length 2; maximum length 200)."
        },
        "lookback_months": {
            "type": "integer",
            "minimum": 1,
            "maximum": 60,
            "default": 24,
            "description": "Optional value for “lookback months” as defined by this API contract. (minimum 1; maximum 60; default 24)."
        },
        "granularity": {
            "type": "string",
            "enum": [
                "month",
                "year"
            ],
            "default": "month",
            "description": "Optional value for “granularity” as defined by this API contract. (default month; allowed values: month, year)."
        }
    },
    "additionalProperties": false,
    "description": "Structured input parameters for the procurement/fr/trends API."
}
```

## Output schema

```json
{
    "type": "object",
    "properties": {
        "filters": {
            "type": "object",
            "properties": {
                "cpv_prefix": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "Structured value returned for “cpv prefix” as defined by this API contract."
                },
                "department": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "Structured value returned for “department” as defined by this API contract."
                },
                "buyer": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "Structured value returned for “buyer” as defined by this API contract."
                },
                "date_from": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "Structured value returned for “date from” as defined by this API contract."
                },
                "date_to": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "Structured value returned for “date to” as defined by this API contract."
                }
            },
            "required": [
                "cpv_prefix",
                "department",
                "buyer",
                "date_from",
                "date_to"
            ],
            "additionalProperties": false,
            "description": "Structured value returned for “filters” as defined by this API contract."
        },
        "lookback_months": {
            "type": "integer",
            "description": "Structured value returned for “lookback months” as defined by this API contract."
        },
        "granularity": {
            "type": "string",
            "enum": [
                "month",
                "year"
            ],
            "description": "Structured value returned for “granularity” as defined by this API contract. (allowed values: month, year)."
        },
        "source_status": {
            "type": "string",
            "enum": [
                "ok",
                "unavailable"
            ],
            "description": "Availability status of the relevant upstream public source. (allowed values: ok, unavailable)."
        },
        "periods_count": {
            "type": [
                "integer",
                "null"
            ],
            "description": "Structured value returned for “periods count” as defined by this API contract."
        },
        "latest_period_contracts_change_percent": {
            "type": [
                "number",
                "integer",
                "null"
            ],
            "description": "Structured value returned for “latest period contracts change percent” as defined by this API contract."
        },
        "series": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "period": {
                        "type": "string",
                        "description": "Structured value returned for “period” as defined by this API contract."
                    },
                    "contracts_count": {
                        "type": "integer",
                        "description": "Structured value returned for “contracts count” as defined by this API contract."
                    },
                    "total_amount": {
                        "type": [
                            "number",
                            "integer",
                            "null"
                        ],
                        "description": "Structured value returned for “total amount” as defined by this API contract."
                    },
                    "average_amount": {
                        "type": [
                            "number",
                            "integer",
                            "null"
                        ],
                        "description": "Structured value returned for “average amount” as defined by this API contract."
                    }
                },
                "required": [
                    "period",
                    "contracts_count",
                    "total_amount",
                    "average_amount"
                ],
                "additionalProperties": false
            },
            "description": "Structured value returned for “series” as defined by this API contract."
        },
        "generated_at": {
            "type": "string",
            "description": "UTC timestamp at which this derived result was generated."
        },
        "limitations": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "description": "Known interpretation, source-coverage or freshness limitations for this result."
        }
    },
    "required": [
        "filters",
        "lookback_months",
        "granularity",
        "source_status",
        "periods_count",
        "latest_period_contracts_change_percent",
        "series",
        "generated_at"
    ],
    "additionalProperties": false,
    "description": "Structured result returned by the procurement/fr/trends API."
}
```

## Request example

```json
{
    "cpv_prefix": "641",
    "lookback_months": 24,
    "granularity": "month"
}
```

## Billing policy

```json
{
    "charge_on": "valid_result",
    "no_charge_on_empty_result": true,
    "no_charge_on_error": true
}
```
