Skip to content
Developer docsREST · JSON and PNG · /v1

Website integration

Racing Widgets & WordPress

Settled each-way tips show green for a top-three finish, or a top-four finish when the known field has at least 16 non-scratched runners. The actual finishing position stays visible. This is the widget’s result-colour rule, not a guarantee of any bookmaker’s place terms or payout.

In the builder’s Bookmaker links settings, select a bookmaker from the API feed dropdown and enter your own destination or affiliate URL. Save the design to make that bookmaker’s odds boxes open your link in a new tab. Only one custom link can be set per bookmaker.

Publish RacingAPI.net racecards, results and qualifying positive-EV tips using saved designs. Widgets use the same authenticated feed gateway as the REST API, rather than a separate demonstration dataset.

Under Tips, you can also choose Lucky 15, NAP of the day, treble or double. Every horse on every tips card must have genuine confidence and positive EV that displays as at least +0.1%. Negative, zero, missing and tiny positive EV displaying as +0.0% are excluded. Confidence and EV use the market/form model when valid pre-race inputs are available. For limited career history, a labelled market-implied estimate normalises median bookmaker prices across the complete active priced field; it is not an independently calibrated career-form prediction. No percentages are invented. Metrics freeze at the race start. All cards use the saved design’s colours, fonts, silks, odds styling and bookmaker links.

Treble and double cards also show combined fractional odds and a stake calculator. Enter a GBP stake to see potential return including stake and profit. These are win-only estimates using each leg’s best available price, which may be from different bookmakers—not a guaranteed combined bookmaker quote. A void leg counts at 1.00; a settled non-winning leg gives a zero win-only return. Missing prices do not produce an estimate. This calculator does not place a bet.

Combined odds use short readable fractions. The ≈ symbol marks a display-only approximation; stake returns still use the exact combined price. Incomplete feed updates retain the last valid metrics and matching price snapshot. Legacy cards created without metrics can receive a labelled Live conf estimate only while their displayed race time is still upcoming and no result or running status is supplied. Its calculation time is recorded honestly: it is not an original pre-race forecast. Existing frozen metrics are not replaced.

Daily tips cards

  • Lucky 15: four separate short-priced races, choosing only positive-EV horses from each race’s two shortest-priced runners using a saved daily choice. All four horses appear on one card. A Lucky 15 is 4 singles, 6 doubles, 4 trebles and 1 fourfold: 15 bets, with total stake 15 times the unit stake.
  • NAP of the day: one saved random favourite from races whose favourite qualifies with positive EV. This is not a claim that it is the strongest model pick.
  • Treble: the three shortest-priced qualifying positive-EV race favourites from three different races.
  • Double: the two shortest-priced qualifying positive-EV race favourites from two different races.
  • Favourites are ranked by median valid bookmaker decimal prices. Non-runners, unknown prices and started races are excluded when creating the card. Daily identities are shared across designs and remain fixed on refresh, while prices and result positions can update.
  • Preparation runs with the existing daily 06:00 UK predictions job, retrying when data is available. Only complete positive-EV cards are published: one qualifying race for NAP, two for Double, three for Treble and four for Lucky 15. If any saved leg no longer qualifies, the whole card is unavailable, not partially shown or rerolled. Original records remain private. No retrospective picks are created for past days; tomorrow’s cards are prepared on that day. Course filters do not split daily cards.
[racingapi_lucky15 id="YOUR-WIDGET-ID"]
[racingapi_nap id="YOUR-WIDGET-ID"]
[racingapi_treble id="YOUR-WIDGET-ID"]
[racingapi_double id="YOUR-WIDGET-ID"]

For the product overview, diagrams and FAQs, visit Horse Racing Widgets. This guide covers installation and operation; public REST API integrations have their own plans and keys.

Create and customise a design

Open Dashboard → Widgets to design, preview and save for free. Choose racecards, results or tips, optionally filter by racecourse, and customise fonts, colours, backgrounds, headers, borders, radius and bookmaker links. Widgets for one registered website are included with Professional (£79/month) and Enterprise at no additional charge, with unlimited monthly widget requests and rate limits. Active eligible plan trials include widget access; signing up alone does not start a trial.

The preview uses real account data. Appearance changes update the preview without fetching the feed again; changing the content or course loads the relevant data. Blank dates or courses with no available data show an empty state, not sample horses.

