Access the PoliticaHub political knowledge graph through our public API. Free for non-commercial research, educational use, and personal projects.
The API is rate-limited to 120 requests per minute per IP (anonymous). Get a free Researcher API key for 500 req/min, or a Pro key for 2,000 req/min. Pass your key via the Authorization: Bearer ph_sk_... header. Attribution to PoliticaHub is required on the free and researcher tiers.
https://politicahub.com/api/graph/entity/{slug}Fetch a single entity and its relationships by slug.
slugpathThe entity slug (e.g., "emmanuel-macron", "france", "republican-party-us")
{ entity: Entity, relationships: RelationshipGroup[] }120/min (free) · 500/min (researcher) · 2,000/min (pro)
curl https://politicahub.com/api/graph/entity/france/api/snapshot/{country}Full political snapshot of a country in one call — leaders, elections, parties, institutions.
countrypathCountry slug (e.g., "france", "united-states", "germany")
{ country, stats, current_leaders[], elections: { upcoming[], recent[] }, parties[], institutions[], offices[] }120/min (free) · 500/min (researcher) · 2,000/min (pro)
curl https://politicahub.com/api/snapshot/france/api/searchSearch entities by keyword. Returns ranked results grouped by entity type.
qquerySearch query (e.g., "trump", "france", "liberal"). Omit for entity count only.
{ count: number, results: SearchEntry[], groups: SearchGroup[] }None (cached server-side)
curl https://politicahub.com/api/search?q=macron/feedRSS feed of recently updated entities. Supports type and country filters.
typequeryFilter by entity type: country, politician, party, ideology, election, office, institution
countryqueryFilter by ISO country code (e.g., "us", "fr", "de")
RSS 2.0 XMLNone
curl https://politicahub.com/feed?type=politician&country=uscountrye.g. france
Metadata: capital, government_type, population, continent, legislature_name
politiciane.g. emmanuel-macron
Metadata: birth_year, office, overview, political_positions
partye.g. republican-party-us
Metadata: founded_year, ideology, country
electione.g. france-2022-presidential
Metadata: election_year, winner, turnout, result_margin
officee.g. president-of-france
Metadata: office_type, term_length, country
institutione.g. bundestag
Metadata: institution_type, seats, founded_year
ideologye.g. liberalism
Metadata: spectrum
politician_member_of_partyPolitician belongs to a partyparty_has_ideologyParty follows an ideologypolitician_participated_in_electionPolitician ran in an electionelection_occurs_in_countryElection held in a countryparty_operates_in_countryParty active in a countrypolitician_holds_officePolitician holds/held an officeoffice_in_countryOffice belongs to a countryoffice_elected_in_electionOffice contested in an electioninstitution_in_countryInstitution belongs to a countryinstitution_contains_officeInstitution contains an officeconst res = await fetch('https://politicahub.com/api/graph/entity/france');
const { entity, relationships } = await res.json();
console.log(entity.name); // "France"
console.log(entity.type); // "country"
console.log(relationships.length); // number of relationship groupsimport requests
res = requests.get('https://politicahub.com/api/graph/entity/france')
data = res.json()
print(data['entity']['name']) # France
print(len(data['relationships'])) # relationship groups