France Public Administration Directory Scraper avatar

France Public Administration Directory Scraper

Pricing

Pay per event

Go to Apify Store
France Public Administration Directory Scraper

France Public Administration Directory Scraper

Extract official French public administration contacts from Service Public for B2G sales, civic tech, public-affairs, and research workflows.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Share

Export official French public administration contacts from lannuaire.service-public.gouv.fr.

This Apify Actor turns the French government administration directory into a clean dataset for lead generation, public-affairs research, civic-tech products, procurement discovery, and local-service outreach.

What does France Public Administration Directory Scraper do?

It crawls official Service Public directory pages and saves structured records for public bodies in France.

Each result can include:

  • 🏛️ administration name
  • 🧭 administration type and selected category
  • 📍 address, postal code, city, commune, department, and region
  • ☎️ phone number
  • ✉️ email address or contact link when available
  • 🌐 website link when available
  • 🕒 opening hours
  • 🗺️ latitude and longitude
  • 🔗 official source URL

Who is it for?

B2G sales teams

Build prospect lists for municipalities, prefectures, social-security offices, courts, and other public bodies.

Public-affairs and lobbying teams

Monitor official contacts for local and national administration offices.

Civic-tech teams

Seed applications with reliable government-office metadata.

Procurement and grant researchers

Map public entities by region, department, or category before deeper research.

Local-service vendors

Find official local offices for outreach, support, and regional coverage planning.

Why use this scraper?

The source website is useful for browsing, but manual copying is slow.

This Actor provides:

  • ✅ repeatable exports
  • ✅ normalized contact fields
  • ✅ official source URLs for verification
  • ✅ category and direct URL workflows
  • ✅ no browser automation for lower cost

What website does it scrape?

The Actor targets the official French public administration directory:

https://lannuaire.service-public.gouv.fr/

The directory is operated as part of the Service Public ecosystem and lists French public organizations and offices.

What can you scrape?

Common category examples include:

  • mairie
  • prefecture
  • caf
  • cpam
  • tribunal
  • ministere

You can also provide direct directory URLs in the input.

Data table

FieldDescription
nameOfficial administration name
administrationTypeType such as Mairie or Préfecture
categoryCategory slug used for discovery
sourceUrlOfficial Service Public URL
regionRegion slug from the URL
departmentDepartment slug from the URL
communeCommune or locality
addressCombined address
streetAddressStreet address
postalCodePostal code
cityCity/locality
phonePhone number
emailEmail address
contactUrlContact page URL when found
websiteUrlExternal website URL when found
openingHoursOpening hours array
latitudeLatitude
longitudeLongitude
siretSIRET when present
lastUpdatedPage update text when present
scrapedAtExtraction timestamp

How much does it cost to scrape French public administration contacts?

The Actor uses pay-per-event pricing.

You pay a small start fee for the run and a per-record fee for each administration saved.

Because it uses HTTP requests instead of a full browser, it is designed to be cost-efficient for large official-directory exports.

How to run it

  1. Open the Actor on Apify.
  2. Choose one or more categories.
  3. Optionally add direct startUrls.
  4. Set maxItems.
  5. Keep includeDetails enabled for contact fields.
  6. Click Start.
  7. Export the dataset as JSON, CSV, Excel, XML, or RSS.

Input options

categories

Service Public category slugs to scrape.

Example:

["mairie", "prefecture"]

startUrls

Direct Service Public directory URLs.

Example:

[{ "url": "https://lannuaire.service-public.gouv.fr/navigation/mairie" }]

departments

Optional department slugs to narrow category pages.

Example:

["paris", "nord"]

maxItems

Maximum number of records to save.

Use a small value for testing and a larger value for production exports.

includeDetails

When enabled, the Actor opens each organization profile and extracts phone, email, address, hours, and coordinates.

Example input

{
"categories": ["mairie"],
"maxItems": 100,
"includeDetails": true,
"requestDelayMillis": 150
}

Example output

{
"name": "Mairie - Aast",
"administrationType": "Mairie",
"category": "mairie",
"sourceUrl": "https://lannuaire.service-public.gouv.fr/nouvelle-aquitaine/pyrenees-atlantiques/11ce58ab-4a56-43ae-a1d4-f195620c5748",
"region": "nouvelle-aquitaine",
"department": "pyrenees-atlantiques",
"commune": "Aast",
"address": "1 place de la Mairie, 64460, Aast",
"phone": "05 62 32 57 00",
"email": "contact@mairie-aast.fr",
"openingHours": ["Tuesday 08h30-17h00"],
"latitude": 43.289192,
"longitude": -0.0887339,
"scrapedAt": "2026-06-25T00:00:00.000Z"
}

Tips for better results

  • Start with one category and maxItems: 100.
  • Use direct URLs when you already know the source page.
  • Keep detail extraction on when you need contact information.
  • Increase requestDelayMillis for very large exports.
  • Export CSV when importing into a CRM.

Integrations

Use this scraper with:

  • 🧾 CRM enrichment workflows
  • 🗺️ territory mapping dashboards
  • 📬 outbound B2G lead lists
  • 🧑‍💼 public-affairs stakeholder databases
  • 🔎 procurement and grant research spreadsheets

API usage

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/france-public-administration-directory-scraper').call({
categories: ['mairie'],
maxItems: 100,
includeDetails: true,
});
console.log(run.defaultDatasetId);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('automation-lab/france-public-administration-directory-scraper').call(run_input={
'categories': ['mairie'],
'maxItems': 100,
'includeDetails': True,
})
print(run['defaultDatasetId'])

cURL

curl -X POST 'https://api.apify.com/v2/acts/automation-lab~france-public-administration-directory-scraper/runs?token=YOUR_APIFY_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"categories":["mairie"],"maxItems":100,"includeDetails":true}'

MCP integration

Use the Actor from Claude Desktop, Claude Code, or any MCP-compatible client through Apify MCP.

MCP tool URL:

https://mcp.apify.com/?tools=automation-lab/france-public-administration-directory-scraper

Claude Code setup:

claude mcp add apify-france-public-administration \
https://mcp.apify.com/?tools=automation-lab/france-public-administration-directory-scraper

Claude Desktop JSON config:

{
"mcpServers": {
"apify-france-public-administration": {
"url": "https://mcp.apify.com/?tools=automation-lab/france-public-administration-directory-scraper"
}
}
}

Example prompts:

  • "Export 100 French mairie contacts and summarize how many have email addresses."
  • "Scrape prefecture contacts from the French public administration directory."
  • "Create a CSV-ready list of local French public offices with phone numbers."

Legality

This Actor extracts public information from an official government directory.

You are responsible for using the data lawfully, respecting privacy rules, and complying with applicable outreach, marketing, and data-protection regulations.

FAQ

I got fewer records than expected

Check maxItems, category spelling, and whether your direct URL points to a detail page rather than a large category page.

Some fields are empty

Not every administration page publishes every field. Empty phone, email, website, SIRET, or opening-hour values usually mean the source page does not provide that data.

Do I need proxies?

Usually no. The official directory is public and works with normal HTTP requests. Proxy settings are available only as a fallback.

You may also be interested in other Automation Lab public-data and lead-generation actors:

Changelog

0.1

Initial private build for extracting official French public administration directory records.

Support

If you need another category, a custom output field, or a workflow example, open an issue on the Apify Actor page.