Use the Content, Colours, Fonts & shape and Bookmaker links sections to find the controls. Colours are independent: set the widget background, cards, main and muted text, headers, buttons, borders and normal or best-price odds boxes. Header colours apply to the navigation and table headings as well as the optional title. Font controls apply throughout the widget, including compact runner text, and saved changes use the same styling in the preview and installed plugin.

The designer starts with the same Racecards widget: meetings, race details, date navigation, results, predictions, favourites, odds comparisons and supplied horse statistics. The widget subscription includes racecards, results and tips; it does not unlock unrestricted REST API or Enterprise MCP access.

Activate Professional or Enterprise, register your public HTTPS website, then generate its widget API key and download the plugin. Your plan covers one website and one active key; www and non-www, paths and trailing slashes do not create extra licences. Subdomains are separate websites and cannot reuse the key. Contact support for website changes or additional websites. Saved changes appear during the next visible refresh, normally within 30 seconds; deleting a design disables its embed.

Install the WordPress plugin

Design and save, activate your main Professional or Enterprise plan using on-site checkout, and register your website. There is no separate widget checkout. Downloads, key creation and live display are checked on the server against main plan access. Signing up or starting checkout does not activate installation. The plugin ZIP includes your design ID, never your secret key.

  • After confirmed payment, generate the website’s widget API key. Copy it once and keep it safe; only a masked prefix is shown later. Save design changes and download the plugin.
  • In WordPress, open Plugins → Add New → Upload Plugin. Select the ZIP, install it and activate RacingAPI.net Widgets. If the plugin is already installed, replace the existing version.
  • Open Settings → RacingAPI Widgets and manually enter the API key. Choose Verify website & connect. The service checks that the plugin on the registered HTTPS website holds the matching key. Its public WordPress REST verification endpoint must be reachable through your firewall.
  • The Help guide button in both the builder and WordPress settings explains each step. Change your colours, fonts and bookmaker links in the builder and save; you do not need to reinstall the plugin.
  • If the plugin has no design connected, verify its website key first, then use Connect another saved design under Manage designs. Paste the saved design ID and save connections. The Shortcodes generator supplies content, course and day choices.
  • Previews do not require an API key. Installed widgets require active Professional or Enterprise access and a widget key entered manually in WordPress; no secret is placed in page source or shortcodes.

Choose exactly what to display

With your plan active and website registered, the builder provides ready-made Racecards, Results and Tips shortcodes with separate Copy buttons. WordPress has the same content choices and optional course/day filters in its generator. Each opens the matching view with the saved design. All three content types are included with Professional and Enterprise. Raw tips REST endpoints and MCP remain Enterprise-only.

In WordPress, the plugin opens on Shortcodes. Choose a saved design, select Racecards, Results or Tips, enter an optional racecourse name or ID, choose the racing day and copy the generated shortcode. It updates immediately without saving connection settings. Manage designs holds connection settings separately, and the Plugins list includes a direct Shortcodes link. A blank course uses the saved design’s course filter, or all courses if none is saved.

[racingapi_widget id="YOUR-WIDGET-ID"] uses the saved design and content settings.

[racingapi_racecards id="YOUR-WIDGET-ID" course="Ascot"] displays racecards for Ascot.

[racingapi_results id="YOUR-WIDGET-ID" course="Cheltenham" date="yesterday"] displays the selected course’s results.

[racingapi_tips id="YOUR-WIDGET-ID"] displays saved tips, included in the widget package. Choose the Racecards, Results or Tips shortcode, optionally select a course, and paste it into a WordPress Shortcode block.

Course is optional and accepts a name or ID. Date accepts today, tomorrow, yesterday or YYYY-MM-DD, covering the previous five days through tomorrow. Relative dates use Europe/London, including GMT/BST changes, and resolve when the widget requests data. Keep full-page caches short so old initial HTML does not retain yesterday’s information. Tomorrow’s racecards depend on declarations; tips are prepared for the current day, not tomorrow. Favourites are stored in the visitor’s browser.

Secure HTML embedding, not an iframe

The WordPress plugin includes server-rendered racing HTML inside a div with declarative Shadow DOM, not an iframe. Theme and page-builder selectors cannot cross this boundary. Internal typography avoids the host page’s root font sizing, and stats pop-ups stay inside the same protected styles. The host still controls placement and width, and can hide or remove the widget. Bookmaker links open in a new tab with security attributes.

