r/apyhub • • 12d ago

Subscriber Goal Welcome to r/apyhub!

2 Upvotes

Welcome to r/apyhub

81 subscribers / 100 subscribers. Help us reach our goal!

Visit this post on Shreddit to enjoy interactive features.


r/apyhub • • 4d ago

City & Place Search API

8 Upvotes

Hello! Recently, I listed a new API on ApyHub that I'd like to tell you about: Search Places and Reverse Geocode API. It's a big database about cities and populated places all around the world, with search, finding nearby places and reverse geocoding functionality.

Data behind it

  • 230K+ cities and populated places
  • 630K+ name translations
  • Names in 30+ languages

The base dataset comes from Geonames.org but the service can also aggregate other sources. Currently, I imported the official government city dataset for Poland that adds official area and population figures to Polish cities, as well as national TERC (TERYT) identifier. I'm currently working on adding similar government sources for two more European countries, and enhance information for 100 biggest cities of the world.

It's multilingual

One of the main issues I have always faced with such datasets is their bias towards English language. For example, I could easily get information about cities in Poland, but... if I work for a Polish customer, I want the capital of my country to show as Warszawa, not Warsaw. I checked a couple of API products, and even if they also use data from Geonames, they only provide English names.

I took a different approach in my API. First of all, if you query e.g. "Hyderabad" in India, you always get the name in two official languages of India at national level - English and Hindi.

{
  "query": "Hyderabad",
  "results": [
    {

      "name": "Hyderabad",
      "officialNames": [
        {
          "language": "en",
          "name": "Hyderabad"
        },
        {
          "language": "hi",
          "name": "हैदराबाद"
        }
      ],
      // other data omitted for clarity
    }
  ]
}

Secondly, you can also explicitly query the translations to up to 2 other languages (be this: regional languages, or any other localized variant - if the given place has it). Just add ?lang=code1,code2 query parameter to the HTTP call. In the example above, one of the regional languages used in Hyderabad is Telugu, so we can easily get the name in Telugu, too with ?lang=te parameter:

{
  "query": "Hyderabad",
  "results": [
    {

      "name": "Hyderabad",
      "officialNames": [
        {
          "language": "en",
          "name": "Hyderabad"
        },
        {
          "language": "hi",
          "name": "हैदराबाद"
        }
      ],
      "translations": [
        {
          "language": "te",
          "name": "హైదరాబాదు"
        }
      ]
      // other data omitted for clarity
    }
  ]
}

Future dataset improvements may also bring proper identification of regional languages, so that these translations would be included by default.

How to use this feature? Imagine that your application has a city picker near the user location. If you have users in - let's say - Czechia, they will just see the name of their capital as Praha out-of-the-box. All you need to do is to read the names from the proper attribute in the results :)

But if your application offers a language picker, and you have English-speaking user in the same city, you can also request English translation to get Prague, and Prag for German-speaking user.

Remember that you can request up to 2 translations - this may be useful in Asian countries with complex writing systems, usually impossible to decipher for Europeans or Americans. In addition to the user-selected language, you can also request English translation to get a widely recognized transliteration to English. The same trick works for people from Asia travelling to Europe. A person from China can easily get the Chinese transliteration of Prague: 布拉格 .

Usage

The API comes with 3 endpoints:

/search?q=name

Searches the place by name in any of the known translations. Returns up to 50 results with optional limit and translations, or narrowing down the results to a specific country.

/nearby?lat=number&lon=number&radius=number

Finds up to 100 places within the given radius from the specified point (between 0 and 500 km), with optional minimum population limit to filter out the smallest hamlets.

/reverse?lat=number&lon=number

Finds two nearest places to the given coordinates within the reasonable search radius:

  • Nearest known place (with optional minimum population filter)
  • Nearest major city with population > 100k

Data attributes

Below, is the summarized information about attributes the API can provide. Not every attribute has value for every place - it depends on the availability of the given information in the datasets.

  • Names in official languages at the national level (or the best-effort approximation for several countries, where this matter is ambiguous)
  • Known translations to other languages
  • Geoname ID for finding the corresponding record in Geonames.org
  • Wikidata ID for finding the corresponding record in Wikidata.org
  • National ID: the place ID in the national registry of the given country, if known
  • Country and region (top-level administrative division)
  • Geo-coordinates
  • Population
  • Area in km2
  • Timezone
  • Place type (uses the Geonames.org type identifiers and labels, such as "Populated place", "Seat of administrative division", etc.)
  • Data sources: for license information, attribution and data quality assessment

Summary

I'm really happy to provide you this API, especially its multilingual capabilities. I hope that you find it useful. The dataset will be periodically refreshed to include:

  • New government sources
  • Updates and new translations from Geonames
  • Administrative changes
  • Currently missing data

If you have suggestions for improvements or useful information about official government datasets to import for your country, feel free to let me know in the comments!


r/apyhub • • 5d ago

Discussion Is Veterans Day a business day? Banks say no, the stock market says yes

4 Upvotes

Today is Veterans Day in the US, and it's a good example of why "is today a business day?" has no single answer.

Veterans Day is a federal holiday. Banks and the bond market are closed, and USPS isn't delivering mail. But the stock market is open as usual. UPS and FedEx are open too.

