← back to Norma

agents/datasource-agent/lib/petition-registry.js

66 lines

/**
 * Petition Registry — Petition platforms and civic engagement data sources.
 *
 * Used by the scrape-petitions skill to discover trending petitions,
 * legislative bills, and civic engagement campaigns worldwide.
 * Each entry includes name, URL, country code, platform type, and API details.
 */

const PETITION_PLATFORMS = [
  {
    name: 'UK Parliament Petitions',
    type: 'uk_parliament',
    url: 'https://petition.parliament.uk/petitions.json',
    country: 'GB',
    params: { state: 'open', page: 1 },
    platform_key: 'uk_parliament',
    has_json_api: true,
    description: 'Official UK Parliament e-petitions — open petitions with signature counts',
  },
  {
    name: 'OpenPetition EU',
    type: 'openpetition_eu',
    url: 'https://www.openpetition.eu/petition/neu',
    country: 'EU',
    params: {},
    platform_key: 'openpetition_eu',
    has_json_api: false,
    description: 'European citizen petition platform — HTML scrape of newest petitions',
  },
  {
    name: 'Decidim Barcelona',
    type: 'decidim',
    url: 'https://www.decidim.barcelona/api',
    country: 'ES',
    params: {},
    platform_key: 'decidim',
    has_json_api: true,
    graphql: true,
    description: 'Barcelona participatory democracy platform — GraphQL API for civic processes',
  },
  {
    name: 'GovTrack Bills',
    type: 'govtrack',
    url: 'https://www.govtrack.us/api/v2/bill',
    country: 'US',
    params: { order_by: '-current_status_date', limit: 20 },
    platform_key: 'govtrack',
    has_json_api: true,
    description: 'US Congressional bills tracker — JSON API for recent legislative activity',
  },
  {
    name: 'MoveOn Trending',
    type: 'moveon_trending',
    url: 'https://sign.moveon.org',
    country: 'US',
    params: {},
    platform_key: 'moveon',
    has_json_api: false,
    description: 'MoveOn.org petition platform — HTML scrape of trending campaigns',
  },
];

module.exports = {
  PETITION_PLATFORMS,
};