The WordPress server fetches GET /widget-content/{widgetId}?proxy={encodedSameSiteProxyUrl} using Authorization: Bearer <widget-key>, X-RacingAPI-Site: https://registered-website and X-RacingAPI-Installation. The installation proof is delivered over HTTPS directly to the registered WordPress website during verification, never returned to the activation caller. Copying a key or changing the website header is not enough to authorise another installation. The proxy URL must be on the registered HTTPS website. Initial content is server-rendered HTML. Browser refreshes, race details and images go through the signed same-site WordPress proxy; neither secret reaches visitors. The plugin encrypts both secrets using this installation’s WordPress authentication salt. Restrict administrator access and reconnect if salts change. Existing installations must update to plugin 1.4.0 or later and reconnect once. Rotating a key invalidates its installation proof. The designer’s preview frame is separate from the div-based embed published on your website.

Public widget IDs alone no longer grant feed or HTML access. Generic anonymous div snippets are not supported. Custom integrations need an authenticated server-side connection and a proxy on the registered website; use the WordPress plugin for the supported complete setup. Never paste a widget key into JavaScript, HTML, a shortcode or a URL.

Rate limits, usage and caching

  • Included with Professional and Enterprise: one registered website, no additional widget charge. Professional is £79/month. Active eligible main plan trials include widgets; Developer permits free design and preview only.
  • Unlimited monthly widget requests: live feeds allow 10 requests per second per account, with a separate image allowance of 60 per second. These allowances are shared across the account’s designs and websites, not multiplied per visitor.
  • HTTP 429: respect the response’s Retry-After header before retrying. Unlimited monthly usage does not remove burst limits.
  • Customer usage: every actual authenticated service request, including a service-cache hit, is recorded against the customer and website. Browser or WordPress cache hits that make no service call do not add a RacingAPI.net request. Widget usage is separate from REST quotas. Widget keys cannot call REST or MCP; use the credentials and permissions of your main plan for those services.

Visible widgets refresh every 30 seconds, with a shared 15-second source snapshot. WordPress caches successful HTML/data for ten seconds and images for five minutes; use short full-page caches on live racing pages. Live odds are not cached for 24 hours. Widget access follows your main plan: cancellation keeps access until its effective end; expired trials, ended plans, suspension or a downgrade to Developer disable live widgets. Rotate a key to invalidate the old one immediately, then reconnect WordPress. Removing the plugin does not cancel your main subscription.

Installation and access troubleshooting

  • Download or key button unavailable: save the design and confirm the website’s paid subscription. Signing up or opening checkout does not activate publishing.
  • Website verification fails: use the exact registered public HTTPS website and check DNS, certificates, the public WordPress REST callback and firewall settings. WordPress needs OpenSSL for encrypted key storage. Private/local addresses and non-standard ports are not supported.
  • 401 or 403: check the widget key, website header, activation and paid access. A normal REST key is not a widget key. Rotation invalidates the old key immediately.
  • 404 or an empty view: check that the saved design exists, that the selected course/date has data, and that a requested image is available. Empty dates are not filled with sample runners.
  • Old information or styles: save the correct design, allow the normal refresh and clear long-lived WordPress/CDN page caches. Several widgets may request different feeds independently.
  • Lost key or changed WordPress salts: rotate a lost key, enter the replacement and verify again. Re-enter an existing key when salt changes prevent decryption. Uninstalling does not stop subscription renewal; manage your main plan under Subscriptions.

Use widgets within your own website. The subscription does not permit selling API access, raw feeds or standalone image libraries. Read the terms and data licensing policy, or contact support@racingapi.net with the website, design ID and error status—not the secret key.

Widgets provide course-grouped races, runner details and fractional odds with best-price highlighting, generated silks, supplied horse statistics, results and payouts, and saved tips with confidence, EV, bet type and explanation where available. A value missing from the feed is not invented.

Racecard runners show “Form:” followed by up to their latest four recorded finishing figures, read oldest to newest. These use historical results matched by horse ID, not inferred summary statistics or scraped racecards. Preparation begins at 06:00 Europe/London for today and tomorrow, with startup catch-up and retries. The tooltip identifies incomplete historical coverage. A dash means no verified runs have been found yet—not that the horse is making its debut. A single figure during import does not mean a horse has only raced once. P means pulled up, U unseated, F fell, B brought down and 0 tenth or worse. No season separators are inferred. Prepared figures are saved in a persistent 24-hour cache, reused across widget visits and server restarts, and updated in the background as missing history arrives. Widget visits use prepared history and never request historical races directly from the data source. This is widget-only; it does not add historical-form data to the customer REST endpoints.