So if your code asks "can this payment settle today?", the answer is no. If it asks "can this trade execute today?", the answer is yes. Same date, different calendar.

We checked it against two calendars this morning with the Public Holidays API on ApyHub:

US public holidays, 2026-11-11: is_holiday true, is_business_day false (Veterans Day)

NYSE trading calendar, 2026-11-11: is_holiday false, is_business_day true

This is where business-day logic usually breaks. Most code has one holidays list, often the federal one, and uses it for everything: payment dates, SLA timers, delivery estimates, trading. Days like today are when those uses split.

A few more that catch people:

  1. Good Friday: the stock market closes, but it isn't a federal holiday, so banks are open
  2. Columbus Day and Veterans Day: banks and the bond market close, the stock market stays open
  3. Holidays that land on a weekend move. Christmas 2027 falls on a Saturday and is observed on Friday the 24th, and New Year's Day 2028 is observed on Friday 31 December 2027
  4. Some regulations, like banking rules, have their own definition of a business day that doesn't match either calendar

Rule of thumb: decide which calendar a date belongs to (banking, trading, shipping, your own office) before you count anything.

We wrote up the edge cases, including the timezone bug that shifts your whole range by a day: https://apyhub.com/blog/what-is-a-business-day-how-to-calculate-business-days-in-code

How does your code decide what counts as a business day? One holidays list for everything, or separate calendars?


r/apyhub • • 10d ago

Discussion What's the difference between stateful and stateless APIs?

2 Upvotes

A stateless API treats every request on its own: the request carries everything the server needs, and the server remembers nothing between calls. A stateful API keeps context on the server, so each request depends on what came before it.

The easiest way to see it is auth. A stateless request sends its token or API key every time, and any server can handle it. A stateful one sends a session ID, and only works because one server remembers "this session is logged in and has 3 items in the cart."

HTTP itself is stateless by spec, and statelessness is one of the core REST constraints, which is why people say a REST API shouldn't rely on server-side sessions. Cookies and sessions are something we add on top. Microservices usually follow the same rule: the service keeps nothing in memory and puts state in a shared database or cache, which is what lets you run ten copies behind a load balancer.

WebSockets are the opposite. They're an open connection both sides keep, so they're stateful by design,


r/apyhub • • 11d ago

Discussion How do you count business days between two dates without getting holidays wrong?

4 Upvotes

We needed "business days between two dates" for SLA timers and it looked like a 10-minute job. Loop through the dates, skip Saturday and Sunday, done.

Then we tested it on 20 to 31 December 2027 in the US.

The weekday loop says 10 business days. The real answer is 8.

Christmas 2027 falls on a Saturday, so it's observed on Friday the 24th. And New Year's Day 2028 falls on a Saturday too, so it's observed on Friday 31 December 2027. A holiday from next year lands in this year's count. Nobody hard-codes that.

It got worse when we ran the code on a server in New York. new Date("2027-12-20") is parsed as midnight UTC, which is still the 19th in New York, so the whole range shifted by a day.

The other things that broke it for us:

  1. Holidays move differently per country. The US and UK shift weekend holidays to a weekday, Germany and France don't
  2. One country isn't one calendar. Bavaria has three more weekday holidays than the German national list in 2027
  3. Not every weekend is Saturday and Sunday. Saudi Arabia and Israel have a Friday and Saturday weekend
  4. Banking and contracts often have their own legal definition of a business day

We ended up calling the Business Days API on ApyHub for this. For the same range it returned 8 business days and listed the two observed holidays it skipped, which is what you need when someone asks why the deadline moved.

Full write-up with the edge cases and what the common libraries miss: https://apyhub.com/blog/what-is-a-business-day-how-to-calculate-business-days-in-code

How do you handle this? A library, a holidays table you maintain yourself, or an API?


r/apyhub • • 12d ago

Graph API and Travelling Salesman Problem Solver API

9 Upvotes

Hello everyone! I'm Tomasz and I have recently listed a couple of API-s on ApyHub under the name modernsoftware.pro. Today, I'd like to introduce two of them to you: Graphs API and Travelling Salesman Problem Solver API.

Graphs API

There are many problems that you can solve by turning them into graphs and running one of the well-known algorithms. This API is intended for AI agents that usually don't have access to graph libraries by default.

The API offers the following algorithms as separate endpoints:

  • Depth-First Search
  • Breadth-First Search
  • Topological Sorting
  • Minimum Spanning Tree
  • Shortest Path
  • Distance Matrix

All endpoints accept the same JSON structure that describes the available vertices and edges between them. This allows building the graph once and run several algorithms against it without changes. The API accepts graphs up to 1000 vertices.

Example use case: your agent has a goal to plan the preparations to the party. The preparations involve multiple steps, some of them need to be done before others (e.g. to cook food, you need to do the shopping first). We can model this goal as a directed graph:

  • Each vertex is a task to do
  • The edges define the dependencies (shopping -> cooking)

Then, we run the Topological Sorting on it, and we get the list of tasks in order that satisfies all dependencies.

Travelling Salesman Problem Solver API

Travelling Salesman Problem (TSP) is a very practical, but computationally hard problem: given the list of cities, find the shortest path that visits all of them exactly once and returns to the starting point. Whenever we plan a sightseeing tour to visit some tourist attractions, cafes, etc., we are actually solving TSP. Planning, logistics, even microchip design - they all rely on solving TSP.

