{
  "openapi": "3.0.1",
  "info": {
    "title": "Legislation Radar — New Laws, Regulations & Bills",
    "description": "New laws in one feed: EU regulations, directives and decisions (EUR-Lex), UK Acts and statutory instruments of all four nations, US public laws and bill texts. Number, title, date, official text and PDF links; AI summaries. From $3 per 1,000 laws.",
    "version": "0.1",
    "x-build-id": "5KNDVrXrcziHJUcde"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tacps126~legislation-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tacps126-legislation-radar",
        "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/tacps126~legislation-radar/runs": {
      "post": {
        "operationId": "runs-sync-tacps126-legislation-radar",
        "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/tacps126~legislation-radar/run-sync": {
      "post": {
        "operationId": "run-sync-tacps126-legislation-radar",
        "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",
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Whole words matched on the title, e.g. sanctions, data, emissions, tax.",
            "items": {
              "type": "string"
            }
          },
          "sectors": {
            "title": "Sectors",
            "type": "array",
            "description": "Only tenders in these sectors, from their CPV / UNSPSC codes and words in several languages.",
            "items": {
              "type": "string",
              "enum": [
                "banking",
                "securities",
                "insurance",
                "tax",
                "trade",
                "health",
                "food",
                "energy",
                "environment",
                "tech",
                "transport",
                "employment",
                "housing",
                "defense",
                "education"
              ],
              "enumTitles": [
                "Banking & payments",
                "Securities & capital markets",
                "Insurance & pensions",
                "Tax & customs",
                "Trade, sanctions & export control",
                "Health & pharma",
                "Food & agriculture",
                "Energy",
                "Environment & climate",
                "Technology, AI & data",
                "Transport & aviation",
                "Employment & labour",
                "Construction, housing & real estate",
                "Defence & security",
                "Education"
              ]
            }
          },
          "countries": {
            "title": "Jurisdictions",
            "type": "array",
            "description": "Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "AU",
                "CA",
                "EU",
                "GB",
                "US"
              ],
              "enumTitles": [
                "Australia (Federal Register of Legislation: Acts and legislative instruments)",
                "Canada (Canada Gazette, Part II: regulations and statutory instruments)",
                "European Union (EUR-Lex)",
                "United Kingdom (legislation.gov.uk: UK, Scotland, Wales, Northern Ireland)",
                "United States (GovInfo: public laws and bills)"
              ]
            }
          },
          "kinds": {
            "title": "Kinds",
            "type": "array",
            "description": "Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "regulation",
                "directive",
                "decision",
                "act",
                "statutory-instrument",
                "public-law",
                "bill"
              ],
              "enumTitles": [
                "EU regulation; Canadian regulation (SOR)",
                "EU directive",
                "EU decision",
                "Act (UK and devolved, Australia)",
                "Statutory instrument (UK, Scottish, Welsh, NI; Australian legislative instrument; Canadian SI)",
                "US public law",
                "US bill"
              ]
            }
          },
          "postedWithinDays": {
            "title": "Within the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Laws dated (adopted, made or published) in this window.",
            "default": 7
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Leave out laws whose title contains any of these (e.g. corrigendum, road traffic).",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources (optional)",
            "type": "array",
            "description": "Pick specific sources instead of jurisdictions.",
            "items": {
              "type": "string",
              "enum": [
                "eu-eurlex",
                "uk-legislation",
                "us-public-laws",
                "us-bills",
                "au-legislation",
                "ca-regulations"
              ],
              "enumTitles": [
                "EU — EUR-Lex",
                "UK — legislation.gov.uk",
                "US — public laws",
                "US — bill texts",
                "Australia — Federal Register of Legislation",
                "Canada — Canada Gazette, Part II"
              ]
            }
          },
          "maxItemsPerSource": {
            "title": "Max per source",
            "minimum": 1,
            "type": "integer",
            "description": "Most laws kept from each source.",
            "default": 300
          },
          "maxItems": {
            "title": "Max in total",
            "minimum": 1,
            "type": "integer",
            "description": "Most laws returned (newest first).",
            "default": 500
          },
          "aiInsights": {
            "title": "AI insights",
            "type": "boolean",
            "description": "Add an `insight` to each law: what it does or changes in plain words, who is affected, and what to do. With a profile, also a 0-100 relevance score.",
            "default": false
          },
          "aiProfile": {
            "title": "Your profile (for the fit score)",
            "type": "string",
            "description": "What your organisation does and where, e.g. \"Online lender in Ireland and the UK; consumer credit and payments\"."
          },
          "aiLanguage": {
            "title": "Insight language",
            "type": "string",
            "description": "Insights are written in this language, whatever the source language.",
            "default": "English"
          },
          "maxInsights": {
            "title": "Max insights per run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Insights are added to the first N laws (newest first).",
            "default": 25
          },
          "aiProvider": {
            "title": "AI provider",
            "enum": [
              "apify",
              "anthropic",
              "openai",
              "gemini",
              "openrouter",
              "groq",
              "mistral",
              "deepseek",
              "compatible"
            ],
            "type": "string",
            "description": "Which AI does the analysis. Apify needs no key: the model runs through Apify's OpenRouter proxy and is billed to your Apify account. Any other provider uses your own key and bills you there.",
            "default": "apify"
          },
          "aiApiKey": {
            "title": "AI API key",
            "type": "string",
            "description": "Your own key for the provider above (not needed for Apify). Sent only to that provider, never stored."
          },
          "aiModel": {
            "title": "AI model",
            "type": "string",
            "description": "Model name. Apify: an OpenRouter id like anthropic/claude-sonnet-… or google/gemini-… (default: the newest Claude Haiku listed, a light model since it runs once per result). Anthropic: default claude-opus-5-5. Others: required."
          },
          "aiBaseUrl": {
            "title": "API base URL",
            "type": "string",
            "description": "Only for \"Other OpenAI-compatible API\", e.g. http://localhost:11434/v1 for Ollama."
          },
          "onlyNew": {
            "title": "Only new laws",
            "type": "boolean",
            "description": "Schedule the Actor (daily or weekly) and each run returns only laws and bills earlier runs didn't deliver.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional name for the “only new” history, so several monitors can run side by side."
          },
          "delivery": {
            "title": "Send results to Slack, Discord, a webhook or Google Sheets",
            "type": "object",
            "description": "Webhook: {\"webhookUrl\": \"https://…\", \"format\": \"json\" | \"slack\" | \"discord\", \"onlyWhenResults\": true, \"includeItems\": 10}. Google Sheets: {\"spreadsheetId\": \"<id from the sheet URL>\", \"sheetName\": \"Sheet1\"} plus the service account key below; share the sheet with the service account's e-mail first. Leave empty to only save results in the dataset."
          },
          "googleServiceAccountJson": {
            "title": "Google service account key (for Sheets)",
            "type": "string",
            "description": "Only for Google Sheets delivery: paste the service account's JSON key. Stored encrypted; the account sees only sheets you share with it."
          },
          "tenantId": {
            "title": "Tenant ID",
            "type": "string",
            "description": "Optional label used to keep separate histories for different clients or teams."
          },
          "debug": {
            "title": "Debug",
            "type": "boolean",
            "description": "Save extra diagnostics with the run (for support requests).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}