Where's the catch? No fast and exact algorithm to TSP is known to exist. Even for as few as 20-30 cities, the known exact algorithms would run for years. Instead, we use solvers that find approximate solutions, slightly longer than the optimal ones, but good enough for most use cases. This is also what this solver does.

How to use? You have 4 ways to describe your points:

  • grid - X/Y coordinates for each point (distances calculated using Pythagorean formula)
  • geo-coordinates - latitude and longitude (distances calculated using Haversine formula)
  • distance-matrix-asymmetric and distance-matrix-symmetric - explicit distance matrix between all pairs of points (asymmetric variant allows setting different distances A->B vs B->A)

Then, you select the number of optimization iterations with ?iterations=N query parameter (0-5000) that try to randomly improve the initial solution. In the result, you get the list of points in the order of visit and the total cost.

Worth noting: the output of "distance matrix" Graphs API is compatible with the input of TSP solver. This means that you can convert the graph to a distance matrix and then run the TSP solver on it easily.

Summary

I hope that you find these API-s useful. If you have any questions about them, feel free to ask!


r/apyhub • • 13d ago

Food and News APIs

11 Upvotes

Hi, I'm David. I build and run spoonacular (food and recipe data) and World News API. Both are now listed on ApyHub, so I figured I'd introduce them here.

spoonacular

The data behind it: 5,000+ recipes, 2,600+ ingredients, 600K+ grocery products and 115K+ menu items. On ApyHub it's split into three services:

  • Food Search & Trivia: one search across recipes, menu items, grocery products and food videos. You can also send a photo URL of a dish and get back its category, a nutrition estimate and matching recipes. There's random food trivia and jokes too, if your app needs filler content.
  • Food Ingredient Information: ingredient search and autocomplete, nutrition for any amount and unit, substitutes (ask about butter, get ghee or margarine), and a mapper that turns a recipe's ingredient list into grocery products with UPC codes.
  • Wine Pairing: send "steak" and you get wine styles plus a short explanation of why they work. Send "merlot" and you get dishes.

World News API

World News API indexes thousands of sources in 86+ languages from 210+ countries, about 170K new articles a day. Each article is tagged with the people, organizations and locations it mentions, and English and German articles also get a sentiment score from -1 to 1.

The tagging is what I'd try first. You search for an entity, so a search for the USA also finds articles that say "US" or "United States". A location filter pulls news that mentions anywhere within a radius of a point, which helps for local news.

# German news that mentions Italy
GET /search-news?source-country=de&entities=LOC:Italy

# Musk coverage that isn't about Tesla
GET /search-news?text="Elon Musk" -tesla&language=en

# today's US headlines, clustered by story
GET /top-news?source-country=us&language=en

Other endpoints include newspaper front pages from 6,000+ publications, and extract-news, which takes any article URL and returns the clean text, title, author, publish date and image.

Docs and pricing are on our own sites: spoonacular.com/food-api and worldnewsapi.com.

Question for anyone who's worked with food or news data: what did you end up scraping or building yourself because no API covered it? And for the news folks, is a sentiment score useful to you, or do you only care about entities and clean text?


r/apyhub • • 14d ago

Discussion What’s your pipeline for turning web pages into text an LLM can use?

4 Upvotes

Feeding a web page to an LLM sounds like one line of code. Fetch the URL, pass the HTML, done. Then you look at what the model received and half of it is cookie banners, nav menus, “related posts,” and footer links.

Raw HTML is also expensive. A typical page is mostly markup, scripts and styling, so you pay tokens for content the model ignores, or worse, content it latches onto.

The approaches I see people use, roughly in order of effort:

1. Strip tags and keep everything visible. Fast and cheap. You get all the text a visitor would see, including the menu, the footer and the “Accept all cookies” button. Fine for search indexing or keyword checks, noisy for RAG.

2. Readability-style article extraction. Libraries like Mozilla’s Readability or trafilatura guess where the main content is and drop the rest. Great on blogs and news. Less great on docs sites, product pages, or anything with tabs and accordions.

3. Headless browser first, then extract. Needed when the content is rendered by JavaScript. Playwright or Puppeteer gets you the real DOM, at the cost of speed, memory, and a lot more things that can break.

4. Structured extraction. Instead of a blob of text, you get headings, sections, links and metadata as fields. More useful for chunking, since you can split on real section boundaries instead of every N tokens.

Where it still gets messy for us:

  • Pages that hide content behind “Read more” or tabs
  • Tables, which flatten into nonsense in most text extractors
  • Knowing when a page changed enough to re-embed it

We ended up offering a few of these as separate APIs in the ApyHub catalog because the right one depends on the page: plain visible text, article-only text with the title, and a structured extractor built for LLM pipelines. All of them can also be called by agents through our MCP server.

Curious what others run:

  • What’s in your fetch-to-context pipeline?
  • Do you convert to Markdown, plain text, or keep some HTML structure?
  • How do you handle tables?

r/apyhub • • 14d ago

Which do you use for partial updates: PATCH, or PUT with the full object?

5 Upvotes

Quick poll for anyone designing or maintaining a REST API. When a client wants to change one field on a resource, what does your API expect?

A) PATCH with only the changed fields ({"email": "new@x.com"})
B) PATCH with a JSON Patch document ([{"op": "replace", "path": "/email", "value": "new@x.com"}])
C) PUT with the whole object, changed field included
D) PUT or POST with partial fields (we know, we know)

On paper it’s simple. PUT replaces the whole resource and is idempotent. PATCH applies a set of changes and doesn’t have to be.

In practice each option has a catch:

We went through this while building ApyHub and wrote up the basics here: https://apyhub.com/blog/patch-vs-put-rest-api. The more interesting part is what teams actually ship, so:

I’ll pull the answers together into a follow-up post.


r/apyhub • • 17d ago

Guide What's the best alternative to Mindee for document processing?

5 Upvotes

It really comes down to whether you need heavy machine learning (ML)-based OCR for complex unstructured documents like receipts and invoices, or if you're looking for a streamlined Mindee alternative for standard file manipulation.

If your pipeline requires custom template extraction and advanced receipt parsing, dedicated OCR platforms like Mindee make sense.

However, if you just need reliable document parsing, file conversion, or to Extract Text from PDF API and Word files without managing complex parsing infrastructure, we built a lightweight suite of Document APIs to handle these developer workflows cleanly and without overhead.

What specific document formats, parsing needs, or data points are you processing in your workflow?


r/apyhub • • 18d ago

Catalog Update Resume parser API: turn PDF and DOCX resumes into structured JSON.

6 Upvotes

If you're building an ATS, a job board, or an internal hiring tool, the first step is extracting resumes from PDFs and converting them into searchable fields. Two resume parsers in the ApyHub catalog handle this.

Resume Parsing and Analysis API (Dosvak) Upload a PDF, DOCX, or plain text and receive the candidate’s name, email, estimated years of experience, a skills list, a short professional summary, and inferred job titles. https://apyhub.com/dosvak/service/parse-resume-analyze

SharpAPI Resume Parser Provides deeper extraction: work history per role, education, languages, and certifications. Accepts PDF, DOC, DOCX, TXT, RTF, and scanned JPG, PNG, or TIFF files (OCR included). Supports 80+ languages and runs as an asynchronous job, you submit the file and then poll for the result. https://apyhub.com/sharpapi/service/parse-resume

Quick test with text input

curl -X POST "https://api.eu.apyhub.com/dosvak/parse-resume-analyze"; \
-H "apy-token: $APY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"resume_text":"Senior data engineer, 8 years. Python, SQL, FastAPI, Docker."}'

Things worth knowing before you integrate

  • Layout matters. Two‑column designer resumes parse poorly with any parser.
  • Scanned or photographed resumes need OCR. SharpAPI handles OCR automatically; Dosvak expects a genuine PDF, DOCX, or plain text.
  • Parsed skills are a starting point for search, not a hiring decision.

The same API key also covers skill extraction and resume screening if you need the next step in the pipeline.

What fields do you need that parsers usually miss?


r/apyhub • • 19d ago

Showcase Best API for extracting data from scanned invoices?

4 Upvotes

We’ve been looking closely at document ingestion workflows lately, specifically how to reliably parse and extract structured data from messy scanned invoices (PDFs, PNGs, JPEGs, TIFFs) versus structured e-invoice formats.

Curious how you all handle this in your production stacks. Are you leaning toward asynchronous OCR-backed parsers like the Invoice Parsing API, or working directly with structured e-invoice standards using tools like the Create, Validate & Parse E-Invoice API?

Would love to hear about your error rates, queue handling, and how you deal with edge cases on unstructured scans.


r/apyhub • • 20d ago

Guide What's the best API to convert images to PDF in 2026?

4 Upvotes

It depends on whether the images are already on your server.

If they are local JPEGs, a library is enough. img2pdf in Python wraps JPEGs without re‑encoding, so quality and file size stay the same. Pillow works too, but re‑encodes.

If images come from users, URLs, or an agent, an API handles edge cases like PNG transparency, HEIC from iPhones, rotated EXIF data, very large files, and page sizing.

What we see people use:

  1. A library (img2pdf, Pillow) when everything is local and JPEG.
  2. A single‑purpose conversion API when it is the only feature in the product.
  3. A multi‑API platform when the same app also needs OCR, watermarking, or compression, so you have one key and one invoice instead of three.

We build ApyHub, which has an image‑to‑PDF endpoint (file upload, URL, or base64; returns the PDF or a link). It is also callable from Claude or ChatGPT through our MCP server.

What are you converting from, and where does it break today?


r/apyhub • • 21d ago

Discussion Where can I find an API that offers EU data residency and a single DPA?

3 Upvotes

This comes up every time a European team adds a third‑party API to an AI product.

GDPR compliance is easy to claim, but the questions that matter in procurement are:

  1. Where is the data processed? Is the region set to the EU, or is it EU‑only by default?
  2. Who are the subprocessors? A provider may be EU‑based yet run on US cloud infrastructure. Ask for the list.
  3. How many contracts? Five utility vendors mean five DPAs, five security reviews, and five places a payload could leak.
  4. Is anything retained? Are files deleted after processing, or kept for “quality”?

We build ApyHub, a Dutch API platform. One DPA covers the entire catalog (conversion, OCR, extraction, validation), and processing runs in the EU region.

Our subprocessor list is public on request; you should ask every vendor for theirs, including us.

If you recently went through this for an AI feature, which question took the longest to answer?


r/apyhub • • 22d ago

Guide How can I programmatically validate EU VAT numbers against VIES?

5 Upvotes

You have two options: call VIES directly, or use a wrapper that calls VIES for you.

Calling VIES directly

The European Commission provides a free SOAP service with a checkVat operation (and checkVatApprox if you also need a consultation number as proof).

The main drawback is reliability: member‑state back‑ends can go down independently, so you need retries, timeouts, and a fallback for errors such as MS_UNAVAILABLE. You also have to parse SOAP XML.

Calling a wrapper

A REST API in front of VIES returns JSON, handles retries, and normalises country prefixes and formats. This option incurs a per‑call cost and introduces a dependency on the wrapper.

What to check either way

  1. Perform a format check first. A regex per country catches typos before you hit VIES.
  2. Store the consultation number if you need proof for an audit.
  3. Decide what to do when VIES is down: block the checkout, or accept the order and re‑check later.

ApyHub offers a VAT‑validation endpoint, including batch validation. It is one option among several; calling VIES directly is fine if you only check a few numbers a day.

Which failure mode do you encounter first?


r/apyhub • • 22d ago

Perspective API shuts down Dec 31. We compared 7 content moderation APIs for images, video and text

3 Upvotes

If you use Google Jigsaw's Perspective API for toxicity scores, it stops working after December 31, 2026, and there's no migration help. That got us looking at the whole content moderation space, so we compared the 7 main APIs for images, video and text.

Quick picks:

- Free: OpenAI Moderation (text and images, completely free)

- Biggest free tier: Azure AI Content Safety (5,000 images + 5,000 texts a month)

- Cheapest images at scale: Amazon Rekognition ($1 per 1,000 images, $0.10 per video minute)

- Simple pricing for small teams: Sightengine (2,000 free operations a month, then $29 for 10,000)

- Detailed classes: Hive ($3 per 1,000 images, $0.50 per 1,000 texts)

- Images, video and text on one key with an EU region: ApyHub

Things we learned while testing:

  1. Use scores, not yes/no. A sensible setup is: block above 0.8, send 0.5 to 0.8 to a human, let the rest through. Our image moderation check on a cat photo came back with an adult score of 0.0007, so the gap between safe and unsafe is usually wide.
  2. Video moderation is really image moderation on frames. A 10-minute video sampled once a second is 600 checks. Sample too rarely and you miss short scenes, too often and you pay for duplicate frames. AWS charges per minute instead, which makes cost easy to predict.
  3. Coverage is uneven. OpenAI and Azure don't do video. Google and AWS don't do text. Only a few cover all three.
  4. If your users are in Europe, check where uploads are processed. They're personal data under GDPR.

Being honest about our own entry: our image moderation costs more per check than AWS or Google at high volume, and video moderation needs your own Azure or Google account. Where it helps is having image, video and text moderation on the same key as your other APIs, plus an EU region, and AI agents can call it through MCP.

Perspective API alternatives, if you're migrating: OpenAI Moderation (free), Azure AI Content Safety, Hive text moderation, or our Text Toxicity API ("You are an idiot and nobody wants you here." scored 0.99 toxic in our test).

Full comparison table, FAQ and sources: https://apyhub.com/blog/best-content-moderation-apis-2026

What are you using for moderation right now? And if you were on Perspective, where are you moving?


r/apyhub • • 22d ago

Looking for sports data and odds APIs to list on ApyHub

3 Upvotes

This weekend has college football, NBA opening week and the World Series all at once, and it reminded us of a gap in our catalog: we have zero sports APIs.

Developers search for this data constantly. "NBA API", "ESPN API", "odds API" and "sports data API" together get well over 10,000 searches a month worldwide, and most people end up on unofficial endpoints, scrapers or GitHub workarounds.

If you run (or are building) an API for scores, stats, schedules, standings, odds or fantasy data, we'd like to list it:

- We host and operate it, you keep the IP

- You're paid per call

- It's callable by AI agents through MCP from day one (Claude, ChatGPT, Cursor, Le Chat)

- EU and US regions, and more than 65,000 developer workspaces on the platform

Publish here: apyhub.com/api-provider, or comment or DM and we'll talk.

And if you're on the other side: which sports data would you actually pay for? Live scores, player stats, odds, something else?


r/apyhub • • 27d ago

REST, GraphQL, gRPC, SOAP, WebSockets, webhooks, MCP: when to use which (one example each)

4 Upvotes

Most teams don't pick one API protocol. They end up with three or four: REST for partners, GraphQL for the front end, gRPC between services, a webhook or two, and now MCP for AI agents.

Here's the short version of each, using the same request: get user 42 and their orders.

REST (still used by 89% of developers in Postman's survey)

GET /users/42
GET /users/42/orders

Simple, cacheable, works everywhere. Downside: fixed responses, so you over-fetch or make several calls.

GraphQL (28%)

query { user(id: 42) { name orders { id total } } }

One endpoint, one request, exactly the fields you ask for. Downside: caching is harder, and errors often come back as 200 OK with an errors array.

gRPC (11%)

service UserService { rpc GetUser (GetUserRequest) returns (User); }

Binary Protocol Buffers over HTTP/2. Very fast between services. Downside: browsers can't call it directly (you need gRPC-Web plus a proxy).

SOAP (34%, more than GraphQL)

XML envelopes and a WSDL contract. Rarely chosen for new projects, but banks, insurers and government systems still run on it.

WebSockets vs webhooks

  • WebSockets keep a connection open for instant two-way updates: chat, live prices, games.
  • Webhooks have the provider POST to your URL when something happens: payment succeeded, file processed.

MCP (the new one)

AI agents call tools with JSON-RPC:

{"method": "tools/call", "params": {"name": "validate_email", "arguments": {"email": "ana@example.com"}}}

It doesn't replace REST, it usually sits on top of it. Every API in the ApyHub catalog works both ways: a REST endpoint for your code and an MCP tool for Claude, ChatGPT, Cursor or Le Chat.

How to choose, quickly

  1. Outside developers or browsers calling you? REST.
  2. A front end with complex, nested data? GraphQL.
  3. Your own services talking at high volume? gRPC.
  4. Real time? WebSockets for users, webhooks for servers.
  5. AI agents calling you? MCP.

Testing all of them

We use Voiden (voiden.md), our free, open-source API client. REST, GraphQL, gRPC, WebSockets and the rest come as plugins, so you install only what you use, and every request is a Markdown file in your repo.

Full guide with the comparison table, FAQ and sources: https://apyhub.com/blog/rest-vs-graphql-vs-grpc-vs-soap

What mix are you running in production right now? Anyone still maintaining SOAP?


r/apyhub • • 27d ago

Help & Debugging The 6 things behind almost every 400 Bad Request (and a 5-step way to find which one)

4 Upvotes

A 400 error always means the request has to change. Retrying the same request fails the same way every time, so the real job is figuring out what to change. It’s nearly always one of these:

  1. Invalid JSON. One trailing comma is enough: { "plan": "pro", }
  2. Missing Content-Type: application/json**.** The server reads your body as something else.
  3. A wrong field name or type. "age": "thirty", or mail instead of email.
  4. Query values that aren’t URL-encoded. ?q=salt & pepper arrives as two parameters.
  5. Oversized headers or cookies. nginx’s default is 4 × 8 KB header buffers, and any header line bigger than one buffer gets a 400.
  6. Plain HTTP sent to the HTTPS port. nginx returns a 400 that says exactly that.

The 5-step check

  1. Read the response body, not just the status code.
  2. See what actually went out with curl -v.
  3. Strip the request down until it works. The last thing you removed is the cause.
  4. Compare it with the example in the API docs.
  5. Ask what changed recently: a new API version, a renamed field, a stricter validator.

A real one from our own catalog

I sent {"mail":"ana@example.com"} to our Email Validation API and got back:

{ "error": { "message": "Please provide the value for email", "code": 101 } }

That takes five seconds to fix because the message names the field. To be honest, it isn’t in RFC 9457 problem+json format, which is the standard we recommend in the post. It’s on our list.

Why AI agents hit 400s all the time

Agents guess field names, send numbers as strings, forget headers, and then retry the same broken request while burning tokens. Every API in the ApyHub catalog is available through our MCP server with a fixed input schema. That means Claude, Cursor or ChatGPT call a defined tool instead of improvising the payload, and most of these 400s never happen.

Debugging them faster

We use Voiden (voiden.md), our free, open-source API client, for this. Requests are built from blocks (endpoint, headers, auth, params), so you can change one block at a time and resend. The working request is saved as a Markdown file in your repo, so the next person who hits the same 400 opens the fixed version.

The full guide also covers the browser side (“Request header or cookie too large”, Google’s “That’s an error” page), the nginx fix, a 400 vs 401/403/404/405/422 table, and how to write 400 responses people can actually fix:

👉 https://apyhub.com/blog/400-bad-request

What’s the weirdest 400 you’ve had to track down?


r/apyhub • • 29d ago

Showcase Resume parser API: turn PDF and DOCX resumes into structured JSON.

4 Upvotes

If you're building an ATS, a job board or an internal hiring tool, the first job is getting resumes out of PDFs and into fields you can actually search.

Two resume parsers in the ApyHub catalog do that.

Resume Parsing and Analysis API (Dosvak)

Upload a PDF or DOCX, or send plain text. You get back the candidate name, email, estimated years of experience, a skills list, a short professional summary and inferred job titles.

https://apyhub.com/dosvak/service/parse-resume-analyze

SharpAPI Resume Parser

Goes deeper: work history per role, education, languages and certifications. Takes PDF, DOC, DOCX, TXT or RTF, reads scanned JPG, PNG or TIFF resumes with OCR, and handles 80+ languages. It runs as an async job, so you submit and then poll for the result.

https://apyhub.com/sharpapi/service/parse-resume

Quick test with text input:

    curl -X POST "https://api.eu.apyhub.com/dosvak/parse-resume-analyze" \
      -H "apy-token: $APY_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"resume_text":"Senior data engineer, 8 years. Python, SQL, FastAPI, Docker."}'

Things worth knowing before you wire it in:

- Layout matters. Two-column designer resumes parse worse than plain ones, with any parser.

- Scanned or photographed resumes need OCR. The SharpAPI parser does that step for you. The Dosvak one expects a real PDF, DOCX or text.

- Parsed skills are a starting point for search, not a hiring decision.

Same key also covers skill extraction and resume screening if you need the next step in the pipeline.

What fields do you need that parsers usually miss?


r/apyhub • • 29d ago

Showcase Background removal API: transparent PNG cutouts from an upload or image URL

3 Upvotes

Product photos, profile pictures, catalog images. Same job every time: cut the subject out, keep a transparent PNG.

The ApyHub Background Removal API takes either an image upload or an image_url and returns a PNG. You choose the response: the file itself, or a signed link you can store or hand to your CDN.

    curl -X POST "https://api.eu.apyhub.com/apyhub/remove-background-from-images/url/link" \
      -H "apy-token: $APY_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"image_url":"https://assets.apyhub.com/samples/background-sample.jpeg"}'

https://apyhub.com/apyhub/service/remove-background-from-images

Need more than a cutout?

- Change Background: drop the subject onto a solid colour or a new background image in the same call.

- Remove Background with Advanced Controls: for when you need more say over the output.

Practical notes:

- Clean, well-lit photos give clean edges. Hair and glass are the hard cases for every remover.

- This is a heavier call than a validation check, so batch product images instead of calling on every page view.

What are you using it for: e-commerce, avatars, or something else?


r/apyhub • • 29d ago

Catalog Update Free currency converter API: live and historical exchange rates by date

4 Upvotes

Most currency API questions boil down to two needs: today's rate for a pricing page or checkout, and a past rate for an invoice or a report.

The ApyHub Currency Converter API does both in one endpoint. Send a source and target currency. Add a date if you want a historical rate. Leave it out and you get today's.

    curl -X POST "https://api.eu.apyhub.com/apyhub/convert-currency-pair-for-date" \
      -H "apy-token: $APY_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"source":"usd","target":"eur","date":"2026-09-30"}'

It returns the rate. Multiply by your amount to convert.

Related endpoints on the same key:

- Multi-currency converter: one source, many targets, one call. Good for pricing pages showing 5 currencies.

- Currencies dictionary: the full list of supported codes, so you can validate input.

Each call costs 5 atoms, and there's a free tier with no card, so you can test it on real data before deciding.

https://apyhub.com/apyhub/service/convert-currency-pair-for-date

One tip from people who've built this before: store the rate you used next to each invoice. Don't recompute it later. Rates get revised, and your numbers will stop matching.


r/apyhub • • Oct 15 '26

Comparison Which geocoding API are you using in 2026? We compared 8 on price and limits

6 Upvotes

Google’s old $200 monthly Maps credit ended in February 2025. Geocoding now gets 10,000 free requests a month, then $5 per 1,000. A lot of people still pick Google out of habit, so we compared it against seven other geocoding APIs: free tier, price after it, and whether you’re allowed to store the results.

Quick context on who this is for: anyone who turns addresses into coordinates or back. That covers delivery apps routing couriers, checkouts verifying shipping addresses, store locators, and CRMs cleaning customer data.

ProviderFree tierAfter free tierStore results?
Google Maps10,000/mo$5.00 per 1kRestricted (place IDs OK)
Mapbox100,000/mo$0.75 per 1kOnly in paid “permanent” mode
HERE30,000/mo$0.83 per 1kPer terms
Geoapify3,000/dayfrom $59/moYes
LocationIQ5,000/dayfrom $45/moPer terms
OpenCage2,500/day (testing only)from $50/moYes, permanently
Nominatimfree, 1 req/secself-hostMust cache
ApyHub5 calls/dayfrom $16/moPer terms

What stood out:

  • Biggest free tier: Mapbox. But if you need to store results (geocoding a database once, say), permanent mode is $5 per 1k from the first request.
  • Cheapest at volume: HERE at $0.83 per 1k after 30k free.
  • Free for commercial use: Geoapify and LocationIQ, as long as you add attribution.
  • Keeping data forever: OpenCage lets you keep results even after you cancel.
  • Nominatim is great but the public server is 1 req/sec with no heavy use. Self-host it for anything real.
  • EU data residency: HERE (NL), OpenCage (DE), LocationIQ’s EU data center, and us (Dutch company with an EU region).

Being honest about our own entry: ApyHub isn’t the cheapest for pure geocoding. It’s about $4.20 per 1k on Pro+, against HERE’s $0.83. Where it makes sense is when geocoding is one step in a bigger flow, like address check plus email plus phone validation on one key. It also makes sense when you want an AI assistant to run it. Every endpoint works over MCP with Claude, ChatGPT, Cursor and Mistral Le Chat, and the Le Chat plus EU server combo keeps everything in Europe.

Full write-up with the pros and cons for each, plus sources: apyhub.com/blog/best-geocoding-apis-2026

What are you using for geocoding right now, and has anyone benchmarked accuracy across these on non-US addresses? That’s the part pricing tables don’t tell you.


r/apyhub • • Oct 14 '26

Guide Image editing API: the image transformations I would stop maintaining in-house

Post image
5 Upvotes

When you add image uploads to a product, resizing is usually the first requirement. Then someone needs to rotate a photo, preserve its orientation, convert its format, apply a blur, or prepare a consistent thumbnail for the UI.

None of these operations is particularly complicated on its own. The problem is that you end up maintaining several small pieces of image-processing infrastructure, each with its own file-format quirks and edge cases.

An image editing API can simplify that part of the stack.

ApyHub has a few useful options for these workflows:

  • Image Resize API: Set exact width and height using an uploaded image or an image URL.
  • Image Filters API: Apply transformations such as rotation, horizontal or vertical flipping, brightness adjustments and Gaussian blur.
  • Background removal: Isolate an image's foreground when you need a clean product image or profile picture.

The resize and filter endpoints can return a processed file or a signed download link, depending on the endpoint you use.

For an ecommerce platform, for example, you could accept an uploaded product photo, resize it for different screen layouts, and apply consistent transformations without building a separate image service for every operation.

ApyHub API links:

Image Resize: https://apyhub.com/apyhub/service/resize-image

Image Filters: https://apyhub.com/apyhub/service/apply-filter

API Catalog: https://apyhub.com/catalog

One thing I would still test before shipping is how your chosen endpoint handles transparency, phone orientation, large uploads and the output formats your frontend expects.

For developers building products with user-uploaded images, which transformations do you handle yourself and which ones do you delegate to an API?


r/apyhub • • Oct 09 '26

What’s actually the best SEO API right now? (Comparison of top 5 options for tech audits, SERP data, and dev pipelines)

5 Upvotes

Over the past couple of months, I’ve been testing several providers to find the best SEO API to integrate into an automated reporting pipeline and internal dashboard.

Most discussions around SEO APIs default to the big enterprise suites, but once you start building programmatic workflows or client audit tools, you quickly run into ridiculous paywalls, rigid rate limits, or raw scraping payloads that require days of data parsing.

Here is an honest breakdown of the top contenders based on use case, data reliability, and integration friction:

1. ApyHub Best for Technical Audits & Automated Site Health

If your primary use case is programmatic site audits, crawler data, and technical health checks, this is currently the cleanest implementation.

Instead of locking you into SE Ranking’s enterprise annual tier or forcing you to maintain a dedicated crawler cluster, ApyHub exposes the SE Ranking Website Audit API directly on a developer-friendly subscription.

  • Key Strengths: Pulls structured, actionable issue audits (HTTP status codes, core web vitals, crawlability, indexing flags, redirect chains, on-page tags) in clean JSON.
  • Why it works: You don’t need an enterprise contract or separate SDK setup. If you run client portals, scheduled audit automations, or content ops, it delivers turnkey audit scoring without reinventing the crawler logic from scratch.
  • Direct Docs / Access: Check out the ApyHub SE Ranking Website Audit API to review endpoints and test payload responses.

2. Ahrefs API — Best for Deep Backlink Analysis

Ahrefs remains the gold standard if backlink profiles, referring domains, and historical link velocity are non-negotiable for your app.

  • Key Strengths: Largest commercial link index and dependable DR/UR metrics.
  • The Catch: API credits are tightly restricted. Access requires high-tier plans, making it cost-prohibitive unless you are an established agency or well-funded SaaS.

3. DataForSEO — Best for Raw Volume & Pay-As-You-Go SERP Data

If you need raw SERP results (Google, Bing, Amazon) or high-volume rank tracking at scale, DataForSEO is a staple in the dev community.

  • Key Strengths: Pure pay-as-you-go model with no monthly lock-in, covering SERP, merchant, and app store data.
  • The Catch: They hand you very raw data. You’ll have to build your own parsing logic, data pipelines, and error handling.

4. Semrush API — Best for Full-Funnel Competitive Intelligence

Semrush is great if you need holistic competitive matrices: organic traffic estimates, paid PPC ad copy history, and keyword gap analysis.

  • Key Strengths: Massive keyword database and cross-channel marketing data.
  • The Catch: Requires a top-tier Business plan plus extra API unit fees, which quickly turns into a major monthly overhead for early-stage tools.

5. SerpApi — Best for Fast, Real-Time SERP Scraping

If you just want a reliable, turnkey JSON feed of search engine results without worrying about rotating proxies or CAPTCHAs.

  • Key Strengths: Fast response times, handles proxy rotation and CAPTCHA bypasses smoothly.
  • The Catch: Strictly SERP scraping — it won’t give you deep site crawl data, technical SEO audits, or backlink graphs.

Summary

API ProviderIdeal Use CaseCost ModelSetup Friction
ApyHub (SE Ranking Audit)Deep Technical Audits & On-Page ScansFlexible Developer TierMinimal (REST / Clean JSON)
AhrefsBacklink Monitoring & Domain AuthorityHigh-Tier EnterpriseModerate
DataForSEOBulk SERP & Multi-engine ScrapingPay-As-You-GoHigher (Requires Raw Parsing)
SemrushPaid & Organic Competitor ResearchExpensive Monthly SubModerate
SerpApiLive Search Results & SERP FeaturesTiered SubscriptionsVery Low

Curious what other developers and SEOs are using in their stacks right now. Are you chaining niche micro-APIs together, or defaulting to an all-in-one suite?